Changeset 34 for trunk/Forms
- Timestamp:
- Dec 10, 2016, 10:00:19 PM (8 years ago)
- Location:
- trunk/Forms
- Files:
-
- 3 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormMain.lfm
r33 r34 19 19 Top = 0 20 20 Width = 1703 21 Caption = 'ToolBar1'22 21 Images = Core.ImageList1 23 22 TabOrder = 0 … … 482 481 OnExecute = AShowAboutExecute 483 482 end 483 object AShowSettings: TAction 484 Caption = 'Settings' 485 OnExecute = AShowSettingsExecute 486 end 484 487 end 485 488 object OpenDialog1: TOpenDialog … … 549 552 end 550 553 end 554 object MenuItem22: TMenuItem 555 Caption = 'Tools' 556 object MenuItem23: TMenuItem 557 Action = AShowSettings 558 end 559 end 551 560 object MenuItem20: TMenuItem 552 561 Caption = 'Help' -
trunk/Forms/UFormMain.lrt
r33 r34 1 1 TFORMMAIN.CAPTION=CoolDisk 2 TFORMMAIN.TOOLBAR1.CAPTION=ToolBar13 2 TFORMMAIN.LABEL1.CAPTION=Sector size: 4 3 TFORMMAIN.LABELSECTORSIZE.CAPTION= … … 43 42 TFORMMAIN.AOPERATIONADD.CAPTION=Add 44 43 TFORMMAIN.ASHOWABOUT.CAPTION=About 44 TFORMMAIN.ASHOWSETTINGS.CAPTION=Settings 45 45 TFORMMAIN.MENUITEM1.CAPTION=File 46 46 TFORMMAIN.MENUITEMOPENRECENT.CAPTION=Open recent … … 49 49 TFORMMAIN.MENUITEM14.CAPTION=- 50 50 TFORMMAIN.MENUITEM16.CAPTION=View 51 TFORMMAIN.MENUITEM22.CAPTION=Tools 51 52 TFORMMAIN.MENUITEM20.CAPTION=Help -
trunk/Forms/UFormMain.pas
r33 r34 15 15 16 16 TFormMain = class(TForm) 17 AShowSettings: TAction; 17 18 AShowAbout: TAction; 18 19 AOperationAdd: TAction; … … 80 81 MenuItem20: TMenuItem; 81 82 MenuItem21: TMenuItem; 83 MenuItem22: TMenuItem; 84 MenuItem23: TMenuItem; 82 85 MenuItemOpenRecent: TMenuItem; 83 86 MenuItem2: TMenuItem; … … 119 122 procedure AScanStopExecute(Sender: TObject); 120 123 procedure AShowAboutExecute(Sender: TObject); 124 procedure AShowSettingsExecute(Sender: TObject); 121 125 procedure AViewToolbarExecute(Sender: TObject); 122 126 procedure ComboBoxDriveChange(Sender: TObject); … … 162 166 163 167 uses 164 UCore, UFormProject, UFormOperation, UFormAbout ;168 UCore, UFormProject, UFormOperation, UFormAbout, UFormSettings; 165 169 166 170 resourcestring … … 180 184 Detect; 181 185 LoadConfig; 186 Core.LoadConfig; 182 187 Core.PersistentForm1.Load(Self); 183 188 if (LastOpenedList1.Items.Count > 0) and FileExists(LastOpenedList1.Items[0]) then … … 234 239 235 240 procedure TFormMain.AShowAboutExecute(Sender: TObject); 236 var237 FormAbout: TFormAbout;238 241 begin 239 242 FormAbout := TFormAbout.Create(nil); … … 243 246 finally 244 247 FreeAndNil(FormAbout); 248 end; 249 end; 250 251 procedure TFormMain.AShowSettingsExecute(Sender: TObject); 252 begin 253 FormSettings := TFormSettings.Create(nil); 254 try 255 FormSettings.Load; 256 if FormSettings.ShowModal = mrOK then 257 FormSettings.Save; 258 finally 259 FreeAndNil(FormSettings); 245 260 end; 246 261 end; … … 417 432 AFileClose.Execute; 418 433 SaveConfig; 434 Core.SaveConfig; 419 435 Core.PersistentForm1.Save(Self); 420 436 end;
Note:
See TracChangeset
for help on using the changeset viewer.