Changeset 220 for trunk/Forms
- Timestamp:
- Jan 17, 2025, 9:39:06 PM (5 days ago)
- Location:
- trunk/Forms
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/FormMain.lfm
r219 r220 1 1 object FormMain: TFormMain 2 2 Left = 417 3 Height = 7133 Height = 679 4 4 Top = 453 5 5 Width = 1106 6 6 Caption = 'Acronym Decoder' 7 ClientHeight = 7137 ClientHeight = 679 8 8 ClientWidth = 1106 9 9 DesignTimePPI = 144 … … 12 12 OnCloseQuery = FormCloseQuery 13 13 OnCreate = FormCreate 14 OnDestroy = FormDestroy 14 15 OnHide = FormHide 15 16 OnResize = FormResize … … 18 19 object PanelMain: TPanel 19 20 Left = 0 20 Height = 60421 Height = 570 21 22 Top = 81 22 23 Width = 1106 23 24 Align = alClient 24 25 BevelOuter = bvNone 25 ClientHeight = 60426 ClientHeight = 570 26 27 ClientWidth = 1106 27 28 ParentFont = False … … 37 38 object ListViewAcronyms: TListView 38 39 Left = 5 39 Height = 5 4840 Height = 514 40 41 Top = 50 41 42 Width = 1095 … … 157 158 Width = 120 158 159 end> 159 Images = Core.ImageList 1160 Images = Core.ImageListSmall 160 161 ParentFont = False 161 162 object ToolBarFile: TToolBar … … 173 174 EdgeInner = esNone 174 175 EdgeOuter = esNone 175 Images = Core.ImageList 1176 Images = Core.ImageListSmall 176 177 ParentFont = False 177 178 ParentShowHint = False … … 216 217 EdgeInner = esNone 217 218 EdgeOuter = esNone 218 Images = Core.ImageList 1219 Images = Core.ImageListSmall 219 220 ParentFont = False 220 221 ParentShowHint = False … … 257 258 EdgeInner = esNone 258 259 EdgeOuter = esNone 259 Images = Core.ImageList 1260 Images = Core.ImageListSmall 260 261 ParentFont = False 261 262 ParentShowHint = False … … 288 289 EdgeInner = esNone 289 290 EdgeOuter = esNone 290 Images = Core.ImageList 1291 Images = Core.ImageListSmall 291 292 ParentFont = False 292 293 ParentShowHint = False … … 317 318 Left = 0 318 319 Height = 28 319 Top = 6 85320 Top = 651 320 321 Width = 1106 321 322 Panels = < … … 330 331 end 331 332 object ActionList1: TActionList 332 Images = Core.ImageList 1333 Images = Core.ImageListSmall 333 334 Left = 708 334 335 Top = 288 335 336 object AExit: TAction 337 Category = 'File' 336 338 Caption = 'Exit' 337 339 ImageIndex = 2 … … 347 349 end 348 350 object AImport: TAction 351 Category = 'Tools' 349 352 Caption = 'Import' 350 353 OnExecute = AImportExecute 351 354 end 352 355 object AFileOpen: TAction 356 Category = 'File' 353 357 Caption = 'Open' 354 358 ImageIndex = 8 … … 357 361 end 358 362 object AFileNew: TAction 363 Category = 'File' 359 364 Caption = 'New' 360 365 ImageIndex = 16 … … 363 368 end 364 369 object AFileSave: TAction 370 Category = 'File' 365 371 Caption = 'Save' 366 372 ImageIndex = 10 … … 369 375 end 370 376 object AFileClose: TAction 377 Category = 'File' 371 378 Caption = 'Close' 372 379 ImageIndex = 12 … … 374 381 end 375 382 object AFileSaveAs: TAction 383 Category = 'File' 376 384 Caption = 'Save as...' 377 385 ImageIndex = 10 … … 380 388 end 381 389 object ASettings: TAction 390 Category = 'Tools' 382 391 Caption = 'Settings' 383 392 ImageIndex = 6 … … 386 395 end 387 396 object AShowCategories: TAction 397 Category = 'View' 388 398 Caption = 'Categories' 389 399 ImageIndex = 11 … … 392 402 end 393 403 object AShowAcronyms: TAction 404 Category = 'View' 394 405 Caption = 'Acronyms' 395 406 ImageIndex = 15 … … 398 409 end 399 410 object AShowImportSources: TAction 411 Category = 'View' 400 412 Caption = 'Import sources' 401 413 ImageIndex = 13 … … 404 416 end 405 417 object AShowAbout: TAction 418 Category = 'Help' 406 419 Caption = 'About' 407 420 ImageIndex = 7 … … 409 422 end 410 423 object AShowImportFormats: TAction 424 Category = 'View' 411 425 Caption = 'Import formats' 412 426 ImageIndex = 14 … … 415 429 end 416 430 object AProcessImports: TAction 431 Category = 'Tools' 417 432 Caption = 'Process imports' 418 433 ImageIndex = 5 … … 421 436 end 422 437 object AExport: TAction 438 Category = 'Tools' 423 439 Caption = 'Export' 424 440 OnExecute = AExportExecute … … 452 468 end 453 469 object ADocumentCheck: TAction 470 Category = 'Tools' 454 471 Caption = 'Document check' 455 472 ImageIndex = 20 456 473 OnExecute = ADocumentCheckExecute 457 474 end 475 object AShowKeyShortCuts: TAction 476 Category = 'Help' 477 Caption = 'Key shortcuts' 478 ImageIndex = 21 479 OnExecute = AShowKeyShortcutsExecute 480 end 481 object AFullScreen: TAction 482 Category = 'View' 483 Caption = 'Full screen' 484 ImageIndex = 22 485 OnExecute = AFullScreenExecute 486 ShortCut = 122 487 end 458 488 end 459 489 object MainMenu1: TMainMenu 460 Images = Core.ImageList 1490 Images = Core.ImageListSmall 461 491 Left = 712 462 492 Top = 204 … … 505 535 Caption = '-' 506 536 end 537 object MenuItem29: TMenuItem 538 Action = AFullScreen 539 end 507 540 object MenuItemToolbar: TMenuItem 508 541 Caption = 'Toolbar' … … 541 574 object MenuItem5: TMenuItem 542 575 Caption = 'Help' 576 object MenuItem28: TMenuItem 577 Action = AShowKeyShortCuts 578 end 543 579 object MenuItem6: TMenuItem 544 580 Action = AShowAbout … … 574 610 end 575 611 object PopupMenuOpenRecent: TPopupMenu 576 Images = Core.ImageList 1612 Images = Core.ImageListSmall 577 613 Left = 120 578 614 Top = 420 -
trunk/Forms/FormMain.lrj
r219 r220 27 27 {"hash":267425709,"name":"tformmain.amanageacronym.caption","sourcebytes":[77,97,110,97,103,101,32,97,99,114,111,110,121,109],"value":"Manage acronym"}, 28 28 {"hash":63286139,"name":"tformmain.adocumentcheck.caption","sourcebytes":[68,111,99,117,109,101,110,116,32,99,104,101,99,107],"value":"Document check"}, 29 {"hash":122803571,"name":"tformmain.ashowkeyshortcuts.caption","sourcebytes":[75,101,121,32,115,104,111,114,116,99,117,116,115],"value":"Key shortcuts"}, 30 {"hash":131549534,"name":"tformmain.afullscreen.caption","sourcebytes":[70,117,108,108,32,115,99,114,101,101,110],"value":"Full screen"}, 29 31 {"hash":315429,"name":"tformmain.menuitem8.caption","sourcebytes":[70,105,108,101],"value":"File"}, 30 32 {"hash":131987540,"name":"tformmain.menuitemopenrecent.caption","sourcebytes":[79,112,101,110,32,114,101,99,101,110,116],"value":"Open recent"}, -
trunk/Forms/FormMain.pas
r219 r220 7 7 ComCtrls, StdCtrls, ExtCtrls, ActnList, Grids, Acronym, PersistentForm, 8 8 RegistryEx, LastOpenedList, ListViewSort, JobProgressView, FormAbout, 9 Registry, Generics.Collections, LazUTF8, LazFileUtils, FormEx; 9 Registry, Generics.Collections, LazUTF8, LazFileUtils, FormEx, 10 FormKeyShortcuts; 10 11 11 12 type … … 14 15 15 16 TFormMain = class(TFormEx) 17 AFullScreen: TAction; 18 AShowKeyShortCuts: TAction; 16 19 AFilterShowItemsWithoutFilter: TAction; 17 20 ADocumentCheck: TAction; … … 53 56 MenuItem26: TMenuItem; 54 57 MenuItem27: TMenuItem; 58 MenuItem28: TMenuItem; 59 MenuItem29: TMenuItem; 55 60 N1: TMenuItem; 56 61 MenuItem3: TMenuItem; … … 117 122 procedure AFilterSameLengthExecute(Sender: TObject); 118 123 procedure AFilterShowItemsWithoutFilterExecute(Sender: TObject); 124 procedure AFullScreenExecute(Sender: TObject); 119 125 procedure AHideExecute(Sender: TObject); 120 126 procedure AImportExecute(Sender: TObject); … … 129 135 procedure AShowImportSourcesExecute(Sender: TObject); 130 136 procedure EditSearchChange(Sender: TObject); 137 procedure FormDestroy(Sender: TObject); 131 138 procedure FormHide(Sender: TObject); 132 139 procedure FormResize(Sender: TObject); … … 147 154 procedure MenuItemStatusBarClick(Sender: TObject); 148 155 procedure MenuItemToolbarClick(Sender: TObject); 156 procedure AShowKeyShortcutsExecute(Sender: TObject); 149 157 private 158 FullScreen: Boolean; 150 159 RegistryContext: TRegistryContext; 151 160 ProjectClosed: Boolean; 152 161 ImportTotalItemCount: Integer; 162 FormKeyShortcuts: TFormKeyShortcuts; 153 163 procedure AcronymDbUpdate(Sender: TObject); 154 164 function FilterCell(Text1, Text2: string): Boolean; … … 165 175 end; 166 176 177 const 178 ProjectExt = '.adp'; 179 167 180 resourcestring 168 181 SAddedCount = 'Imported %d acronyms. Added %d new.'; … … 170 183 SAcronymsCount = 'Acronyms count: %d'; 171 184 SMeaningsCount = 'Meanings count: %d'; 172 SFileFilter = 'Acronym Decoder project ( .adp)|*.adp|All files|*.*';185 SFileFilter = 'Acronym Decoder project (' + ProjectExt + ')|*' + ProjectExt + '|All files|*.*'; 173 186 174 187 … … 187 200 188 201 const 189 ProjectExt = '.adp';190 202 DefaultFileName = 'Acronyms' + ProjectExt; 191 203 RegistryRunKey = '\Software\Microsoft\Windows\CurrentVersion\Run'; … … 220 232 begin 221 233 UpdateAcronymsList; 234 end; 235 236 procedure TFormMain.FormDestroy(Sender: TObject); 237 begin 238 if Assigned(FormKeyShortcuts) then FreeAndNil(FormKeyShortcuts); 222 239 end; 223 240 … … 371 388 end; 372 389 390 procedure TFormMain.AFullScreenExecute(Sender: TObject); 391 begin 392 FullScreen := not FullScreen; 393 TFormEx.PersistentForm.Form := Self; 394 TFormEx.PersistentForm.SetFullScreen(FullScreen); 395 UpdateInterface; 396 end; 397 373 398 procedure TFormMain.AHideExecute(Sender: TObject); 374 399 begin … … 530 555 procedure TFormMain.FormShow(Sender: TObject); 531 556 begin 557 FullScreen := Core.Core.PersistentForm1.FormFullScreen; 532 558 Core.Core.Initialize; 533 559 … … 594 620 if ListViewSort1.Order = soDown then Result := -Result; 595 621 end else Result := 0; 622 end; 623 624 procedure TFormMain.AShowKeyShortcutsExecute(Sender: TObject); 625 begin 626 if not Assigned(FormKeyShortcuts) then 627 FormKeyShortcuts := TFormKeyShortcuts.Create(nil); 628 with FormKeyShortcuts do begin 629 Images := Core.Core.ImageListSmall; 630 SourceComponents.Clear; 631 SourceComponents.Add(Self); 632 Show; 633 end; 596 634 end; 597 635 … … 708 746 Title: string; 709 747 begin 748 AFullscreen.Checked := FullScreen; 710 749 ListViewAcronyms.Enabled := Assigned(Core.Core.AcronymDb); 711 750 AFileClose.Enabled := Assigned(Core.Core.AcronymDb);
Note:
See TracChangeset
for help on using the changeset viewer.