Skip to content

Commit 4b0c966

Browse files
ADD: complete features ..
1 parent e90cd6b commit 4b0c966

File tree

7 files changed

+56
-2
lines changed

7 files changed

+56
-2
lines changed

src/CopyCommander2.lpi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,13 +131,15 @@
131131
<Filename Value="unit7.pas"/>
132132
<IsPartOfProject Value="True"/>
133133
<ComponentName Value="Form7"/>
134+
<HasResources Value="True"/>
134135
<ResourceBaseClass Value="Form"/>
135136
<UnitName Value="Unit7"/>
136137
</Unit16>
137138
<Unit17>
138139
<Filename Value="unit8.pas"/>
139140
<IsPartOfProject Value="True"/>
140141
<ComponentName Value="Form8"/>
142+
<HasResources Value="True"/>
141143
<ResourceBaseClass Value="Form"/>
142144
<UnitName Value="Unit8"/>
143145
</Unit17>

src/how_to_use.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ This Programm is orientated on the "Total Commander" application for Windows.
66

77
The main porpuse of this programm is copying and moveing files / directories, in a queue.
88

9+
### "open"
10+
11+
If set in the settings, this can call a external programm with the actual selected file.
12+
913
### "diff viewer" folder feature
1014

1115
Navigate to two different folders that you want to be synchronized. Press CTRL + S to open the diff viewer folder dialog.

src/unit1.pas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@
324324
{$R *.lfm}
325325

326326
Uses LazFileUtils, LCLType, math, process, UTF8Process
327-
, urestapi // Rest-API
327+
, urestapi
328328
, unit2 // Progress Dialog
329329
, Unit3 // Diff Dialog
330330
, unit4 // Errorlog

src/unit7.lfm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ object Form7: TForm7
8585
Width = 75
8686
Caption = 'Edit'
8787
TabOrder = 2
88+
OnClick = Button4Click
8889
end
8990
object Button5: TButton
9091
Left = 640
@@ -93,6 +94,7 @@ object Form7: TForm7
9394
Width = 75
9495
Caption = 'Del'
9596
TabOrder = 3
97+
OnClick = Button5Click
9698
end
9799
end
98100
end

src/unit7.pas

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
GroupBox1: TGroupBox;
3636
StringGrid1: TStringGrid;
3737
Procedure Button3Click(Sender: TObject);
38+
Procedure Button4Click(Sender: TObject);
39+
Procedure Button5Click(Sender: TObject);
3840
Procedure FormCreate(Sender: TObject);
3941
private
4042

@@ -70,6 +72,7 @@
7072
StringGrid1.Cells[1, i + 1] := inifile.ReadString('FileAssociations', 'cmd' + inttostr(i), '');
7173
StringGrid1.Cells[2, i + 1] := inifile.ReadString('FileAssociations', 'Params' + inttostr(i), '');
7274
End;
75+
StringGrid1.AutoSizeColumns;
7376
End;
7477

7578
Procedure TForm7.SaveTo(Const Inifile: TIniFile);
@@ -105,8 +108,32 @@
105108
StringGrid1.Cells[0, index] := form8.Edit1.Text;
106109
StringGrid1.Cells[1, index] := form8.Edit2.Text;
107110
StringGrid1.Cells[2, index] := form8.Edit3.Text;
111+
StringGrid1.AutoSizeColumns;
108112
End;
109113
End;
110114

115+
Procedure TForm7.Button4Click(Sender: TObject);
116+
Begin
117+
// Edit
118+
If StringGrid1.Selection.Top > 0 Then Begin
119+
form8.InitWith(StringGrid1.Cells[0, StringGrid1.Selection.Top],
120+
StringGrid1.Cells[1, StringGrid1.Selection.Top],
121+
StringGrid1.Cells[2, StringGrid1.Selection.Top]
122+
);
123+
If form8.ShowModal = mrOK Then Begin
124+
StringGrid1.Cells[0, StringGrid1.Selection.Top] := form8.Edit1.Text;
125+
StringGrid1.Cells[1, StringGrid1.Selection.Top] := form8.Edit2.Text;
126+
StringGrid1.Cells[2, StringGrid1.Selection.Top] := form8.Edit3.Text;
127+
StringGrid1.AutoSizeColumns;
128+
End;
129+
End;
130+
End;
131+
132+
Procedure TForm7.Button5Click(Sender: TObject);
133+
Begin
134+
If StringGrid1.Selection.Top > 0 Then
135+
StringGrid1.DeleteRow(StringGrid1.Selection.Top);
136+
End;
137+
111138
End.
112139

src/unit8.lfm

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,12 @@ object Form8: TForm8
1919
object Edit1: TEdit
2020
Left = 64
2121
Height = 26
22+
Hint = 'Multiple entries allowed, separate them with '';'''
2223
Top = 8
23-
Width = 80
24+
Width = 248
25+
Anchors = [akTop, akLeft, akRight]
26+
ParentShowHint = False
27+
ShowHint = True
2428
TabOrder = 0
2529
Text = 'Edit1'
2630
end
@@ -50,9 +54,12 @@ object Form8: TForm8
5054
object Edit3: TEdit
5155
Left = 64
5256
Height = 26
57+
Hint = '%f stands for the actual selected file / folder'
5358
Top = 70
5459
Width = 248
5560
Anchors = [akTop, akLeft, akRight]
61+
ParentShowHint = False
62+
ShowHint = True
5663
TabOrder = 2
5764
Text = 'Edit3'
5865
end
@@ -64,6 +71,7 @@ object Form8: TForm8
6471
Anchors = [akTop, akRight]
6572
Caption = 'Set'
6673
TabOrder = 3
74+
OnClick = Button1Click
6775
end
6876
object Button2: TButton
6977
Left = 320
@@ -85,4 +93,8 @@ object Form8: TForm8
8593
ModalResult = 2
8694
TabOrder = 5
8795
end
96+
object OpenDialog1: TOpenDialog
97+
Left = 155
98+
Top = 54
99+
end
88100
end

src/unit8.pas

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
Label1: TLabel;
3636
Label2: TLabel;
3737
Label3: TLabel;
38+
OpenDialog1: TOpenDialog;
39+
Procedure Button1Click(Sender: TObject);
3840
Procedure FormCreate(Sender: TObject);
3941
private
4042

@@ -57,6 +59,11 @@
5759
caption := 'File ext association editor';
5860
End;
5961

62+
Procedure TForm8.Button1Click(Sender: TObject);
63+
Begin
64+
If OpenDialog1.Execute Then edit2.text := OpenDialog1.FileName;
65+
End;
66+
6067
Procedure TForm8.InitWith(ext, cmd, params: String);
6168
Begin
6269
edit1.text := ext; // ; liste erlaubt

0 commit comments

Comments
 (0)