Ignore:
Timestamp:
Aug 3, 2012, 12:14:25 PM (12 years ago)
Author:
chronos
Message:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/StudioPackage/Forms/UFormMain.pas

    r7 r8  
    77uses
    88  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, Menus,
    9   ActnList, ComCtrls, ExtCtrls;
     9  ActnList, ComCtrls, ExtCtrls, UDataModule;
    1010
    1111type
     
    7575    MenuItem9: TMenuItem;
    7676    OpenDialogFile: TOpenDialog;
    77     PageControl1: TPageControl;
    78     PageControl2: TPageControl;
    79     PageControl3: TPageControl;
    80     PageControl4: TPageControl;
     77    PageControlRight: TPageControl;
     78    PageControlLeft: TPageControl;
     79    PageControlBottom: TPageControl;
     80    PageControlCenter: TPageControl;
    8181    SaveDialogFile: TSaveDialog;
    8282    Splitter1: TSplitter;
     
    9696    procedure AViewProjectManagerExecute(Sender: TObject);
    9797    procedure AViewSettingsExecute(Sender: TObject);
     98    procedure FormCreate(Sender: TObject);
    9899    procedure FormShow(Sender: TObject);
    99100  private
    100101    procedure DockInit;
    101102  public
    102     { public declarations }
     103    procedure OpenFileExecute(OpenedFile: TOpenedFile);
    103104  end;
    104105
     
    111112
    112113uses
    113   UFormProject, UFormSourceCode, UFormSettings, UDataModule;
     114  UFormProject, UFormSourceCode, UFormSettings;
    114115
    115116{ TFormMain }
     
    123124begin
    124125  OpenDialogFile.Filter := DataModule1.FileTypes.GetDialogFilter;
    125   if OpenDialogFile.Execute then ;
     126  if OpenDialogFile.Execute then begin
     127    DataModule1.OpenedFiles.OpenFile(OpenDialogFile.FileName);
     128  end;
    126129end;
    127130
     
    134137begin
    135138  FormSettings.ShowModal;
     139end;
     140
     141procedure TFormMain.FormCreate(Sender: TObject);
     142begin
    136143end;
    137144
     
    151158end;
    152159
     160procedure TFormMain.OpenFileExecute(OpenedFile: TOpenedFile);
     161var
     162  NewTabSheet: TTabSheet;
     163begin
     164  NewTabSheet := PageControlCenter.AddTabSheet;
     165  OpenedFile.Form.ManualDock(NewTabSheet, nil, alClient);
     166  OpenedFile.Form.Align := alClient;
     167  OpenedFile.Form.Show;
     168end;
     169
    153170end.
    154171
Note: See TracChangeset for help on using the changeset viewer.