Changeset 52 for trunk/Forms


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.
Location:
trunk/Forms
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormCPU.pas

    r38 r52  
    4747  if MainForm.CurrentTarget is TTargetInterpretter then
    4848  with TTargetInterpretter(MainForm.CurrentTarget) do begin
    49     LabelProgramPointer.Caption := IntToStr(SourcePosition);
     49    LabelProgramPointer.Caption := IntToStr(ProgramIndex);
    5050    LabelMemoryPointer.Caption := IntToStr(MemoryPosition);
    5151    LabelStepCounter.Caption := IntToStr(StepCount);
  • trunk/Forms/UFormMain.lfm

    r51 r52  
    120120    object ToolButtonTarget: TToolButton
    121121      Left = 345
     122      Hint = 'Target select'
    122123      Top = 2
    123       Caption = 'ToolButtonTarget'
     124      Caption = 'Target select'
    124125      DropdownMenu = PopupMenuTargets
    125126      Style = tbsDropDown
  • trunk/Forms/UFormMain.lrt

    r48 r52  
    11TMAINFORM.CAPTION=LazFuck
    2 TMAINFORM.TOOLBUTTONTARGET.CAPTION=ToolButtonTarget
     2TMAINFORM.TOOLBUTTONTARGET.HINT=Target select
     3TMAINFORM.TOOLBUTTONTARGET.CAPTION=Target select
    34TMAINFORM.TABSHEETDEBUG.CAPTION=Debug
    45TMAINFORM.TABSHEETSOURCE.CAPTION=Source code
  • 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.