Changeset 83
- Timestamp:
- Aug 8, 2016, 10:25:19 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormMain.pas
r82 r83 120 120 procedure TrayIcon1Click(Sender: TObject); 121 121 private 122 Initialized: Boolean; 122 InitializeStarted: Boolean; 123 InitializeFinished: Boolean; 123 124 FAlwaysOnTop: Boolean; 124 125 RegistryContext: TRegistryContext; … … 179 180 begin 180 181 AcronymDb := TAcronymDb.Create; 181 Initialized := False; 182 InitializeStarted := False; 183 InitializeFinished := False; 182 184 for I := 0 to ToolBar1.ButtonCount - 1 do 183 185 ToolBar1.Buttons[I].Hint := ToolBar1.Buttons[I].Caption; … … 191 193 procedure TFormMain.FormHide(Sender: TObject); 192 194 begin 193 PersistentForm1.Save(Self);195 if InitializeFinished then PersistentForm1.Save(Self); 194 196 end; 195 197 … … 382 384 Initialize; 383 385 384 PersistentForm1.Load(Self); 385 UpdateInterface; 386 ListViewFilter1.StringGrid.Col := 1; 387 ListViewFilter1.StringGrid.Col := 0; 388 ListViewFilter1.StringGrid.Row := 0; 389 ListViewFilter1.StringGrid.SetFocus; 386 if Visible then begin 387 PersistentForm1.Load(Self); 388 UpdateInterface; 389 ListViewFilter1.StringGrid.Col := 1; 390 ListViewFilter1.StringGrid.Col := 0; 391 ListViewFilter1.StringGrid.Row := 0; 392 ListViewFilter1.StringGrid.SetFocus; 393 end; 390 394 end; 391 395 … … 487 491 FileNameOption: string; 488 492 begin 489 if not Initialize d then begin490 Initialize d := True;493 if not InitializeStarted then begin 494 InitializeStarted := True; 491 495 LoadConfig; 492 496 … … 526 530 UpdateAcronymsList; 527 531 ListViewFilter1.UpdateFromListView(ListViewAcronyms); 532 InitializeFinished := True; 528 533 end; 529 534 end; … … 604 609 if Assigned(AcronymDb) then begin 605 610 ListViewSort1.Refresh; 606 end else ListViewSort1.List.Clear; 611 end else begin 612 ListViewSort1.List.Clear; 613 ListViewAcronyms.Items.Count := 0; 614 ListViewAcronyms.Refresh; 615 end; 607 616 end; 608 617 … … 694 703 OpenKey(RegistryRunKey, True); 695 704 if StartOnLogon then begin 696 if StartMinimizedToTray then WriteString('Acronym Decoder', Application.ExeName + ' /t')705 if StartMinimizedToTray then WriteString('Acronym Decoder', Application.ExeName + ' ' + Application.OptionChar + 't') 697 706 else WriteString('Acronym Decoder', Application.ExeName) 698 707 end else DeleteValue('Acronym Decoder');
Note:
See TracChangeset
for help on using the changeset viewer.