Changeset 37 for trunk/UCore.pas
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:ignore
-
old new 3 3 lib 4 4 backup 5 LibrePaint.exe 6 *.lrj
-
- Property svn:ignore
-
trunk/UCore.pas
r36 r37 6 6 7 7 uses 8 Classes, SysUtils, FileUtil, ActnList, UProject, UFGraphics, UPersistentForm, 9 Controls, Graphics, ExtDlgs, ExtCtrls, URegistry, UApplicationInfo, Registry; 8 Classes, SysUtils, FileUtil, ActnList, UProject, UCoolTranslator, UFGraphics, 9 UPersistentForm, Controls, Graphics, ExtDlgs, ExtCtrls, URegistry, 10 UApplicationInfo, Registry; 10 11 11 12 const … … 16 17 17 18 TCore = class(TDataModule) 19 ASettings: TAction; 18 20 AToolMove: TAction; 19 21 AToolPen: TAction; … … 36 38 AFileNew: TAction; 37 39 ActionList1: TActionList; 40 CoolTranslator1: TCoolTranslator; 38 41 ImageList1: TImageList; 39 42 OpenPictureDialog1: TOpenPictureDialog; … … 52 55 procedure AImageNegativeExecute(Sender: TObject); 53 56 procedure AImageRandomExecute(Sender: TObject); 57 procedure ASettingsExecute(Sender: TObject); 54 58 procedure AToolMoveExecute(Sender: TObject); 55 59 procedure AToolPenExecute(Sender: TObject); … … 82 86 uses 83 87 UFormNew, UFormMain, Forms, UColorRGBA8, UColorGray8, UColorGray1, UColorGray4, 84 UColorRGB565 ;88 UColorRGB565, UFormSettings; 85 89 86 90 { TCore } … … 151 155 LastImageSize.X := ReadIntegerWithDefault('LastImageSizeX', 600); 152 156 LastImageSize.Y := ReadIntegerWithDefault('LastImageSizeY', 400); 157 if ValueExists('LanguageCode') then 158 CoolTranslator1.Language := CoolTranslator1.Languages.SearchByCode(ReadStringWithDefault('LanguageCode', '')) 159 else CoolTranslator1.Language := CoolTranslator1.Languages.SearchByCode(''); 153 160 finally 154 161 Free; … … 166 173 WriteInteger('LastImageSizeX', LastImageSize.X); 167 174 WriteInteger('LastImageSizeY', LastImageSize.Y); 175 if Assigned(CoolTranslator1.Language) and (CoolTranslator1.Language.Code <> '') then 176 WriteString('LanguageCode', CoolTranslator1.Language.Code) 177 else DeleteValue('LanguageCode'); 168 178 finally 169 179 Free; … … 300 310 end; 301 311 312 procedure TCore.ASettingsExecute(Sender: TObject); 313 begin 314 FormSettings := TFormSettings.Create(nil); 315 try 316 FormSettings.Load; 317 if FormSettings.ShowModal = mrOk then begin 318 FormSettings.Save; 319 end; 320 finally 321 FormSettings.Free; 322 end; 323 end; 324 302 325 procedure TCore.AToolMoveExecute(Sender: TObject); 303 326 begin
Note:
See TracChangeset
for help on using the changeset viewer.