Ignore:
Timestamp:
Nov 30, 2017, 6:33:17 PM (7 years ago)
Author:
chronos
Message:
  • Modified: Show char length of rule.
Location:
branches/generator/Forms
Files:
5 edited

Legend:

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

    r127 r128  
    8181        Top = 0
    8282        Width = 8
    83         Caption = 'ToolButton6'
    8483        Style = tbsSeparator
    8584      end
  • branches/generator/Forms/UFormRuleItems.lfm

    r122 r128  
    44  Top = 316
    55  Width = 636
    6   Caption = 'FormRuleItems'
     6  Caption = 'Rule items'
    77  ClientHeight = 467
    88  ClientWidth = 636
     
    3939    Width = 636
    4040    Align = alBottom
    41     Caption = 'ToolBar1'
    4241    Images = Core.ImageList1
    4342    ParentShowHint = False
  • branches/generator/Forms/UFormRuleItems.pas

    r126 r128  
    111111procedure TFormRuleItems.AMoveDownExecute(Sender: TObject);
    112112begin
    113   RuleItems.ParentRule.Items.Move(ListView1.Selected.Index, ListView1.Selected.Index + 1);
    114   ListView1.ItemIndex := ListView1.Selected.Index + 1;
    115   ReloadList;
     113  if Assigned(ListView1.Selected) then begin
     114    RuleItems.Move(ListView1.Selected.Index, ListView1.Selected.Index + 1);
     115    ListView1.ItemIndex := ListView1.Selected.Index + 1;
     116    ReloadList;
     117  end;
    116118end;
    117119
    118120procedure TFormRuleItems.AMoveUpExecute(Sender: TObject);
    119121begin
    120   RuleItems.ParentRule.Items.Move(ListView1.Selected.Index, ListView1.Selected.Index - 1);
    121   ListView1.ItemIndex := ListView1.Selected.Index - 1;
    122   ReloadList;
     122  if Assigned(ListView1.Selected) then begin
     123    RuleItems.Move(ListView1.Selected.Index, ListView1.Selected.Index - 1);
     124    ListView1.ItemIndex := ListView1.Selected.Index - 1;
     125    ReloadList;
     126  end;
    123127end;
    124128
     
    131135  for I := ListView1.Items.Count - 1 downto 0 do
    132136  if ListView1.Items[I].Selected then begin
    133     RuleItems.ParentRule.Items.Remove(TRuleItem(ListView1.Items[I].Data));
     137    RuleItems.Remove(TRuleItem(ListView1.Items[I].Data));
    134138    RuleItems.Grammer.Modified := True;
    135139  end;
  • branches/generator/Forms/UFormRules.lfm

    r122 r128  
    3434      BorderSpacing.Left = 22
    3535      BorderSpacing.Top = 3
    36       Caption = 'ToolBar1'
    3736      EdgeInner = esNone
    3837      EdgeOuter = esNone
     
    7877        Caption = 'Items'
    7978        Width = 500
     79      end   
     80      item
     81        Caption = 'Char length'
     82        Width = 80
    8083      end>
    8184    MultiSelect = True
  • branches/generator/Forms/UFormRules.pas

    r126 r128  
    146146    Item.SubItems.Add(BooleanText[CreateSourceNode]);
    147147    Item.SubItems.Add(Items.GetString);
     148    Item.SubItems.Add(IntToStr(Items.GetCharLength));
    148149  end;
    149150end;
Note: See TracChangeset for help on using the changeset viewer.