Changeset 8
- Timestamp:
- Aug 3, 2012, 12:14:25 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Studio/LibreDevelopStudio.lpi
r7 r8 33 33 </local> 34 34 </RunParams> 35 <RequiredPackages Count=" 4">35 <RequiredPackages Count="5"> 36 36 <Item1> 37 <PackageName Value="LDModule Brainfuck"/>37 <PackageName Value="LDModulePascal"/> 38 38 </Item1> 39 39 <Item2> 40 <PackageName Value="LDModule Debug"/>40 <PackageName Value="LDModuleBrainfuck"/> 41 41 </Item2> 42 42 <Item3> 43 <PackageName Value="L ibreDevelopStudio"/>43 <PackageName Value="LDModuleDebug"/> 44 44 </Item3> 45 45 <Item4> 46 <PackageName Value="LibreDevelopStudio"/> 47 </Item4> 48 <Item5> 46 49 <PackageName Value="LCL"/> 47 </Item 4>50 </Item5> 48 51 </RequiredPackages> 49 52 <Units Count="2"> … … 79 82 </Parsing> 80 83 <Linking> 84 <Debugging> 85 <UseHeaptrc Value="True"/> 86 </Debugging> 81 87 <Options> 82 88 <Win32> -
trunk/Studio/LibreDevelopStudio.lpr
r5 r8 16 16 Application.Initialize; 17 17 Application.CreateForm(TCore, Core); 18 Application.CreateForm(TDataModule1, DataModule1);19 18 Core.Init; 20 19 Application.Run; -
trunk/Studio/UCore.pas
r7 r8 31 31 32 32 uses 33 ULDModuleDebug, UFormMain, ULDModuleBrainfuck, UDataModule ;33 ULDModuleDebug, UFormMain, ULDModuleBrainfuck, UDataModule, ULDModulePascal; 34 34 35 35 { TCore } … … 37 37 procedure TCore.DataModuleCreate(Sender: TObject); 38 38 begin 39 DataModule1 := TDataModule1.Create(nil); 39 40 API := TLDStudioAPI.Create; 40 41 ModuleManager := TModuleManager.Create(nil); … … 46 47 FreeAndNil(ModuleManager); 47 48 FreeAndNil(API); 49 FreeAndNil(DataModule1); 48 50 end; 49 51 … … 52 54 ModuleManager.RegisterModule(TLDModuleDebug.Create, True); 53 55 ModuleManager.RegisterModule(TLDModuleBrainfuck.Create, True); 56 ModuleManager.RegisterModule(TLDModulePascal.Create, True); 54 57 ModuleManager.InstallMarked; 55 58 end; -
trunk/StudioCommon/USource.pas
r7 r8 59 59 end; 60 60 61 61 62 implementation 62 63 -
trunk/StudioModules/LDModulePascal
-
Property svn:ignore
set to
lib
-
Property svn:ignore
set to
-
trunk/StudioPackage/Forms/UFormMain.lfm
r7 r8 8 8 ClientWidth = 747 9 9 Menu = MainMenu 10 OnCreate = FormCreate 10 11 OnShow = FormShow 11 12 LCLVersion = '1.1' … … 46 47 end 47 48 end 48 object PageControl 1: TPageControl49 object PageControlRight: TPageControl 49 50 Left = 547 50 51 Height = 350 … … 60 61 end 61 62 end 62 object PageControl 2: TPageControl63 object PageControlLeft: TPageControl 63 64 Left = 0 64 65 Height = 350 … … 74 75 end 75 76 end 76 object PageControl 3: TPageControl77 object PageControlBottom: TPageControl 77 78 Left = 0 78 79 Height = 105 … … 101 102 ResizeAnchor = akRight 102 103 end 103 object PageControl 4: TPageControl104 object PageControlCenter: TPageControl 104 105 Left = 205 105 106 Height = 350 … … 1431 1432 end 1432 1433 object OpenDialogFile: TOpenDialog 1433 Filter = 'kkk|.kk|jj|.jj'1434 1434 left = 82 1435 1435 top = 210 -
trunk/StudioPackage/Forms/UFormMain.pas
r7 r8 7 7 uses 8 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, Menus, 9 ActnList, ComCtrls, ExtCtrls ;9 ActnList, ComCtrls, ExtCtrls, UDataModule; 10 10 11 11 type … … 75 75 MenuItem9: TMenuItem; 76 76 OpenDialogFile: TOpenDialog; 77 PageControl 1: TPageControl;78 PageControl 2: TPageControl;79 PageControl 3: TPageControl;80 PageControl 4: TPageControl;77 PageControlRight: TPageControl; 78 PageControlLeft: TPageControl; 79 PageControlBottom: TPageControl; 80 PageControlCenter: TPageControl; 81 81 SaveDialogFile: TSaveDialog; 82 82 Splitter1: TSplitter; … … 96 96 procedure AViewProjectManagerExecute(Sender: TObject); 97 97 procedure AViewSettingsExecute(Sender: TObject); 98 procedure FormCreate(Sender: TObject); 98 99 procedure FormShow(Sender: TObject); 99 100 private 100 101 procedure DockInit; 101 102 public 102 { public declarations }103 procedure OpenFileExecute(OpenedFile: TOpenedFile); 103 104 end; 104 105 … … 111 112 112 113 uses 113 UFormProject, UFormSourceCode, UFormSettings , UDataModule;114 UFormProject, UFormSourceCode, UFormSettings; 114 115 115 116 { TFormMain } … … 123 124 begin 124 125 OpenDialogFile.Filter := DataModule1.FileTypes.GetDialogFilter; 125 if OpenDialogFile.Execute then ; 126 if OpenDialogFile.Execute then begin 127 DataModule1.OpenedFiles.OpenFile(OpenDialogFile.FileName); 128 end; 126 129 end; 127 130 … … 134 137 begin 135 138 FormSettings.ShowModal; 139 end; 140 141 procedure TFormMain.FormCreate(Sender: TObject); 142 begin 136 143 end; 137 144 … … 151 158 end; 152 159 160 procedure TFormMain.OpenFileExecute(OpenedFile: TOpenedFile); 161 var 162 NewTabSheet: TTabSheet; 163 begin 164 NewTabSheet := PageControlCenter.AddTabSheet; 165 OpenedFile.Form.ManualDock(NewTabSheet, nil, alClient); 166 OpenedFile.Form.Align := alClient; 167 OpenedFile.Form.Show; 168 end; 169 153 170 end. 154 171 -
trunk/StudioPackage/UDataModule.pas
r7 r8 9 9 10 10 type 11 12 { TOpenedFile } 13 14 TOpenedFile = class 15 private 16 FFileName: string; 17 procedure SetFileName(AValue: string); 18 public 19 Modified: Boolean; 20 Form: TForm; 21 property FileName: string read FFileName write SetFileName; 22 end; 23 24 TOpenFileEvent = procedure (OpenedFile: TOpenedFile) of object; 25 26 { TOpenedFiles } 27 28 TOpenedFiles = class(TListObject) 29 private 30 FOnOpenFile: TOpenFileEvent; 31 public 32 procedure OpenFile(FileName: string); 33 procedure NewFile; 34 property OnOpenFile: TOpenFileEvent read FOnOpenFile write FOnOpenFile; 35 end; 36 11 37 { TDataModule1 } 12 38 … … 19 45 Project: TProject; 20 46 FileTypes: TFileTypes; 47 OpenedFiles: TOpenedFiles; 21 48 end; 22 49 … … 32 59 UFormSourceCode, UFormMain, UFormProject, UFormSettings; 33 60 61 procedure TOpenedFile.SetFileName(AValue: string); 62 begin 63 if FFileName = AValue then Exit; 64 FFileName := AValue; 65 if Assigned(Form) then 66 Form.Caption := ExtractFileName(FFileName); 67 end; 68 69 { TOpenedFiles } 70 71 procedure TOpenedFiles.OpenFile(FileName: string); 72 var 73 NewFile: TOpenedFile; 74 begin 75 NewFile := TOpenedFile(AddNew(TOpenedFile.Create)); 76 NewFile.FileName := FileName; 77 NewFile.Form := TFormSourceCode.Create(nil); 78 NewFile.Form.Caption := ExtractFileName(NewFile.FileName); 79 NewFile.Form.Visible := True; 80 if Assigned(FOnOpenFile) then 81 FOnOpenFile(NewFile); 82 end; 83 84 procedure TOpenedFiles.NewFile; 85 begin 86 87 end; 88 34 89 { TDataModule1 } 35 90 36 91 procedure TDataModule1.DataModuleCreate(Sender: TObject); 37 92 begin 93 FileTypes := TFileTypes.Create; 94 FileTypes.OwnsObjects := False; 95 OpenedFiles := TOpenedFiles.Create; 96 38 97 Application.CreateForm(TFormMain, FormMain); 98 OpenedFiles.OnOpenFile := FormMain.OpenFileExecute; 39 99 Application.CreateForm(TFormProject, FormProject); 40 100 Application.CreateForm(TFormSourceCode, FormSourceCode); 41 101 Application.CreateForm(TFormSettings, FormSettings); 42 FileTypes := TFileTypes.Create;43 102 end; 44 103 45 104 procedure TDataModule1.DataModuleDestroy(Sender: TObject); 46 105 begin 106 FreeAndNil(OpenedFiles); 47 107 FreeAndNil(FileTypes); 48 108 end;
Note:
See TracChangeset
for help on using the changeset viewer.