Ignore:
Timestamp:
Aug 3, 2012, 12:14:25 PM (12 years ago)
Author:
chronos
Message:
Location:
trunk/StudioPackage/Forms
Files:
2 edited

Legend:

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

    r7 r8  
    88  ClientWidth = 747
    99  Menu = MainMenu
     10  OnCreate = FormCreate
    1011  OnShow = FormShow
    1112  LCLVersion = '1.1'
     
    4647    end
    4748  end
    48   object PageControl1: TPageControl
     49  object PageControlRight: TPageControl
    4950    Left = 547
    5051    Height = 350
     
    6061    end
    6162  end
    62   object PageControl2: TPageControl
     63  object PageControlLeft: TPageControl
    6364    Left = 0
    6465    Height = 350
     
    7475    end
    7576  end
    76   object PageControl3: TPageControl
     77  object PageControlBottom: TPageControl
    7778    Left = 0
    7879    Height = 105
     
    101102    ResizeAnchor = akRight
    102103  end
    103   object PageControl4: TPageControl
     104  object PageControlCenter: TPageControl
    104105    Left = 205
    105106    Height = 350
     
    14311432  end
    14321433  object OpenDialogFile: TOpenDialog
    1433     Filter = 'kkk|.kk|jj|.jj'
    14341434    left = 82
    14351435    top = 210
  • 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.