Changeset 12 for trunk/IDE/Forms/UMainForm.pas
- Timestamp:
- Nov 8, 2010, 10:06:37 AM (14 years ago)
- Location:
- trunk/IDE
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IDE
-
Property svn:ignore
set to
lib
-
Property svn:ignore
set to
-
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.