Ignore:
Timestamp:
Dec 19, 2017, 4:56:34 PM (7 years ago)
Author:
chronos
Message:
  • Modified: Generate rules either to tokenizer and parser.
File:
1 edited

Legend:

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

    r126 r129  
    77uses
    88  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
    9   ComCtrls, ActnList, Menus, URules, UFormRuleItems;
     9  ComCtrls, ActnList, Menus, UGrammer, UFormRuleItems;
    1010
    1111type
     
    1717    ButtonCancel: TButton;
    1818    CheckBoxCreateNode: TCheckBox;
     19    ComboBoxLevel: TComboBox;
    1920    EditName: TEdit;
    2021    Label1: TLabel;
     22    Label2: TLabel;
    2123    ListView1: TListView;
    2224    PageControl1: TPageControl;
     
    7072
    7173procedure TFormRule.FormCreate(Sender: TObject);
     74var
     75  I: TRuleLevel;
    7276begin
    7377  FormRuleItems := TFormRuleItems.Create(nil);
     
    7680  FormRuleItems.Show;
    7781  UsedByRules := TStringList.Create;
     82  ComboBoxLevel.Items.Clear;
     83  for I := Low(TRuleLevel) to High(RuleLevelText) do
     84    ComboBoxLevel.Items.Add(RuleLevelText[I]);
    7885end;
    7986
     
    9198  EditName.Text := Rule.Name;
    9299  CheckBoxCreateNode.Checked := Rule.CreateSourceNode;
     100  ComboBoxLevel.ItemIndex := Integer(Rule.Level);
    93101  FormRuleItems.LoadData(Rule.Items);
    94102end;
     
    99107  Rule.Name := EditName.Text;
    100108  Rule.CreateSourceNode := CheckBoxCreateNode.Checked;
     109  Rule.Level := TRuleLevel(ComboBoxLevel.ItemIndex);
    101110  FormRuleItems.SaveData(Rule.Items);
    102111end;
Note: See TracChangeset for help on using the changeset viewer.