- Timestamp:
- Nov 26, 2016, 11:33:19 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormAbout.lfm
r115 r123 13 13 object LabelAppName: TLabel 14 14 Left = 20 15 Height = 5 415 Height = 55 16 16 Top = 20 17 17 Width = 433 … … 25 25 object LabelDescription: TLabel 26 26 Left = 20 27 Height = 4 028 Top = 9 427 Height = 48 28 Top = 95 29 29 Width = 433 30 30 Align = alTop … … 46 46 object LabelContent: TLabel 47 47 Left = 20 48 Height = 2 049 Top = 1 5448 Height = 24 49 Top = 163 50 50 Width = 433 51 51 Align = alTop … … 74 74 EmailContact = 'robie@centrum.cz' 75 75 AppName = 'Acronym Decoder' 76 ReleaseDate = 42 67676 ReleaseDate = 42700 77 77 RegistryKey = '\Software\' 78 78 RegistryRoot = rrKeyCurrentUser -
trunk/Forms/UFormAcronyms.lfm
r109 r123 7 7 ClientHeight = 558 8 8 ClientWidth = 740 9 OnClose = FormClose 9 10 OnCreate = FormCreate 10 11 OnShow = FormShow … … 31 32 item 32 33 Caption = 'Categories' 33 Width = 3 0534 Width = 312 34 35 end> 35 36 MultiSelect = True -
trunk/Forms/UFormAcronyms.pas
r104 r123 36 36 procedure ARemoveExecute(Sender: TObject); 37 37 procedure ASelectAllExecute(Sender: TObject); 38 procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); 38 39 procedure FormCreate(Sender: TObject); 39 40 procedure FormShow(Sender: TObject); … … 110 111 procedure TFormAcronyms.FormShow(Sender: TObject); 111 112 begin 113 Core.PersistentForm1.Load(Self); 112 114 ListViewFilter1.UpdateFromListView(ListViewAcronyms); 113 115 UpdateAcronymsList; … … 223 225 end; 224 226 227 procedure TFormAcronyms.FormClose(Sender: TObject; var CloseAction: TCloseAction 228 ); 229 begin 230 Core.PersistentForm1.Save(Self); 231 end; 232 225 233 procedure TFormAcronyms.FormCreate(Sender: TObject); 226 234 var -
trunk/Forms/UFormCategories.lfm
r109 r123 7 7 ClientHeight = 429 8 8 ClientWidth = 784 9 OnClose = FormClose 9 10 OnCreate = FormCreate 10 11 OnShow = FormShow … … 25 26 item 26 27 Caption = 'Used count' 27 Width = 4 4028 Width = 456 28 29 end> 29 30 MultiSelect = True -
trunk/Forms/UFormCategories.pas
r104 r123 33 33 procedure ARemoveExecute(Sender: TObject); 34 34 procedure ASelectAllExecute(Sender: TObject); 35 procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); 35 36 procedure FormCreate(Sender: TObject); 36 37 procedure FormShow(Sender: TObject); … … 69 70 procedure TFormCategories.FormShow(Sender: TObject); 70 71 begin 72 Core.PersistentForm1.Load(Self); 71 73 UpdateList; 72 74 Core.ScaleDPI1.ScaleControl(ToolBar1, Core.ScaleDPI1.DesignDPI); … … 126 128 end; 127 129 130 procedure TFormCategories.FormClose(Sender: TObject; 131 var CloseAction: TCloseAction); 132 begin 133 Core.PersistentForm1.Save(Self); 134 end; 135 128 136 procedure TFormCategories.FormCreate(Sender: TObject); 129 137 var -
trunk/Forms/UFormImportFormat.lfm
r109 r123 7 7 ClientHeight = 439 8 8 ClientWidth = 629 9 OnClose = FormClose 9 10 OnCreate = FormCreate 10 11 OnShow = FormShow … … 33 34 object Label1: TLabel 34 35 Left = 20 35 Height = 2 536 Height = 24 36 37 Top = 53 37 Width = 5 138 Width = 56 38 39 Caption = 'Name:' 39 40 ParentColor = False … … 41 42 object EditName: TEdit 42 43 Left = 179 43 Height = 3 344 Height = 34 44 45 Top = 48 45 46 Width = 426 … … 49 50 object Label8: TLabel 50 51 Left = 20 51 Height = 2 552 Height = 24 52 53 Top = 90 53 Width = 8654 Width = 97 54 55 Caption = 'Block start:' 55 56 ParentColor = False … … 57 58 object EditBlockStart: TEdit 58 59 Left = 179 59 Height = 3 360 Height = 34 60 61 Top = 85 61 62 Width = 426 … … 65 66 object Label9: TLabel 66 67 Left = 20 67 Height = 2 568 Height = 24 68 69 Top = 130 69 Width = 8 170 Width = 89 70 71 Caption = 'Block end:' 71 72 ParentColor = False … … 73 74 object EditBlockEnd: TEdit 74 75 Left = 179 75 Height = 3 376 Height = 34 76 77 Top = 125 77 78 Width = 426 … … 104 105 item 105 106 Caption = 'Repetition' 106 Width = 1 00107 Width = 165 107 108 end> 108 109 OwnerData = True … … 117 118 object Label2: TLabel 118 119 Left = 20 119 Height = 2 5120 Height = 24 120 121 Top = 157 121 Width = 82122 Width = 92 122 123 Caption = 'Item rules:' 123 124 ParentColor = False … … 125 126 object Label3: TLabel 126 127 Left = 20 127 Height = 2 5128 Height = 24 128 129 Top = 13 129 Width = 4 2130 Width = 45 130 131 Caption = 'Type:' 131 132 ParentColor = False … … 133 134 object ComboBoxType: TComboBox 134 135 Left = 179 135 Height = 3 3136 Height = 38 136 137 Top = 13 137 138 Width = 197 138 ItemHeight = 25139 ItemHeight = 0 139 140 Items.Strings = ( 140 141 'Text parse HTTP' -
trunk/Forms/UFormImportFormat.pas
r96 r123 43 43 procedure AMoveUpExecute(Sender: TObject); 44 44 procedure ARemoveExecute(Sender: TObject); 45 procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); 45 46 procedure FormCreate(Sender: TObject); 46 47 procedure FormShow(Sender: TObject); … … 151 152 end; 152 153 154 procedure TFormImportFormat.FormClose(Sender: TObject; 155 var CloseAction: TCloseAction); 156 begin 157 Core.PersistentForm1.Save(Self); 158 end; 159 153 160 procedure TFormImportFormat.FormCreate(Sender: TObject); 154 161 begin … … 160 167 procedure TFormImportFormat.FormShow(Sender: TObject); 161 168 begin 169 Core.PersistentForm1.Load(Self); 162 170 ReloadList; 163 171 end; -
trunk/Forms/UFormImportFormats.lfm
r109 r123 7 7 ClientHeight = 414 8 8 ClientWidth = 591 9 OnClose = FormClose 9 10 OnCreate = FormCreate 10 11 OnShow = FormShow … … 21 22 item 22 23 Caption = 'Name' 23 Width = 5 5724 Width = 563 24 25 end> 25 26 MultiSelect = True -
trunk/Forms/UFormImportFormats.pas
r104 r123 30 30 procedure AModifyExecute(Sender: TObject); 31 31 procedure ARemoveExecute(Sender: TObject); 32 procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); 32 33 procedure FormCreate(Sender: TObject); 33 34 procedure FormShow(Sender: TObject); … … 103 104 procedure TFormImportFormats.FormShow(Sender: TObject); 104 105 begin 106 Core.PersistentForm1.Load(Self); 105 107 UpdateList; 106 108 Core.ScaleDPI1.ScaleControl(ToolBar1, Core.ScaleDPI1.DesignDPI); … … 177 179 end; 178 180 181 procedure TFormImportFormats.FormClose(Sender: TObject; 182 var CloseAction: TCloseAction); 183 begin 184 Core.PersistentForm1.Save(Self); 185 end; 186 179 187 procedure TFormImportFormats.FormCreate(Sender: TObject); 180 188 var -
trunk/Forms/UFormImportSource.lfm
r109 r123 7 7 ClientHeight = 459 8 8 ClientWidth = 620 9 OnClose = FormClose 9 10 OnCreate = FormCreate 10 11 OnShow = FormShow … … 13 14 object EditName: TEdit 14 15 Left = 135 15 Height = 3 316 Height = 34 16 17 Top = 10 17 18 Width = 471 … … 21 22 object Label1: TLabel 22 23 Left = 10 23 Height = 2 524 Height = 24 24 25 Top = 9 25 Width = 5 126 Width = 56 26 27 Caption = 'Name:' 27 28 ParentColor = False … … 29 30 object Label2: TLabel 30 31 Left = 10 31 Height = 2 532 Height = 24 32 33 Top = 49 33 Width = 9434 Width = 101 34 35 Caption = 'Source URL:' 35 36 ParentColor = False … … 37 38 object EditURL: TEdit 38 39 Left = 136 39 Height = 3 340 Height = 34 40 41 Top = 49 41 42 Width = 350 … … 65 66 object Label3: TLabel 66 67 Left = 10 67 Height = 2 568 Height = 24 68 69 Top = 96 69 Width = 10 070 Width = 108 70 71 Caption = 'Data format:' 71 72 ParentColor = False … … 73 74 object ComboBox1: TComboBox 74 75 Left = 135 75 Height = 3 376 Height = 38 76 77 Top = 91 77 78 Width = 350 78 79 Anchors = [akTop, akLeft, akRight] 79 ItemHeight = 2580 ItemHeight = 0 80 81 Style = csDropDownList 81 82 TabOrder = 2 … … 93 94 object CheckBoxEnabled: TCheckBox 94 95 Left = 10 95 Height = 2 996 Height = 28 96 97 Top = 128 97 Width = 9 398 Width = 92 98 99 Caption = 'Enabled' 99 100 TabOrder = 4 … … 101 102 object Label4: TLabel 102 103 Left = 10 103 Height = 2 5104 Height = 24 104 105 Top = 160 105 Width = 88106 Width = 96 106 107 Caption = 'Categories:' 107 108 ParentColor = False … … 116 117 MultiSelect = True 117 118 PopupMenu = PopupMenuCategory 118 ScrollWidth = 358119 ScrollWidth = 469 119 120 TabOrder = 5 121 TopIndex = -1 120 122 end 121 123 object Button1: TButton … … 144 146 object Label5: TLabel 145 147 Left = 10 146 Height = 2 5148 Height = 24 147 149 Top = 352 148 Width = 88150 Width = 97 149 151 Caption = 'User name:' 150 152 ParentColor = False … … 152 154 object Label6: TLabel 153 155 Left = 305 154 Height = 2 5156 Height = 24 155 157 Top = 351 156 Width = 8 0158 Width = 87 157 159 Caption = 'Password:' 158 160 ParentColor = False … … 160 162 object EditUserName: TEdit 161 163 Left = 136 162 Height = 3 3164 Height = 34 163 165 Top = 351 164 166 Width = 153 … … 167 169 object EditPassword: TEdit 168 170 Left = 436 169 Height = 3 3171 Height = 34 170 172 Top = 351 171 173 Width = 153 -
trunk/Forms/UFormImportSource.pas
r96 r123 44 44 procedure ButtonOpenURLClick(Sender: TObject); 45 45 procedure ButtonShowFormatClick(Sender: TObject); 46 procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); 46 47 procedure FormCreate(Sender: TObject); 47 48 procedure FormShow(Sender: TObject); … … 89 90 end; 90 91 92 procedure TFormImportSource.FormClose(Sender: TObject; 93 var CloseAction: TCloseAction); 94 begin 95 Core.PersistentForm1.Save(Self); 96 end; 97 91 98 procedure TFormImportSource.FormCreate(Sender: TObject); 92 99 begin … … 96 103 procedure TFormImportSource.FormShow(Sender: TObject); 97 104 begin 105 Core.PersistentForm1.Load(Self); 98 106 UpdateInterface; 99 107 end; -
trunk/Forms/UFormImportSources.lfm
r109 r123 7 7 ClientHeight = 414 8 8 ClientWidth = 812 9 OnClose = FormClose 9 10 OnCreate = FormCreate 10 11 OnShow = FormShow … … 72 73 item 73 74 Caption = 'Date' 74 Width = 1 0075 Width = 114 75 76 end> 76 77 MultiSelect = True -
trunk/Forms/UFormImportSources.pas
r104 r123 44 44 procedure AProcessExecute(Sender: TObject); 45 45 procedure ARemoveExecute(Sender: TObject); 46 procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); 46 47 procedure FormCreate(Sender: TObject); 47 48 procedure FormShow(Sender: TObject); … … 171 172 procedure TFormImportSources.FormShow(Sender: TObject); 172 173 begin 174 Core.PersistentForm1.Load(Self); 173 175 UpdateList; 174 176 Core.ScaleDPI1.ScaleControl(ToolBar1, Core.ScaleDPI1.DesignDPI); … … 337 339 end; 338 340 341 procedure TFormImportSources.FormClose(Sender: TObject; 342 var CloseAction: TCloseAction); 343 begin 344 Core.PersistentForm1.Save(Self); 345 end; 346 339 347 procedure TFormImportSources.FormCreate(Sender: TObject); 340 348 var -
trunk/Packages/Common/UPersistentForm.pas
r3 r123 8 8 9 9 uses 10 Classes, SysUtils, Forms, URegistry, LCLIntf, Registry ;10 Classes, SysUtils, Forms, URegistry, LCLIntf, Registry, Controls, ComCtrls; 11 11 12 12 type … … 19 19 FMinVisiblePart: Integer; 20 20 FRegistryContext: TRegistryContext; 21 procedure LoadControl(Control: TControl); 22 procedure SaveControl(Control: TControl); 21 23 public 22 24 FormNormalSize: TRect; … … 49 51 50 52 { TPersistentForm } 53 54 procedure TPersistentForm.LoadControl(Control: TControl); 55 var 56 I: Integer; 57 WinControl: TWinControl; 58 Count: Integer; 59 begin 60 if Control is TListView then begin 61 with Form, TRegistryEx.Create do 62 try 63 RootKey := RegistryContext.RootKey; 64 OpenKey(RegistryContext.Key + '\Forms\' + Form.Name + '\' + Control.Name, True); 65 for I := 0 to TListView(Control).Columns.Count - 1 do begin 66 if ValueExists('ColWidth' + IntToStr(I)) then 67 TListView(Control).Columns[I].Width := ReadInteger('ColWidth' + IntToStr(I)); 68 end; 69 finally 70 Free; 71 end; 72 end; 73 74 if Control is TWinControl then begin 75 WinControl := TWinControl(Control); 76 if WinControl.ControlCount > 0 then begin 77 for I := 0 to WinControl.ControlCount - 1 do begin 78 if WinControl.Controls[I] is TControl then begin 79 LoadControl(WinControl.Controls[I]); 80 end; 81 end; 82 end; 83 end; 84 end; 85 86 procedure TPersistentForm.SaveControl(Control: TControl); 87 var 88 I: Integer; 89 WinControl: TWinControl; 90 begin 91 if Control is TListView then begin 92 with Form, TRegistryEx.Create do 93 try 94 RootKey := RegistryContext.RootKey; 95 OpenKey(RegistryContext.Key + '\Forms\' + Form.Name + '\' + Control.Name, True); 96 for I := 0 to TListView(Control).Columns.Count - 1 do begin 97 WriteInteger('ColWidth' + IntToStr(I), TListView(Control).Columns[I].Width); 98 end; 99 finally 100 Free; 101 end; 102 end; 103 104 if Control is TWinControl then begin 105 WinControl := TWinControl(Control); 106 if WinControl.ControlCount > 0 then begin 107 for I := 0 to WinControl.ControlCount - 1 do begin 108 if WinControl.Controls[I] is TControl then begin 109 SaveControl(WinControl.Controls[I]); 110 end; 111 end; 112 end; 113 end; 114 end; 51 115 52 116 procedure TPersistentForm.LoadFromRegistry(RegistryContext: TRegistryContext); … … 181 245 Form.BoundsRect := FormNormalSize; 182 246 end; 247 LoadControl(Form); 183 248 end; 184 249 … … 191 256 FormWindowState := Form.WindowState; 192 257 SaveToRegistry(RegistryContext); 258 SaveControl(Form); 193 259 end; 194 260
Note:
See TracChangeset
for help on using the changeset viewer.