Changeset 23 for trunk/Forms
- Timestamp:
- Apr 4, 2025, 9:22:05 AM (2 weeks ago)
- Location:
- trunk/Forms
- Files:
-
- 20 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/FormBrowse.lfm
r22 r23 1 1 object FormBrowse: TFormBrowse 2 2 Left = 479 3 Height = 5383 Height = 807 4 4 Top = 279 5 Width = 9645 Width = 1446 6 6 Caption = 'Browse' 7 ClientHeight = 538 8 ClientWidth = 964 7 ClientHeight = 807 8 ClientWidth = 1446 9 DesignTimePPI = 144 9 10 Menu = MainMenu1 10 11 OnCreate = FormCreate 11 12 OnDestroy = FormDestroy 12 13 OnShow = FormShow 13 LCLVersion = ' 1.5'14 LCLVersion = '3.6.0.0' 14 15 object TreeView1: TTreeView 15 16 Left = 0 16 Height = 53817 Height = 807 17 18 Top = 0 18 Width = 24119 Width = 362 19 20 Align = alLeft 20 DefaultItemHeight = 2421 21 TabOrder = 0 22 22 end 23 23 object Splitter1: TSplitter 24 Left = 24125 Height = 53824 Left = 362 25 Height = 807 26 26 Top = 0 27 Width = 527 Width = 8 28 28 end 29 29 object ListView1: TListView 30 Left = 24631 Height = 53830 Left = 370 31 Height = 807 32 32 Top = 0 33 Width = 71833 Width = 1076 34 34 Align = alClient 35 35 Columns = < 36 36 item 37 37 Caption = 'Name' 38 Width = 30038 Width = 450 39 39 end 40 40 item 41 41 Caption = 'Revision' 42 Width = 8042 Width = 120 43 43 end 44 44 item 45 45 Caption = 'Last change date' 46 Width = 1 0046 Width = 150 47 47 end 48 48 item 49 49 Caption = 'Last author' 50 Width = 1 0050 Width = 150 51 51 end 52 52 item 53 53 Caption = 'Status' 54 Width = 25954 Width = 388 55 55 end> 56 56 OwnerData = True … … 67 67 object PopupMenu1: TPopupMenu 68 68 Images = Core.ImageList1 69 left = 35370 top = 13169 Left = 530 70 Top = 197 71 71 object MenuItem1: TMenuItem 72 72 Action = AAdd … … 93 93 object ActionList1: TActionList 94 94 Images = Core.ImageList1 95 left = 35296 top = 20895 Left = 528 96 Top = 312 97 97 object AAdd: TAction 98 98 Caption = 'Add' … … 123 123 end 124 124 object MainMenu1: TMainMenu 125 left = 429126 top = 516125 Left = 644 126 Top = 774 127 127 end 128 128 end -
trunk/Forms/FormBrowse.pas
r22 r23 1 unit UFormBrowse;1 unit FormBrowse; 2 2 3 3 interface … … 5 5 uses 6 6 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls, 7 ExtCtrls, Menus, ActnList, FindFile, UVCS, Contnrs, LazFileUtils;7 ExtCtrls, Menus, ActnList, FindFile, VCS, Generics.Collections, LazFileUtils; 8 8 9 9 type … … 45 45 Selected: Boolean); 46 46 private 47 FileList: T ObjectList;47 FileList: TFileStatusList; 48 48 public 49 49 Directory: string; … … 52 52 end; 53 53 54 var55 FormBrowse: TFormBrowse;56 57 54 58 55 implementation 59 56 60 57 uses 61 UCore, UFormLog;58 Core, FormLog; 62 59 63 60 {$R *.lfm} … … 96 93 97 94 procedure TFormBrowse.ALogShowExecute(Sender: TObject); 98 begin 99 FormLog.FileName := Directory + DirectorySeparator + ListView1.Selected.Caption; 100 FormLog.ShowModal; 95 var 96 FormLog: TFormLog; 97 begin 98 FormLog := TFormLog.Create(nil); 99 try 100 FormLog.FileName := Directory + DirectorySeparator + ListView1.Selected.Caption; 101 FormLog.ShowModal; 102 finally 103 FormLog.Free; 104 end; 101 105 end; 102 106 103 107 procedure TFormBrowse.AAddExecute(Sender: TObject); 104 108 begin 105 Core. Project.WorkingCopy.Add(Directory + DirectorySeparator + ListView1.Selected.Caption);109 Core.Core.Project.WorkingCopy.Add(Directory + DirectorySeparator + ListView1.Selected.Caption); 106 110 end; 107 111 … … 126 130 begin 127 131 if InputQuery('Rename', 'Enter new name', NewName) then 128 Core. Project.WorkingCopy.Move(Directory + DirectorySeparator + ListView1.Selected.Caption, NewName);132 Core.Core.Project.WorkingCopy.Move(Directory + DirectorySeparator + ListView1.Selected.Caption, NewName); 129 133 end; 130 134 131 135 procedure TFormBrowse.FormCreate(Sender: TObject); 132 136 begin 133 FileList := T ObjectList.Create;137 FileList := TFileStatusList.Create; 134 138 end; 135 139 136 140 procedure TFormBrowse.FormDestroy(Sender: TObject); 137 141 begin 138 F ileList.Free;142 FreeAndNil(FileList); 139 143 end; 140 144 … … 155 159 begin 156 160 FileList.Clear; 157 if Assigned(Core. Project) then begin161 if Assigned(Core.Core.Project) then begin 158 162 FileStatusList := TFileStatusList.Create; 159 163 try 160 Core. Project.WorkingCopy.GetStatus(Directory, FileStatusList);164 Core.Core.Project.WorkingCopy.GetStatus(Directory, FileStatusList); 161 165 162 166 if DirectoryExistsUTF8(Directory) then begin … … 172 176 NewFileItem.FileName := FoundFileList[I]; 173 177 RelativeName := NewFileItem.FileName; 174 if Copy(RelativeName, 1, Length(Core. Project.WorkingCopy.Path)) =Core.Project.WorkingCopy.Path then175 Delete(RelativeName, 1, Length(Core. Project.WorkingCopy.Path));178 if Copy(RelativeName, 1, Length(Core.Core.Project.WorkingCopy.Path)) = Core.Core.Project.WorkingCopy.Path then 179 Delete(RelativeName, 1, Length(Core.Core.Project.WorkingCopy.Path)); 176 180 if Copy(RelativeName, 1, 1) = DirectorySeparator then 177 181 Delete(RelativeName, 1, Length(DirectorySeparator)); -
trunk/Forms/FormCheckout.pas
r22 r23 1 unit UFormCheckout;1 unit FormCheckout; 2 2 3 3 interface … … 28 28 end; 29 29 30 var31 FormCheckout: TFormCheckout;32 33 30 34 31 implementation … … 37 34 38 35 uses 39 UCore, UBackend;36 Core, Backend; 40 37 41 38 { TFormCheckout } … … 54 51 begin 55 52 ComboBox1.Clear; 56 for I := 0 to Core. Backends.Count - 1 do57 ComboBox1.AddItem( TBackend(Core.Backends[I]).Name,Core.Backends[I]);53 for I := 0 to Core.Core.Backends.Count - 1 do 54 ComboBox1.AddItem(Core.Core.Backends[I].Name, Core.Core.Backends[I]); 58 55 if ComboBox1.Items.Count > 0 then 59 56 ComboBox1.ItemIndex := 0; -
trunk/Forms/FormCommit.pas
r22 r23 1 unit UFormCommit;1 unit FormCommit; 2 2 3 3 interface -
trunk/Forms/FormConsole.pas
r22 r23 1 unit UFormConsole;1 unit FormConsole; 2 2 3 3 interface … … 33 33 procedure Perform; 34 34 end; 35 36 var37 FormConsole: TFormConsole;38 35 39 36 -
trunk/Forms/FormFavorites.pas
r22 r23 1 unit UFormFavorites;1 unit FormFavorites; 2 2 3 3 interface … … 10 10 end; 11 11 12 var13 FormFavorites: TFormFavorites;14 15 12 16 13 implementation -
trunk/Forms/FormLog.pas
r22 r23 1 unit UFormLog;1 unit FormLog; 2 2 3 3 interface … … 5 5 uses 6 6 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls, 7 StdCtrls, ExtCtrls, UVCS;7 StdCtrls, ExtCtrls, VCS; 8 8 9 9 type … … 32 32 end; 33 33 34 var35 FormLog: TFormLog;36 37 34 38 35 implementation 39 36 40 37 uses 41 UCore;38 Core; 42 39 43 40 {$R *.lfm} … … 57 54 procedure TFormLog.FormShow(Sender: TObject); 58 55 begin 59 Core. Project.WorkingCopy.GetLog(FileName, LogList);56 Core.Core.Project.WorkingCopy.GetLog(FileName, LogList); 60 57 ReloadList; 61 58 end; -
trunk/Forms/FormMain.lfm
r22 r23 1 1 object FormMain: TFormMain 2 2 Left = 687 3 Height = 8013 Height = 767 4 4 Top = 411 5 5 Width = 1408 6 6 Caption = 'VCSCommander' 7 ClientHeight = 8017 ClientHeight = 767 8 8 ClientWidth = 1408 9 9 DesignTimePPI = 144 … … 11 11 OnActivate = FormActivate 12 12 OnClose = FormClose 13 OnCreate = FormCreate 14 OnDestroy = FormDestroy 13 15 OnShow = FormShow 14 16 Position = poScreenCenter … … 43 45 Left = 0 44 46 Height = 28 45 Top = 7 7347 Top = 739 46 48 Width = 1408 47 49 Panels = <> -
trunk/Forms/FormMain.pas
r22 r23 1 unit UFormMain;1 unit FormMain; 2 2 3 3 interface … … 5 5 uses 6 6 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls, 7 Menus, ActnList, ExtCtrls ;7 Menus, ActnList, ExtCtrls, FormBrowse, FormProjectGroup; 8 8 9 9 type … … 50 50 procedure FormActivate(Sender: TObject); 51 51 procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); 52 procedure FormCreate(Sender: TObject); 53 procedure FormDestroy(Sender: TObject); 52 54 procedure FormShow(Sender: TObject); 53 55 procedure MenuItemFileClick(Sender: TObject); … … 55 57 Initialized: Boolean; 56 58 public 59 FormBrowse: TFormBrowse; 60 FormProjectGroup: TFormProjectGroup; 57 61 procedure ProjectGroupOpenRecentExecute(Sender: TObject); 58 62 procedure OpenRecentExecute(Sender: TObject); … … 60 64 procedure DockInit; 61 65 end; 62 63 var64 FormMain: TFormMain;65 66 66 67 … … 70 71 71 72 uses 72 UCore, UFormBrowse, UFormProjectGroup;73 Core; 73 74 74 75 { TFormMain } … … 86 87 procedure TFormMain.OpenRecentExecute(Sender: TObject); 87 88 begin 88 Core. ProjectOpen(Core.LastOpenedListProject.Items[TMenuItem(Sender).MenuIndex]);89 Core.Core.ProjectOpen(Core.Core.LastOpenedListProject.Items[TMenuItem(Sender).MenuIndex]); 89 90 end; 90 91 91 92 procedure TFormMain.ProjectGroupOpenRecentExecute(Sender: TObject); 92 93 begin 93 Core. ProjectGroupOpen(Core.LastOpenedListProjectGroup.Items[TMenuItem(Sender).MenuIndex]);94 Core.Core.ProjectGroupOpen(Core.Core.LastOpenedListProjectGroup.Items[TMenuItem(Sender).MenuIndex]); 94 95 end; 95 96 … … 98 99 if not Initialized then begin 99 100 Initialized := True; 100 Core. Init;101 Core.Core.Init; 101 102 end; 102 103 end; … … 104 105 procedure TFormMain.FormClose(Sender: TObject; var CloseAction: TCloseAction); 105 106 begin 106 Core.Done; 107 Core.Core.Done; 108 end; 109 110 procedure TFormMain.FormCreate(Sender: TObject); 111 begin 112 FormBrowse := TFormBrowse.Create(nil); 113 FormProjectGroup := TFormProjectGroup.Create(nil); 114 end; 115 116 procedure TFormMain.FormDestroy(Sender: TObject); 117 begin 118 FreeAndNil(FormProjectGroup); 119 FreeAndNil(FormBrowse); 107 120 end; 108 121 … … 114 127 begin 115 128 NewCaption := ''; 116 if Assigned(Core. Project) then117 NewCaption := Core. Project.Directory + ' (' +Core.Project.Backend.Name + ') - ';129 if Assigned(Core.Core.Project) then 130 NewCaption := Core.Core.Project.Directory + ' (' + Core.Core.Project.Backend.Name + ') - '; 118 131 NewCaption := NewCaption + AppName; 119 132 Caption := NewCaption; -
trunk/Forms/FormProjectGroup.pas
r22 r23 1 unit UFormProjectGroup;1 unit FormProjectGroup; 2 2 3 3 interface … … 5 5 uses 6 6 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls, 7 Menus, ActnList, UProject, LazFileUtils;7 Menus, ActnList, Project, LazFileUtils; 8 8 9 9 type … … 27 27 end; 28 28 29 var30 FormProjectGroup: TFormProjectGroup;31 32 29 33 30 implementation … … 36 33 37 34 uses 38 UCore;35 Core; 39 36 40 37 { TFormProjectGroup } … … 50 47 begin 51 48 TreeView1.Items.Clear; 52 if Assigned(Core. ProjectGroup) then begin53 TreeView1.Items.AddChild(nil, ExtractFileNameOnly(Core. ProjectGroup.FileName));54 for I := 0 to Core. ProjectGroup.Projects.Count - 1 do49 if Assigned(Core.Core.ProjectGroup) then begin 50 TreeView1.Items.AddChild(nil, ExtractFileNameOnly(Core.Core.ProjectGroup.FileName)); 51 for I := 0 to Core.Core.ProjectGroup.Projects.Count - 1 do 55 52 TreeView1.Items.AddChildObject(TreeView1.TopItem, 56 ExtractFileName( TProject(Core.ProjectGroup.Projects[I]).Directory),57 Core. ProjectGroup.Projects[I]);53 ExtractFileName(Core.Core.ProjectGroup.Projects[I].Directory), 54 Core.Core.ProjectGroup.Projects[I]); 58 55 end; 59 56 UpdateInterface; -
trunk/Forms/FormSettings.lfm
r22 r23 1 1 object FormSettings: TFormSettings 2 2 Left = 342 3 Height = 4973 Height = 746 4 4 Top = 145 5 Width = 6865 Width = 1029 6 6 Caption = 'Settings' 7 ClientHeight = 497 8 ClientWidth = 686 7 ClientHeight = 746 8 ClientWidth = 1029 9 DesignTimePPI = 144 9 10 OnCreate = FormCreate 10 LCLVersion = ' 1.5'11 LCLVersion = '3.6.0.0' 11 12 object ButtonCancel: TButton 12 Left = 59213 Height = 2514 Top = 46415 Width = 7513 Left = 888 14 Height = 38 15 Top = 696 16 Width = 112 16 17 Caption = 'Cancel' 17 18 ModalResult = 2 … … 19 20 end 20 21 object ButtonOk: TButton 21 Left = 49622 Height = 2523 Top = 46424 Width = 7522 Left = 744 23 Height = 38 24 Top = 696 25 Width = 112 25 26 Caption = 'Ok' 26 27 ModalResult = 1 … … 28 29 end 29 30 object Label1: TLabel 30 Left = 1631 Height = 2 532 Top = 1633 Width = 10731 Left = 24 32 Height = 26 33 Top = 24 34 Width = 97 34 35 Caption = 'User name:' 35 36 ParentColor = False 36 37 end 37 38 object Label2: TLabel 38 Left = 1639 Height = 2 540 Top = 6441 Width = 5 739 Left = 24 40 Height = 26 41 Top = 96 42 Width = 52 42 43 Caption = 'Email:' 43 44 ParentColor = False 44 45 end 45 46 object EditUserName: TEdit 46 Left = 15247 Height = 3548 Top = 849 Width = 26447 Left = 228 48 Height = 43 49 Top = 12 50 Width = 396 50 51 TabOrder = 2 51 52 end 52 53 object EditEmail: TEdit 53 Left = 15254 Height = 3555 Top = 5656 Width = 26454 Left = 228 55 Height = 43 56 Top = 84 57 Width = 396 57 58 TabOrder = 3 58 59 end -
trunk/Forms/FormSettings.pas
r22 r23 1 unit UFormSettings;1 unit FormSettings; 2 2 3 3 interface … … 24 24 end; 25 25 26 var27 FormSettings: TFormSettings;28 29 26 30 27 implementation … … 33 30 34 31 uses 35 UCore;32 Core; 36 33 37 34 { TFormSettings } … … 44 41 procedure TFormSettings.Load(XMLConfig: TXMLConfig); 45 42 begin 46 EditUserName.Text := Core. UserName;47 EditEmail.Text := Core. Email;43 EditUserName.Text := Core.Core.UserName; 44 EditEmail.Text := Core.Core.Email; 48 45 end; 49 46 50 47 procedure TFormSettings.Save(XMLConfig: TXMLConfig); 51 48 begin 52 Core. UserName := EditUserName.Text;53 Core. Email := EditEmail.Text;49 Core.Core.UserName := EditUserName.Text; 50 Core.Core.Email := EditEmail.Text; 54 51 end; 55 52 -
trunk/Forms/FormTest.lfm
r22 r23 1 1 object FormTest: TFormTest 2 2 Left = 477 3 Height = 5873 Height = 880 4 4 Top = 365 5 Width = 8785 Width = 1317 6 6 Caption = 'Test' 7 ClientHeight = 587 8 ClientWidth = 878 7 ClientHeight = 880 8 ClientWidth = 1317 9 DesignTimePPI = 144 9 10 OnShow = FormShow 10 LCLVersion = ' 1.5'11 LCLVersion = '3.6.0.0' 11 12 object ListView1: TListView 12 Left = 1613 Height = 51214 Top = 6415 Width = 85613 Left = 24 14 Height = 768 15 Top = 96 16 Width = 1284 16 17 Anchors = [akTop, akLeft, akRight, akBottom] 17 18 Columns = < 18 19 item 19 20 Caption = 'Action' 20 Width = 25021 Width = 375 21 22 end 22 23 item 23 24 Caption = 'Duration' 24 Width = 1 0025 Width = 150 25 26 end 26 27 item 27 28 Caption = 'Result' 28 Width = 48929 Width = 744 29 30 end> 30 31 ReadOnly = True … … 34 35 end 35 36 object ButtonStart: TButton 36 Left = 77637 Height = 2538 Top = 2439 Width = 7537 Left = 1164 38 Height = 38 39 Top = 36 40 Width = 112 40 41 Caption = 'Start' 42 TabOrder = 1 41 43 OnClick = ButtonStartClick 42 TabOrder = 143 44 end 44 45 object ComboBox1: TComboBox 45 Left = 13646 Height = 3747 Top = 1948 Width = 32446 Left = 204 47 Height = 42 48 Top = 28 49 Width = 486 49 50 ItemHeight = 0 50 51 Style = csDropDownList … … 52 53 end 53 54 object Label1: TLabel 54 Left = 1455 Height = 2 556 Top = 1957 Width = 8555 Left = 21 56 Height = 26 57 Top = 28 58 Width = 78 58 59 Caption = 'Backend:' 59 60 ParentColor = False -
trunk/Forms/FormTest.pas
r22 r23 1 unit UFormTest;1 unit FormTest; 2 2 3 3 interface … … 24 24 end; 25 25 26 var27 FormTest: TFormTest;28 29 26 30 27 implementation … … 33 30 34 31 uses 35 UCore, UBackend, UProject, UVCS;32 Core, Backend, Project, VCS; 36 33 37 34 { TFormTest } … … 42 39 begin 43 40 ComboBox1.Clear; 44 for I := 0 to Core. Backends.Count - 1 do45 ComboBox1.AddItem( TBackend(Core.Backends[I]).Name,Core.Backends[I]);41 for I := 0 to Core.Core.Backends.Count - 1 do 42 ComboBox1.AddItem(Core.Core.Backends[I].Name, Core.Core.Backends[I]); 46 43 if ComboBox1.Items.Count > 0 then 47 44 ComboBox1.ItemIndex := 0; … … 71 68 ListView1.Items.Clear; 72 69 Project := TProject.Create; 73 Project.Backend := TBackend(Core.Backends[ComboBox1.ItemIndex]);74 Project.WorkingCopy.UserName := Core. UserName;75 Project.WorkingCopy.Email := Core. Email;70 Project.Backend := Core.Core.Backends[ComboBox1.ItemIndex]; 71 Project.WorkingCopy.UserName := Core.Core.UserName; 72 Project.WorkingCopy.Email := Core.Core.Email; 76 73 try 77 74 //RemoveDir(TestDir);
Note:
See TracChangeset
for help on using the changeset viewer.