Changeset 52 for trunk/Forms/UFormMain.pas
- Timestamp:
- Jul 26, 2012, 3:11:08 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormMain.pas
r51 r52 175 175 SProgramStopped = 'Program stopped'; 176 176 SNewProject = 'New project'; 177 SCompileStart = 'Compiling...'; 178 SDone = 'Done'; 177 179 178 180 { TMainForm } … … 298 300 RootKey := Root; 299 301 OpenKey(Key, True); 300 Core.OpenProjectOnStart := ReadBoolWithDefault('OpenProjectOnStart', True);301 if ValueExists('LanguageCode') then302 Core.CoolTranslator1.Language := Core.CoolTranslator1.Languages.SearchByCode(ReadStringWithDefault('LanguageCode', ''))303 else Core.CoolTranslator1.Language := Core.CoolTranslator1.Languages.SearchByCode('');304 302 TargetName := ReadStringWithDefault('TargetName', 'Interpretter'); 305 303 CurrentTarget := Core.Targets.FindByName(TargetName); … … 308 306 Free; 309 307 end; 310 Core.LastOpenedList.LoadFromRegistry(Root, Key);311 Core.Targets.LoadFromRegistry(Root, Key);312 308 end; 313 309 314 310 procedure TMainForm.SaveToRegistry(Root: HKEY; Key: string); 315 311 begin 316 Core.Targets.SaveToRegistry(Root, Key);317 Core.LastOpenedList.SaveToRegistry(Root, Key);318 312 with TRegistryEx.Create do 319 313 try 320 314 RootKey := Root; 321 315 OpenKey(Key, True); 322 WriteBool('OpenProjectOnStart', Core.OpenProjectOnStart);323 if Assigned(Core.CoolTranslator1.Language) and (Core.CoolTranslator1.Language.Code <> '') then324 WriteString('LanguageCode', Core.CoolTranslator1.Language.Code)325 else DeleteValue('LanguageCode');326 316 WriteString('TargetName', CurrentTarget.Name); 327 317 finally … … 465 455 ProjectFileName := Core.ProjectFileName; 466 456 ProgramName := ExtractFileNameOnly(Core.ProjectFileName); 467 CurrentTarget.Messages.AddMessage( 'Compiling...');457 CurrentTarget.Messages.AddMessage(SCompileStart); 468 458 Compile; 469 CurrentTarget.Messages.AppendMessage( 'done');459 CurrentTarget.Messages.AppendMessage(SDone); 470 460 FormTargetCode.MemoTarget.Text := TargetCode; 471 461 UpdateInterface;
Note:
See TracChangeset
for help on using the changeset viewer.