Added Copy/Paste functions
This commit is contained in:
parent
c47d3e6caf
commit
d78b82e9e2
|
@ -55,8 +55,9 @@ Var
|
||||||
List : TAnsiMenuList;
|
List : TAnsiMenuList;
|
||||||
F : TBufFile;
|
F : TBufFile;
|
||||||
Arc : RecArchive;
|
Arc : RecArchive;
|
||||||
|
Copied : RecArchive;
|
||||||
|
HasCopy : Boolean = False;
|
||||||
|
|
||||||
// SORT THIS LIST BY NON CASE SENSITIVE ARCHIVE EXTENSION
|
|
||||||
Procedure MakeList;
|
Procedure MakeList;
|
||||||
Var
|
Var
|
||||||
OS : String;
|
OS : String;
|
||||||
|
@ -105,8 +106,7 @@ Begin
|
||||||
List.Close;
|
List.Close;
|
||||||
|
|
||||||
Case List.ExitCode of
|
Case List.ExitCode of
|
||||||
'/' : Case GetCommandOption(11, 'I-Insert|D-Delete|') of
|
'/' : Case GetCommandOption(10, 'I-Insert|D-Delete|C-Copy|P-Paste|') of
|
||||||
#27 : ;
|
|
||||||
'I' : Begin
|
'I' : Begin
|
||||||
F.RecordInsert (List.Picked);
|
F.RecordInsert (List.Picked);
|
||||||
|
|
||||||
|
@ -124,6 +124,18 @@ Begin
|
||||||
End;
|
End;
|
||||||
'D' : If ShowMsgBox(1, 'Delete this entry?') Then Begin
|
'D' : If ShowMsgBox(1, 'Delete this entry?') Then Begin
|
||||||
F.RecordDelete (List.Picked);
|
F.RecordDelete (List.Picked);
|
||||||
|
MakeList;
|
||||||
|
End;
|
||||||
|
'C' : If List.Picked <> List.ListMax Then Begin
|
||||||
|
F.Seek (List.Picked - 1);
|
||||||
|
F.Read (Copied);
|
||||||
|
|
||||||
|
HasCopy := True;
|
||||||
|
End;
|
||||||
|
'P' : If HasCopy Then Begin
|
||||||
|
F.RecordInsert (List.Picked);
|
||||||
|
F.Write (Copied);
|
||||||
|
|
||||||
MakeList;
|
MakeList;
|
||||||
End;
|
End;
|
||||||
End;
|
End;
|
||||||
|
|
|
@ -53,6 +53,8 @@ Var
|
||||||
List : TAnsiMenuList;
|
List : TAnsiMenuList;
|
||||||
F : TBufFile;
|
F : TBufFile;
|
||||||
Prot : RecProtocol;
|
Prot : RecProtocol;
|
||||||
|
Copied : RecProtocol;
|
||||||
|
HasCopy : Boolean = False;
|
||||||
|
|
||||||
Procedure MakeList;
|
Procedure MakeList;
|
||||||
Var
|
Var
|
||||||
|
@ -105,8 +107,7 @@ Begin
|
||||||
List.Close;
|
List.Close;
|
||||||
|
|
||||||
Case List.ExitCode of
|
Case List.ExitCode of
|
||||||
'/' : Case GetCommandOption(11, 'I-Insert|D-Delete|') of
|
'/' : Case GetCommandOption(10, 'I-Insert|D-Delete|C-Copy|P-Paste|') of
|
||||||
#27 : ;
|
|
||||||
'I' : Begin
|
'I' : Begin
|
||||||
F.RecordInsert (List.Picked);
|
F.RecordInsert (List.Picked);
|
||||||
|
|
||||||
|
@ -127,6 +128,19 @@ Begin
|
||||||
F.RecordDelete (List.Picked);
|
F.RecordDelete (List.Picked);
|
||||||
MakeList;
|
MakeList;
|
||||||
End;
|
End;
|
||||||
|
'C' : If List.Picked <> List.ListMax Then Begin
|
||||||
|
F.Seek (List.Picked - 1);
|
||||||
|
F.Read (Copied);
|
||||||
|
|
||||||
|
HasCopy := True;
|
||||||
|
End;
|
||||||
|
'P' : If HasCopy Then Begin
|
||||||
|
F.RecordInsert (List.Picked);
|
||||||
|
F.Write (Copied);
|
||||||
|
|
||||||
|
MakeList;
|
||||||
|
End;
|
||||||
|
|
||||||
End;
|
End;
|
||||||
#13 : If List.Picked <> List.ListMax Then Begin
|
#13 : If List.Picked <> List.ListMax Then Begin
|
||||||
F.Seek (List.Picked - 1);
|
F.Seek (List.Picked - 1);
|
||||||
|
|
Loading…
Reference in New Issue