Changeset 10 for trunk/Forms
- Timestamp:
- May 19, 2015, 10:32:51 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:ignore
-
old new 2 2 VCSCommander 3 3 VCSCommander.lps 4 Config.xml 5 heaptrclog.trc
-
- Property svn:ignore
-
trunk/Forms/UFormBrowse.lfm
r8 r10 91 91 object AAdd: TAction 92 92 Caption = 'Add' 93 OnExecute = AAddExecute 93 94 end 94 95 object ADelete: TAction … … 98 99 object ARename: TAction 99 100 Caption = 'Rename' 101 OnExecute = ARenameExecute 100 102 end 101 103 object AUpdate: TAction -
trunk/Forms/UFormBrowse.pas
r8 r10 31 31 Splitter1: TSplitter; 32 32 TreeView1: TTreeView; 33 procedure AAddExecute(Sender: TObject); 33 34 procedure ADeleteExecute(Sender: TObject); 34 35 procedure AOpenExecute(Sender: TObject); 36 procedure ARenameExecute(Sender: TObject); 35 37 procedure FormCreate(Sender: TObject); 36 38 procedure FormDestroy(Sender: TObject); … … 42 44 Directory: string; 43 45 procedure ReloadList; 46 procedure UpdateInterface; 44 47 end; 45 48 … … 48 51 49 52 implementation 53 54 uses 55 UCore; 50 56 51 57 {$R *.lfm} … … 70 76 end; 71 77 78 procedure TFormBrowse.AAddExecute(Sender: TObject); 79 begin 80 Core.Project.WorkingCopy.Add(Directory + DirectorySeparator + ListView1.Selected.Caption); 81 end; 82 72 83 procedure TFormBrowse.AOpenExecute(Sender: TObject); 73 84 begin … … 83 94 end; 84 95 end; 96 end; 97 98 procedure TFormBrowse.ARenameExecute(Sender: TObject); 99 var 100 NewName: string; 101 begin 102 if InputQuery('Rename', 'Enter new name', NewName) then 103 Core.Project.WorkingCopy.Move(Directory + DirectorySeparator + ListView1.Selected.Caption, NewName); 85 104 end; 86 105 … … 120 139 end; 121 140 141 procedure TFormBrowse.UpdateInterface; 142 begin 143 AAdd.Enabled := Assigned(ListView1.Selected); 144 ADelete.Enabled := Assigned(ListView1.Selected); 145 ARename.Enabled := Assigned(ListView1.Selected); 146 AProperties.Enabled := Assigned(ListView1.Selected); 147 end; 148 122 149 end. 123 150
Note:
See TracChangeset
for help on using the changeset viewer.