Ignore:
Timestamp:
Jul 26, 2012, 3:11:08 PM (12 years ago)
Author:
chronos
Message:
  • Modified: Optimization functions moved to shared place in TTarget.
  • Modified: Text source is loaded to program source array of brainfuck commands for better processing.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormMain.pas

    r51 r52  
    175175  SProgramStopped = 'Program stopped';
    176176  SNewProject = 'New project';
     177  SCompileStart = 'Compiling...';
     178  SDone = 'Done';
    177179
    178180{ TMainForm }
     
    298300    RootKey := Root;
    299301    OpenKey(Key, True);
    300     Core.OpenProjectOnStart := ReadBoolWithDefault('OpenProjectOnStart', True);
    301     if ValueExists('LanguageCode') then
    302       Core.CoolTranslator1.Language := Core.CoolTranslator1.Languages.SearchByCode(ReadStringWithDefault('LanguageCode', ''))
    303       else Core.CoolTranslator1.Language := Core.CoolTranslator1.Languages.SearchByCode('');
    304302    TargetName := ReadStringWithDefault('TargetName', 'Interpretter');
    305303    CurrentTarget := Core.Targets.FindByName(TargetName);
     
    308306    Free;
    309307  end;
    310   Core.LastOpenedList.LoadFromRegistry(Root, Key);
    311   Core.Targets.LoadFromRegistry(Root, Key);
    312308end;
    313309
    314310procedure TMainForm.SaveToRegistry(Root: HKEY; Key: string);
    315311begin
    316   Core.Targets.SaveToRegistry(Root, Key);
    317   Core.LastOpenedList.SaveToRegistry(Root, Key);
    318312  with TRegistryEx.Create do
    319313  try
    320314    RootKey := Root;
    321315    OpenKey(Key, True);
    322     WriteBool('OpenProjectOnStart', Core.OpenProjectOnStart);
    323     if Assigned(Core.CoolTranslator1.Language) and (Core.CoolTranslator1.Language.Code <> '') then
    324       WriteString('LanguageCode', Core.CoolTranslator1.Language.Code)
    325       else DeleteValue('LanguageCode');
    326316    WriteString('TargetName', CurrentTarget.Name);
    327317  finally
     
    465455    ProjectFileName := Core.ProjectFileName;
    466456    ProgramName := ExtractFileNameOnly(Core.ProjectFileName);
    467     CurrentTarget.Messages.AddMessage('Compiling...');
     457    CurrentTarget.Messages.AddMessage(SCompileStart);
    468458    Compile;
    469     CurrentTarget.Messages.AppendMessage('done');
     459    CurrentTarget.Messages.AppendMessage(SDone);
    470460    FormTargetCode.MemoTarget.Text := TargetCode;
    471461    UpdateInterface;
Note: See TracChangeset for help on using the changeset viewer.