Ignore:
Timestamp:
Oct 13, 2020, 8:05:14 PM (4 years ago)
Author:
chronos
Message:
  • Fixed: Build with Lazarus 2.0.10.
  • Modified: CoolTranslator package replaced by Translator in Common package.
  • Modified: About dialog moved to Common package.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormMain.pas

    r114 r115  
    146146    procedure ProjectOpen(FileName: string);
    147147    procedure UpdateToolBarHints;
     148    procedure DockForm(Form: TForm; DockSite: TWinControl);
    148149    procedure DockInit;
    149150    procedure LastOpenedListChange(Sender: TObject);
     
    170171  UCore, UFormCPU, UFormOptions, UFormMessages, UFormTargets, UFormOutput, UFormInput,
    171172  UFormMemory, UFormSourceCode, UFormTargetCode, UTargetInterpretter, UFormLog,
    172   UBFTarget, UFormAbout;
     173  UBFTarget;
    173174
    174175resourcestring
     
    267268end;
    268269
     270procedure TFormMain.DockForm(Form: TForm; DockSite: TWinControl);
     271begin
     272  Form.ManualDock(DockSite, nil, alClient);
     273  Form.Align := alClient;
     274  Form.Show;
     275end;
     276
    269277procedure TFormMain.DockInit;
    270278begin
    271   FormSourceCode.ManualDock(TabSheetSource, nil, alClient);
    272   FormSourceCode.Align := alClient;
    273   FormSourceCode.Show;
    274   FormTargetCode.ManualDock(TabSheetTarget, nil, alClient);
    275   FormTargetCode.Align := alClient;
    276   FormTargetCode.Show;
    277   FormCPU.ManualDock(PanelCPU, nil, alClient);
    278   FormCPU.Align := alClient;
    279   FormCPU.Show;
    280   FormInput.ManualDock(PanelInput, nil, alClient);
    281   FormInput.Align := alClient;
    282   FormInput.Show;
    283   FormOutput.ManualDock(PanelOutput, nil, alClient);
    284   FormOutput.Align := alClient;
    285   FormOutput.Show;
    286   FormMemory.ManualDock(PanelMemory, nil, alClient);
    287   FormMemory.Align := alClient;
    288   FormMemory.Show;
    289   FormMessages.ManualDock(TabSheetMessages, nil, alClient);
    290   FormMessages.Align := alClient;
    291   FormMessages.Show;
     279  DockForm(FormSourceCode, TabSheetSource);
     280  DockForm(FormTargetCode, TabSheetTarget);
     281  DockForm(FormCPU, PanelCPU);
     282  DockForm(FormInput, PanelInput);
     283  DockForm(FormOutput, PanelOutput);
     284  DockForm(FormMemory, PanelMemory);
     285  DockForm(FormMessages, TabSheetMessages);
    292286  PageControlRight.Width := FormMain.Width div 3;
    293287  PageControlBottom.Height := FormMain.Height div 5;
     
    534528procedure TFormMain.AAboutExecute(Sender: TObject);
    535529begin
    536   FormAbout := TFormAbout.Create(nil);
    537   try
    538     FormAbout.ApplicationInfo := Core.ApplicationInfo;
    539     FormAbout.CoolTranslator := Core.CoolTranslator1;
    540     Core.ScaleDPI1.ScaleControl(FormAbout, Core.ScaleDPI1.DesignDPI);
    541     FormAbout.ShowModal;
    542   finally
    543     FreeAndNil(FormAbout);
    544   end;
     530  Core.AboutDialog.Show;
    545531end;
    546532
Note: See TracChangeset for help on using the changeset viewer.