Changeset 92 for trunk/Forms
- Timestamp:
- Jul 20, 2018, 9:48:47 AM (6 years ago)
- Location:
- trunk/Forms
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormMain.pas
r91 r92 433 433 procedure TFormMain.AViewCompilersExecute(Sender: TObject); 434 434 begin 435 Form Compilers.Show;435 FormTargets.Show; 436 436 end; 437 437 -
trunk/Forms/UFormTargetOptions.lfm
r50 r92 1 1 object FormTargetOptions: TFormTargetOptions 2 2 Left = 429 3 Height = 2 403 Height = 206 4 4 Top = 228 5 Width = 3695 Width = 422 6 6 Caption = 'Target options' 7 ClientHeight = 240 8 ClientWidth = 369 9 LCLVersion = '1.1' 7 ClientHeight = 206 8 ClientWidth = 422 9 DesignTimePPI = 120 10 OnClose = FormClose 11 OnCreate = FormCreate 12 OnShow = FormShow 13 LCLVersion = '1.8.2.0' 10 14 object Edit1: TEdit 11 15 Left = 8 12 Height = 2 113 Top = 2414 Width = 27216 Height = 28 17 Top = 32 18 Width = 325 15 19 Anchors = [akTop, akLeft, akRight] 16 20 TabOrder = 0 … … 18 22 object Label1: TLabel 19 23 Left = 8 20 Height = 1424 Height = 20 21 25 Top = 7 22 Width = 8626 Width = 122 23 27 Caption = 'Compiler location:' 24 28 ParentColor = False 25 29 end 26 30 object ButtonCompiler: TButton 27 Left = 28828 Height = 2529 Top = 2431 Left = 341 32 Height = 31 33 Top = 35 30 34 Width = 75 31 35 Anchors = [akTop, akRight] … … 35 39 end 36 40 object ButtonExecute: TButton 37 Left = 28838 Height = 2539 Top = 8041 Left = 341 42 Height = 31 43 Top = 96 40 44 Width = 75 41 45 Anchors = [akTop, akRight] … … 46 50 object Edit2: TEdit 47 51 Left = 8 48 Height = 2 149 Top = 8150 Width = 27252 Height = 28 53 Top = 96 54 Width = 325 51 55 Anchors = [akTop, akLeft, akRight] 52 56 TabOrder = 3 … … 54 58 object Label2: TLabel 55 59 Left = 8 56 Height = 1457 Top = 6458 Width = 8860 Height = 20 61 Top = 72 62 Width = 118 59 63 Caption = 'Executor location:' 60 64 ParentColor = False 61 65 end 62 66 object ButtonOk: TButton 63 Left = 28864 Height = 2565 Top = 20866 Width = 7567 Left = 319 68 Height = 31 69 Top = 163 70 Width = 91 67 71 Anchors = [akRight, akBottom] 68 72 Caption = 'Ok' … … 71 75 end 72 76 object ButtonCancel: TButton 73 Left = 20 074 Height = 2575 Top = 20876 Width = 7577 Left = 207 78 Height = 31 79 Top = 163 80 Width = 91 77 81 Anchors = [akRight, akBottom] 78 82 Caption = 'Cancel' -
trunk/Forms/UFormTargetOptions.pas
r72 r92 25 25 procedure ButtonCompilerClick(Sender: TObject); 26 26 procedure ButtonExecuteClick(Sender: TObject); 27 procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); 28 procedure FormCreate(Sender: TObject); 29 procedure FormShow(Sender: TObject); 27 30 private 28 31 { private declarations } … … 35 38 FormTargetOptions: TFormTargetOptions; 36 39 40 37 41 implementation 38 42 39 43 {$R *.lfm} 44 45 uses 46 UCore; 40 47 41 48 { TFormTargetOptions } … … 51 58 OpenDialog1.FileName := Edit2.Text; 52 59 if OpenDialog1.Execute then Edit2.Text := OpenDialog1.FileName; 60 end; 61 62 procedure TFormTargetOptions.FormClose(Sender: TObject; 63 var CloseAction: TCloseAction); 64 begin 65 Core.PersistentForm1.Save(Self); 66 end; 67 68 procedure TFormTargetOptions.FormCreate(Sender: TObject); 69 begin 70 Core.CoolTranslator1.TranslateComponentRecursive(Self); 71 end; 72 73 procedure TFormTargetOptions.FormShow(Sender: TObject); 74 begin 75 Core.PersistentForm1.Load(Self); 53 76 end; 54 77 -
trunk/Forms/UFormTargets.lfm
r50 r92 1 object Form Compilers: TFormCompilers1 object FormTargets: TFormTargets 2 2 Left = 292 3 3 Height = 344 … … 7 7 ClientHeight = 344 8 8 ClientWidth = 574 9 DesignTimePPI = 120 9 10 OnShow = FormShow 10 LCLVersion = '1. 1'11 LCLVersion = '1.8.2.0' 11 12 object ListView1: TListView 12 13 Left = 8 … … 35 36 OnData = ListView1Data 36 37 OnDblClick = ListView1DblClick 38 OnKeyPress = ListView1KeyPress 37 39 end 38 40 end -
trunk/Forms/UFormTargets.pas
r51 r92 10 10 type 11 11 12 { TForm Compilers }12 { TFormTargets } 13 13 14 TForm Compilers = class(TForm)14 TFormTargets = class(TForm) 15 15 ListView1: TListView; 16 16 procedure FormShow(Sender: TObject); 17 17 procedure ListView1Data(Sender: TObject; Item: TListItem); 18 18 procedure ListView1DblClick(Sender: TObject); 19 procedure ListView1KeyPress(Sender: TObject; var Key: char); 19 20 private 20 21 { private declarations } … … 24 25 25 26 var 26 Form Compilers: TFormCompilers;27 FormTargets: TFormTargets; 27 28 28 29 implementation … … 33 34 UCore, UTarget, UFormTargetOptions; 34 35 35 { TForm Compilers }36 { TFormTargets } 36 37 37 procedure TForm Compilers.FormShow(Sender: TObject);38 procedure TFormTargets.FormShow(Sender: TObject); 38 39 begin 39 40 ReloadList; 40 41 end; 41 42 42 procedure TForm Compilers.ListView1Data(Sender: TObject; Item: TListItem);43 procedure TFormTargets.ListView1Data(Sender: TObject; Item: TListItem); 43 44 begin 44 45 if (Item.Index >= 0) and (Item.Index < Core.Targets.Count) then … … 51 52 end; 52 53 53 procedure TForm Compilers.ListView1DblClick(Sender: TObject);54 procedure TFormTargets.ListView1DblClick(Sender: TObject); 54 55 begin 55 FormTargetOptions.LoadControls(TTarget(ListView1.Selected.Data)); 56 if FormTargetOptions.ShowModal = mrOk then begin 57 FormTargetOptions.SaveControls(TTarget(ListView1.Selected.Data)); 58 ReloadList; 56 FormTargetOptions := TFormTargetOptions.Create(nil); 57 try 58 FormTargetOptions.LoadControls(TTarget(ListView1.Selected.Data)); 59 if FormTargetOptions.ShowModal = mrOk then begin 60 FormTargetOptions.SaveControls(TTarget(ListView1.Selected.Data)); 61 ReloadList; 62 end; 63 finally 64 FormTargetOptions.Free; 59 65 end; 60 66 end; 61 67 62 procedure TFormCompilers.ReloadList; 68 procedure TFormTargets.ListView1KeyPress(Sender: TObject; var Key: char); 69 begin 70 if Key = #13 then ListView1DblClick(nil); 71 end; 72 73 procedure TFormTargets.ReloadList; 63 74 begin 64 75 ListView1.Items.Count := Core.Targets.Count;
Note:
See TracChangeset
for help on using the changeset viewer.