Changeset 41 for trunk/IDE/Forms/UMainForm.pas
- Timestamp:
- Feb 28, 2012, 8:34:31 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IDE/Forms/UMainForm.pas
r39 r41 11 11 UCDConjoinForm, UCDWindowList, UCDLayout, UCDCustomize, UCoolTranslator, 12 12 UCompiledForm, UCodeTreeForm, URegistry, ULastOpenedList, UApplicationInfo, 13 UDebugLog , UAnalyzer, UProducer;13 UDebugLog; 14 14 15 15 const … … 68 68 MenuItem23: TMenuItem; 69 69 MenuItem24: TMenuItem; 70 MenuItemAnalyzer: TMenuItem;71 70 MenuItemProducer: TMenuItem; 72 71 MenuItem3: TMenuItem; … … 157 156 uses 158 157 UMessagesForm, UCodeForm, UProjectManager, UCommon, UAboutForm, UFormOptions, 159 UCompilersForm ;158 UCompilersForm, UTarget, UAnalyzer, UProducer; 160 159 161 160 resourcestring … … 171 170 try 172 171 RootKey := Root; 173 for I := 0 to Producers.Count - 1 do174 with T Producer(Producers[I]) do begin175 OpenKey(Key + '\ Producers\' + Name, True);172 for I := 0 to Targets.Count - 1 do 173 with TTarget(Targets[I]) do begin 174 OpenKey(Key + '\Targets\' + Name, True); 176 175 if ValueExists('CompilerPath') then 177 CompilerPath := ReadStringWithDefault('CompilerPath',CompilerPath);176 Producer.CompilerPath := ReadStringWithDefault('CompilerPath', Producer.CompilerPath); 178 177 end; 178 if ValueExists('SelectedTarget') then 179 Target := Targets.SearchBySysName(ReadString('SelectedTarget')) 180 else Target := nil; 179 181 finally 180 182 Free; … … 189 191 try 190 192 RootKey := Root; 191 for I := 0 to Producers.Count - 1 do 192 with TProducer(Producers[I]) do begin 193 OpenKey(Key + '\Producers\' + Name, True); 194 if CompilerPath <> '' then WriteString('CompilerPath', CompilerPath) 195 else DeleteValue('CompilerPath'); 193 for I := 0 to Targets.Count - 1 do 194 with TTarget(Targets[I]) do begin 195 OpenKey(Key + '\Targets\' + Name, True); 196 if Assigned(Producer) then begin 197 if Producer.CompilerPath <> '' then WriteString('CompilerPath', Producer.CompilerPath) 198 else DeleteValue('CompilerPath'); 199 end; 196 200 end; 201 if Assigned(Target) then WriteString('SelectedTarget', Target.SysName) 202 else DeleteValue('SelectedTarget'); 197 203 finally 198 204 Free; … … 207 213 208 214 // Compile project file 209 Compiler.Producer := TProducer(Compiler.Producers[SelectedProducerIndex]);210 Compiler.Analyzer := TAnalyzer(Compiler.Analyzers[SelectedAnalyzerIndex]);211 215 Compiler.Init; 212 216 … … 434 438 NewMenuItem: TMenuItem; 435 439 begin 436 MenuItemAnalyzer.Clear;437 for I := 0 to Compiler.Analyzers.Count - 1 do begin438 NewMenuItem := TMenuItem.Create(MenuItemAnalyzer);439 NewMenuItem.Caption := TAnalyzer(Compiler.Analyzers[I]).Name;440 NewMenuItem.OnClick := MenuItemAnalyzerClick;441 if I = SelectedAnalyzerIndex then NewMenuItem.Checked := True;442 MenuItemAnalyzer.Add(NewMenuItem);443 end;444 440 MenuItemProducer.Clear; 445 for I := 0 to Compiler. Producers.Count - 1 do begin441 for I := 0 to Compiler.Targets.Count - 1 do begin 446 442 NewMenuItem := TMenuItem.Create(MenuItemProducer); 447 NewMenuItem.Caption := T Producer(Compiler.Producers[I]).Name;443 NewMenuItem.Caption := TTarget(Compiler.Targets[I]).Name; 448 444 NewMenuItem.OnClick := MenuItemProducerClick; 449 445 if I = SelectedProducerIndex then NewMenuItem.Checked := True;
Note:
See TracChangeset
for help on using the changeset viewer.