Changeset 65 for trunk/IDE/Forms
- Timestamp:
- Jul 18, 2012, 10:57:48 PM (12 years ago)
- Location:
- trunk/IDE/Forms
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IDE/Forms/UFormMain.lfm
r61 r65 5 5 Width = 695 6 6 Caption = 'Transpascal IDE' 7 ClientHeight = 4 827 ClientHeight = 476 8 8 ClientWidth = 695 9 9 Font.Height = -11 … … 20 20 Left = 0 21 21 Height = 5 22 Top = 47 722 Top = 471 23 23 Width = 695 24 24 Align = alBottom … … 89 89 object ComboBoxTarget: TComboBox 90 90 Left = 230 91 Height = 2 191 Height = 27 92 92 Top = 2 93 93 Width = 100 94 ItemHeight = 1394 ItemHeight = 0 95 95 OnChange = ComboBoxTargetChange 96 96 Style = csDropDownList … … 105 105 object Splitter1: TSplitter 106 106 Left = 490 107 Height = 3 45107 Height = 339 108 108 Top = 26 109 109 Width = 5 … … 113 113 object PageControlRight: TPageControl 114 114 Left = 495 115 Height = 3 45115 Height = 339 116 116 Top = 26 117 117 Width = 200 … … 137 137 Left = 0 138 138 Height = 101 139 Top = 37 6139 Top = 370 140 140 Width = 695 141 141 ActivePage = TabSheetMessages … … 155 155 Left = 0 156 156 Height = 5 157 Top = 3 71157 Top = 365 158 158 Width = 695 159 159 Align = alBottom … … 162 162 object PageControlMain: TPageControl 163 163 Left = 0 164 Height = 3 45164 Height = 339 165 165 Top = 26 166 166 Width = 490 … … 667 667 object MenuItem24: TMenuItem 668 668 Action = AViewTargets 669 Bitmap.Data = { 670 36040000424D3604000000000000360000002800000010000000100000000100 671 2000000000000004000064000000640000000000000000000000000000000000 672 000000000000000000000000000000000000000000000202022F020202FF0303 673 031F000000000000000000000000000000000000000000000000000000000000 674 000000000000000000000000000000000000000000000505053F050505FF0505 675 053F000000000000000000000000000000000000000000000000000000000000 676 00000000000000000000000000000909097F090909DF090909FF090909FF0909 677 09FF090909DF0909096F00000000000000000000000000000000000000000000 678 000000000000000000000D0D0D9F0C0C0CFF0C0C0CAF0B0B0B4F0C0C0CFF0B0B 679 0B4F0C0C0CAF0C0C0CFF0D0D0D9F000000000000000000000000000000000000 680 0000000000000F0F0F7F0F0F0FFF0E0E0E5F00000000000000000F0F0FFF0000 681 0000000000000E0E0E5F0F0F0FFF1010106F0000000000000000000000000000 682 000000000000131313DF131313AF000000000000000000000000131313FF0000 683 00000000000000000000131313AF131313DF0000000000000000000000001818 684 182F1818183F161616FF1616167F1818183F1818183F1818183F161616FF1818 685 183F1818183F1818183F1616167F161616FF1818183F1818181F1A1A1A1F1A1A 686 1AFF1A1A1AFF1A1A1AFF1A1A1AFF1A1A1AFF1A1A1AFF1A1A1AFF1A1A1ABF1A1A 687 1AFF1A1A1AFF1A1A1AFF1A1A1AFF1A1A1AFF1A1A1AFF1A1A1AFF000000001C1C 688 1C1F1C1C1C3F1D1D1DFF1D1D1D4F0000000000000000000000001D1D1DFF0000 689 000000000000000000001D1D1D4F1D1D1DFF1C1C1C3F1C1C1C1F000000000000 690 000000000000202020DF202020AF000000000000000000000000202020FF0000 691 00000000000000000000202020AF202020DF0000000000000000000000000000 692 0000000000002424247F242424FF2424245F0000000000000000242424FF0000 693 0000000000002424245F242424FF2424247F0000000000000000000000000000 694 000000000000000000002727279F272727FF282828AF2828284F272727FF2828 695 284F282828AF272727FF2727279F000000000000000000000000000000000000 696 00000000000000000000000000002A2A2A7F2A2A2ADF2B2B2BFF2B2B2BFF2B2B 697 2BFF2A2A2ADF2A2A2A7F00000000000000000000000000000000000000000000 698 000000000000000000000000000000000000000000002E2E2E3F2E2E2EFF2E2E 699 2E3F000000000000000000000000000000000000000000000000000000000000 700 000000000000000000000000000000000000000000003131312F313131FF3030 701 301F000000000000000000000000000000000000000000000000000000000000 702 0000000000000000000000000000000000000000000000000000000000000000 703 0000000000000000000000000000000000000000000000000000 704 } 669 705 end 670 706 end … … 877 913 end 878 914 end 879 object OpenDialog 1: TOpenDialog915 object OpenDialogProject: TOpenDialog 880 916 DefaultExt = '.tppr' 881 917 Filter = 'Project file (*.tppr)|*.tppr|Any file (*.*)|*.*' 882 918 left = 115 883 top = 5 2919 top = 54 884 920 end 885 object SaveDialog 1: TSaveDialog921 object SaveDialogProject: TSaveDialog 886 922 DefaultExt = '.tppr' 887 923 Filter = 'Project file (*.tppr)|*.tppr|Any file (*.*)|*.*' -
trunk/IDE/Forms/UFormMain.pas
r62 r65 7 7 uses 8 8 SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, 9 Registry,ComCtrls, ExtCtrls, SynEdit, SynHighlighterPas,9 ComCtrls, ExtCtrls, SynEdit, SynHighlighterPas, 10 10 UProject, FileUtil, Menus, ActnList, 11 UFormTargetCode, UFormCodeTree, U Registry, UApplicationInfo;11 UFormTargetCode, UFormCodeTree, UGeneralRegistry, UApplicationInfo; 12 12 13 13 type … … 81 81 MenuItem9: TMenuItem; 82 82 MenuItemOpenRecent: TMenuItem; 83 OpenDialog 1: TOpenDialog;83 OpenDialogProject: TOpenDialog; 84 84 PageControlMain: TPageControl; 85 85 PageControlRight: TPageControl; 86 86 PageControlBottom: TPageControl; 87 87 PopupMenu1: TPopupMenu; 88 SaveDialog 1: TSaveDialog;88 SaveDialogProject: TSaveDialog; 89 89 Splitter1: TSplitter; 90 90 Splitter2: TSplitter; … … 146 146 procedure ProducerProcessOutput(Text: string); 147 147 public 148 procedure LoadFromRegistry(Root: HKEY; Key: string);149 procedure SaveToRegistry(Root: HKEY; Key: string);148 procedure LoadFromRegistry(Root: Integer; Key: string); 149 procedure SaveToRegistry(Root: Integer; Key: string); 150 150 procedure OpenRecentClick(Sender: TObject); 151 151 function GetSource(Name: string; var SourceCode: string): Boolean; … … 397 397 end; 398 398 399 procedure TFormMain.LoadFromRegistry(Root: HKEY; Key: string);400 begin 401 with T RegistryEx.Createdo399 procedure TFormMain.LoadFromRegistry(Root: Integer; Key: string); 400 begin 401 with TGeneralRegistry.Create(nil) do 402 402 try 403 RootKey:= Root;403 CurrentRoot := Root; 404 404 OpenKey(Key, True); 405 PageControlRight.Width := ReadIntegerWithDefault('RightPanelWidth', 120); 406 PageControlBottom.Height := ReadIntegerWithDefault('BottomPanelHeight', 100); 405 if ValueExists('RightPanelWidth') then 406 PageControlRight.Width := ReadInteger('RightPanelWidth') 407 else PageControlRight.Width := 150; 408 if ValueExists('BottomPanelHeight') then 409 PageControlBottom.Height := ReadInteger('BottomPanelHeight') 410 else PageControlBottom.Height := 100; 407 411 finally 408 412 Free; … … 410 414 end; 411 415 412 procedure TFormMain.SaveToRegistry(Root: HKEY; Key: string);413 begin 414 with T RegistryEx.Createdo416 procedure TFormMain.SaveToRegistry(Root: Integer; Key: string); 417 begin 418 with TGeneralRegistry.Create(nil) do 415 419 try 416 RootKey:= Root;420 CurrentRoot := Root; 417 421 OpenKey(Key, True); 418 422 WriteInteger('RightPanelWidth', PageControlRight.Width); … … 468 472 begin 469 473 AProjectClose.Execute; 470 Core.SaveToRegistry( HKEY(Core.ApplicationInfo.RegistryRoot), Core.ApplicationInfo.RegistryKey);474 Core.SaveToRegistry(Integer(Core.ApplicationInfo.RegistryRoot), Core.ApplicationInfo.RegistryKey); 471 475 end; 472 476 … … 494 498 procedure TFormMain.FormShow(Sender: TObject); 495 499 begin 496 Core.LoadFromRegistry( HKEY(Core.ApplicationInfo.RegistryRoot), Core.ApplicationInfo.RegistryKey);500 Core.LoadFromRegistry(Integer(Core.ApplicationInfo.RegistryRoot), Core.ApplicationInfo.RegistryKey); 497 501 DockInit; 498 502 Core.ProjectTemplatesInit; … … 503 507 504 508 WindowState := wsMaximized; 509 UpdateInterface; 505 510 end; 506 511 507 512 procedure TFormMain.AProjectOpenExecute(Sender: TObject); 508 513 begin 509 if OpenDialog1.Execute then begin 510 Core.ProjectOpen(OpenDialog1.FileName); 514 if Core.LastOpenedFiles.Items.Count > 0 then 515 OpenDialogProject.FileName := Core.LastOpenedFiles.Items[0] 516 else OpenDialogProject.FileName := ExtractFileDir(Application.ExeName); 517 if OpenDialogProject.Execute then begin 518 Core.ProjectOpen(OpenDialogProject.FileName); 511 519 end; 512 520 end; … … 555 563 procedure TFormMain.AProjectSaveAsExecute(Sender: TObject); 556 564 begin 565 if Core.LastOpenedFiles.Items.Count > 0 then 566 SaveDialogProject.FileName := Core.LastOpenedFiles.Items[0] 567 else SaveDialogProject.FileName := ExtractFileDir(Application.ExeName); 557 568 if Assigned(Core.Project) then 558 if SaveDialog 1.Execute then begin559 Core.Project.SaveToFile(SaveDialog 1.FileName);569 if SaveDialogProject.Execute then begin 570 Core.Project.SaveToFile(SaveDialogProject.FileName); 560 571 FormSourceCode.Save; 561 572 Core.Project.Save; 562 573 UpdateInterface; 563 Core.LastOpenedFiles.AddItem(SaveDialog 1.FileName);574 Core.LastOpenedFiles.AddItem(SaveDialogProject.FileName); 564 575 end; 565 576 end;
Note:
See TracChangeset
for help on using the changeset viewer.