Ignore:
Timestamp:
Nov 29, 2017, 3:45:03 PM (7 years ago)
Author:
chronos
Message:
  • Added: New rule item option to match any character except given one.
  • Added: Show file name in main window title.
Location:
branches/generator/Forms
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/generator/Forms/UFormMain.pas

    r119 r123  
    5252  private
    5353    procedure ReloadMemo;
     54    procedure UpdateInterface;
    5455  public
    5556    { public declarations }
     
    8586  if SaveDialog1.Execute then begin
    8687    Core.Grammer.SaveToXmlFile(SaveDialog1.FileName);
     88    UpdateInterface;
    8789  end;
    8890end;
     
    9193begin
    9294  Core.Grammer.SaveToXmlFile(Core.Grammer.FileName);
     95  UpdateInterface;
    9396end;
    9497
     
    102105  Core.PersistentForm1.Load(Self, True);
    103106  ReloadMemo;
     107  UpdateInterface;
    104108end;
    105109
     
    107111begin
    108112  MemoBNF.Lines.Text := Core.Grammer.GetString;
     113end;
     114
     115procedure TFormMain.UpdateInterface;
     116begin
     117  Caption := Core.Grammer.FileName + ' - ' + Application.Title;
    109118end;
    110119
     
    118127  Core.Grammer.Rules.Clear;
    119128  ReloadMemo;
     129  UpdateInterface;
    120130end;
    121131
     
    131141    Core.Grammer.LoadFromXmlFile(OpenDialog1.FileName);
    132142    ReloadMemo;
     143    UpdateInterface;
    133144  end;
    134145end;
  • branches/generator/Forms/UFormRule.pas

    r120 r123  
    4343
    4444implementation
    45 
    46 uses
    47   UCore;
    4845
    4946{$R *.lfm}
  • branches/generator/Forms/UFormRuleItem.lfm

    r122 r123  
    159159  end
    160160  object CheckBoxRepetitive: TCheckBox
    161     Left = 336
     161    Left = 216
    162162    Height = 24
    163163    Top = 56
     
    166166    TabOrder = 5
    167167  end
     168  object CheckBoxAnyExcept: TCheckBox
     169    Left = 400
     170    Height = 24
     171    Top = 56
     172    Width = 97
     173    Caption = 'Any except'
     174    TabOrder = 6
     175  end
    168176end
  • branches/generator/Forms/UFormRuleItem.pas

    r122 r123  
    1616    ButtonCancel: TButton;
    1717    ButtonOk: TButton;
     18    CheckBoxAnyExcept: TCheckBox;
    1819    CheckBoxOptional: TCheckBox;
    1920    CheckBoxRepetitive: TCheckBox;
     
    134135  CheckBoxOptional.Checked := RuleItem.Optional;
    135136  CheckBoxRepetitive.Checked := RuleItem.Repetitive;
     137  CheckBoxAnyExcept.Checked := RuleItem.AnyExcept;
    136138  TFormRuleItems(FormRuleItems).LoadData(RuleItem.SubItems);
    137139  UpdateInterface;
     
    150152  RuleItem.Optional := CheckBoxOptional.Checked;
    151153  RuleItem.Repetitive := CheckBoxRepetitive.Checked;
     154  RuleItem.AnyExcept := CheckBoxAnyExcept.Checked;
    152155end;
    153156
Note: See TracChangeset for help on using the changeset viewer.