Changeset 8 for trunk/UCore.pas
- Timestamp:
- May 18, 2015, 12:15:30 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UCore.pas
r7 r8 17 17 ACommandUpdate: TAction; 18 18 ACommandCleanup: TAction; 19 ACommandCheckout: TAction;20 19 ACommandCommit: TAction; 21 20 ACommandStatus: TAction; 22 A ction1: TAction;21 AProjectCheckout: TAction; 23 22 AProjectClose: TAction; 24 23 ActionList1: TActionList; … … 30 29 ImageList1: TImageList; 31 30 LastOpenedList1: TLastOpenedList; 31 LastOpenedListNewDir: TLastOpenedList; 32 LastOpenedListRepoURL: TLastOpenedList; 32 33 OpenDialog1: TOpenDialog; 33 34 XMLConfig1: TXMLConfig; … … 36 37 procedure ACommandCommitExecute(Sender: TObject); 37 38 procedure ACommandUpdateExecute(Sender: TObject); 39 procedure AProjectCheckoutExecute(Sender: TObject); 38 40 procedure AProjectCloseExecute(Sender: TObject); 39 41 procedure AProjectOpenExecute(Sender: TObject); … … 62 64 63 65 uses 64 UFormMain, UFormBrowse, UFormSettings, UFormCommit ;66 UFormMain, UFormBrowse, UFormSettings, UFormCommit, UFormCheckout; 65 67 66 68 { TCore } … … 100 102 begin 101 103 LastOpenedList1.LoadFromXMLConfig(XMLConfig1, 'LastOpenedProjects'); 104 LastOpenedListRepoURL.LoadFromXMLConfig(XMLConfig1, 'LastOpenedRepoURL'); 105 LastOpenedListNewDir.LoadFromXMLConfig(XMLConfig1, 'LastOpenedNewDir'); 102 106 end; 103 107 … … 105 109 begin 106 110 LastOpenedList1.SaveToXMLConfig(XMLConfig1, 'LastOpenedProjects'); 111 LastOpenedListRepoURL.SaveToXMLConfig(XMLConfig1, 'LastOpenedRepoURL'); 112 LastOpenedListNewDir.SaveToXMLConfig(XMLConfig1, 'LastOpenedNewDir'); 107 113 end; 108 114 … … 146 152 begin 147 153 FreeAndNil(Project); 154 FormBrowse.Directory := ''; 155 FormBrowse.ReloadList; 148 156 UpdateInterface; 149 157 end; … … 154 162 end; 155 163 164 procedure TCore.AProjectCheckoutExecute(Sender: TObject); 165 var 166 TempProject: TProject; 167 begin 168 if LastOpenedListRepoURL.Items.Count > 0 then 169 FormCheckout.EditURL.Text := LastOpenedListRepoURL.Items[0]; 170 if LastOpenedListNewDir.Items.Count > 0 then 171 FormCheckout.EditDir.Text := LastOpenedListNewDir.Items[0]; 172 if FormCheckout.ShowModal = mrOk then begin 173 LastOpenedListRepoURL.AddItem(FormCheckout.EditURL.Text); 174 LastOpenedListNewDir.AddItem(FormCheckout.EditDir.Text); 175 TempProject := TProject.Create; 176 try 177 TempProject.VCSType := vtSubversion; 178 TempProject.Directory := FormCheckout.EditDir.Text; 179 TempProject.RepositoryURL := FormCheckout.EditURL.Text; 180 TempProject.WorkingCopy.Checkout; 181 finally 182 TempProject.Free; 183 end; 184 ProjectOpen(FormCheckout.EditDir.Text); 185 end; 186 end; 187 156 188 procedure TCore.ACommandCleanupExecute(Sender: TObject); 157 189 begin 158 Project.WorkingCopy.Clean Up;190 Project.WorkingCopy.Cleanup; 159 191 end; 160 192 161 193 procedure TCore.ACommandCheckoutExecute(Sender: TObject); 162 194 begin 163 Project.WorkingCopy.Checkout; 195 164 196 end; 165 197
Note:
See TracChangeset
for help on using the changeset viewer.