Changeset 12 for trunk/UFormMain.pas
- Timestamp:
- Apr 28, 2016, 5:35:05 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UFormMain.pas
r10 r12 87 87 procedure TrayIcon1Click(Sender: TObject); 88 88 private 89 FAlwaysOnTop: Boolean; 90 procedure SetAlwaysOnTop(AValue: Boolean); 91 private 89 92 FoundAcronyms: TAcronymMeanings; 90 93 RegistryContext: TRegistryContext; … … 96 99 public 97 100 AcronymDb: TAcronymDb; 101 property AlwaysOnTop: Boolean read FAlwaysOnTop write SetAlwaysOnTop; 98 102 end; 99 103 … … 300 304 procedure TFormMain.ASettingsExecute(Sender: TObject); 301 305 begin 302 FormSettings.ShowModal; 306 FormSettings.Load; 307 if FormSettings.ShowModal = mrOk then 308 FormSettings.Save; 303 309 end; 304 310 … … 368 374 end; 369 375 376 procedure TFormMain.SetAlwaysOnTop(AValue: Boolean); 377 begin 378 if FAlwaysOnTop = AValue then Exit; 379 FAlwaysOnTop := AValue; 380 if FAlwaysOnTop then FormStyle := fsSystemStayOnTop 381 else FormStyle := fsNormal; 382 end; 383 370 384 procedure TFormMain.OpenRecentClick(Sender: TObject); 371 385 begin … … 422 436 CoolTranslator1.Language := CoolTranslator1.Languages.SearchByCode(ReadStringWithDefault('LanguageCode', '')) 423 437 else CoolTranslator1.Language := CoolTranslator1.Languages.SearchByCode(''); 438 AlwaysOnTop := ReadBoolWithDefault('AlwaysOnTop', False); 424 439 finally 425 440 Free; … … 438 453 WriteString('LanguageCode', CoolTranslator1.Language.Code) 439 454 else DeleteValue('LanguageCode'); 455 WriteBool('AlwaysOnTop', AlwaysOnTop); 440 456 finally 441 457 Free;
Note:
See TracChangeset
for help on using the changeset viewer.