Changeset 12 for trunk/IDE/Forms
- Timestamp:
- Nov 8, 2010, 10:06:37 AM (14 years ago)
- Location:
- trunk/IDE
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IDE
-
Property svn:ignore
set to
lib
-
Property svn:ignore
set to
-
trunk/IDE/Forms/UCodeTreeForm.pas
r2 r12 1 1 unit UCodeTreeForm; 2 2 3 {$mode objfpc}{$H+}3 {$mode Delphi}{$H+} 4 4 5 5 interface -
trunk/IDE/Forms/UCompiledForm.pas
r2 r12 1 1 unit UCompiledForm; 2 2 3 {$mode objfpc}{$H+}3 {$mode Delphi}{$H+} 4 4 5 5 interface -
trunk/IDE/Forms/UMainForm.lfm
r2 r12 5 5 Width = 695 6 6 Caption = 'Transpascal IDE' 7 ClientHeight = 4 767 ClientHeight = 482 8 8 ClientWidth = 695 9 9 Font.Height = -11 … … 20 20 Left = 0 21 21 Height = 5 22 Top = 47 122 Top = 477 23 23 Width = 695 24 24 Align = alBottom … … 27 27 object DockPanel: TPanel 28 28 Left = 0 29 Height = 4 4529 Height = 451 30 30 Top = 26 31 31 Width = 695 … … 41 41 Caption = 'ToolBar1' 42 42 TabOrder = 2 43 object ComboBox TargetSelection: TComboBox43 object ComboBoxProducer: TComboBox 44 44 Left = 192 45 Height = 2 445 Height = 21 46 46 Top = 2 47 47 Width = 135 48 48 Align = alLeft 49 ItemHeight = 049 ItemHeight = 13 50 50 ItemIndex = 1 51 51 Items.Strings = ( … … 55 55 'XML' 56 56 ) 57 OnChange = ComboBox TargetSelectionChange57 OnChange = ComboBoxProducerChange 58 58 Style = csDropDownList 59 59 TabOrder = 0 … … 73 73 Height = 24 74 74 Top = 2 75 Width = 1 2275 Width = 105 76 76 Align = alLeft 77 77 Caption = 'Log parsing to file' 78 78 TabOrder = 2 79 79 end 80 object ComboBoxAnalyzer Type: TComboBox80 object ComboBoxAnalyzer: TComboBox 81 81 Left = 40 82 Height = 2 482 Height = 21 83 83 Top = 2 84 84 Width = 124 85 85 Align = alLeft 86 ItemHeight = 086 ItemHeight = 13 87 87 Style = csDropDownList 88 88 TabOrder = 3 -
trunk/IDE/Forms/UMainForm.pas
r10 r12 30 30 Button1: TButton; 31 31 CheckBoxLogParsing: TCheckBox; 32 ComboBoxAnalyzer Type: TComboBox;33 ComboBox TargetSelection: TComboBox;32 ComboBoxAnalyzer: TComboBox; 33 ComboBoxProducer: TComboBox; 34 34 CoolDockClient1: TCoolDockClient; 35 35 CoolDockMaster1: TCoolDockMaster; … … 55 55 procedure AProjectSaveAsExecute(Sender: TObject); 56 56 procedure ComboBox1Change(Sender: TObject); 57 procedure ComboBox TargetSelectionChange(Sender: TObject);57 procedure ComboBoxProducerChange(Sender: TObject); 58 58 procedure FormShow(Sender: TObject); 59 59 procedure FormClose(Sender: TObject; var Action: TCloseAction); … … 91 91 begin 92 92 // Compile project file 93 if CheckBoxLogParsing.Checked then 94 Compiler.Parser.OnDebugLog := CompilerDebugLog 95 else Compiler.Parser.OnDebugLog := nil; 96 Compiler.ProducerType := TProducerType(ComboBoxTargetSelection.ItemIndex); 97 Compiler.Init; 98 Compiler.Parser.OnGetSource := GetSource; 99 100 if Project.Items.Count > 0 then 101 with TProjectFile(Project.Items[0]) do begin 102 Compiler.TargetFolder := Project.RootDir; 103 Compiler.Compile(Parent.GetDir + ExtractFileNameOnly(Name), Source); 104 end; 105 106 ProjectManager.TreeViewProjectChange(Self, ProjectManager.TreeViewProject.Selected); 107 MessagesForm.Reload; 93 if (ComboBoxAnalyzer.Items.Count > 0) and (ComboBoxAnalyzer.ItemIndex <> -1) and 94 (ComboBoxProducer.Items.Count > 0) and (ComboBoxProducer.ItemIndex <> -1) then begin 95 Compiler.Producer := Compiler.Producers[ComboBoxProducer.ItemIndex]; 96 Compiler.Analyzer := Compiler.Analyzers[ComboBoxAnalyzer.ItemIndex]; 97 Compiler.Analyzer.OnGetSource := GetSource; 98 Compiler.Init; 99 100 if CheckBoxLogParsing.Checked then 101 Compiler.Analyzer.OnDebugLog := CompilerDebugLog 102 else Compiler.Analyzer.OnDebugLog := nil; 103 104 if Project.Items.Count > 0 then 105 with TProjectFile(Project.Items[0]) do begin 106 Compiler.TargetFolder := Project.RootDir; 107 Compiler.Compile(Parent.GetDir + ExtractFileNameOnly(Name), Source); 108 end; 109 ProjectManager.TreeViewProjectChange(Self, ProjectManager.TreeViewProject.Selected); 110 MessagesForm.Reload; 111 end; 108 112 end; 109 113 … … 163 167 OpenKey(RegistryKey, True); 164 168 ReopenLastOpenedFile := ReadBoolWithDefault('ReopenLastOpenedFile', True); 165 ComboBox TargetSelection.ItemIndex :=169 ComboBoxProducer.ItemIndex := 166 170 ReadIntegerWithDefault('ProducerType', 0); 167 ComboBoxAnalyzer Type.ItemIndex :=171 ComboBoxAnalyzer.ItemIndex := 168 172 ReadIntegerWithDefault('AnalyzerType', 0); 169 173 CheckBoxLogParsing.Checked := ReadBoolWithDefault('LogParsing', False); … … 181 185 OpenKey(RegistryKey, True); 182 186 WriteBool('ReopenLastOpenedFile', ReopenLastOpenedFile); 183 WriteInteger('ProducerType', ComboBox TargetSelection.ItemIndex);184 WriteInteger('AnalyzerType', ComboBoxAnalyzer Type.ItemIndex);187 WriteInteger('ProducerType', ComboBoxProducer.ItemIndex); 188 WriteInteger('AnalyzerType', ComboBoxAnalyzer.ItemIndex); 185 189 WriteBool('LogParsing', CheckBoxLogParsing.Checked); 186 190 finally … … 208 212 procedure TMainForm.FormCreate(Sender: TObject); 209 213 var 210 ProducerType: TProducerType; 211 AnalyzerType: TAnalyzerType; 214 I: Integer; 212 215 begin 213 216 DebugLog.FileName := 'DebugLog.txt'; … … 219 222 LastOpenedFiles.ClickAction := OpenRecentClick; 220 223 221 ComboBox TargetSelection.Clear;222 for ProducerType := Low(ProducerType) to High(ProducerType)do223 ComboBox TargetSelection.AddItem(ProducerTypeName[ProducerType], nil);224 ComboBoxAnalyzer Type.Clear;225 for AnalyzerType := Low(AnalyzerType) to High(AnalyzerType)do226 ComboBoxAnalyzer Type.AddItem(AnalyzerTypeName[AnalyzerType], nil);224 ComboBoxProducer.Clear; 225 for I := 0 to Compiler.Producers.Count - 1 do 226 ComboBoxProducer.AddItem(Compiler.Producers[I].Name, nil); 227 ComboBoxAnalyzer.Clear; 228 for I := 0 to Compiler.Analyzers.Count - 1 do 229 ComboBoxAnalyzer.AddItem(Compiler.Analyzers[I].Name, nil); 227 230 end; 228 231 … … 283 286 end; 284 287 285 procedure TMainForm.ComboBox TargetSelectionChange(Sender: TObject);288 procedure TMainForm.ComboBoxProducerChange(Sender: TObject); 286 289 begin 287 290 ABuildExecute(Self);
Note:
See TracChangeset
for help on using the changeset viewer.