Changeset 136 for branches/generator/Forms/UFormRuleItems.pas
- Timestamp:
- Dec 26, 2017, 6:59:40 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/generator/Forms/UFormRuleItems.pas
r129 r136 20 20 AMoveUp: TAction; 21 21 ARemove: TAction; 22 ComboBox1: TComboBox; 22 CheckBoxWhiteSpace: TCheckBox; 23 ComboBoxOperator: TComboBox; 23 24 Label1: TLabel; 24 25 ListView1: TListView; … … 40 41 procedure AMoveUpExecute(Sender: TObject); 41 42 procedure ARemoveExecute(Sender: TObject); 43 procedure ComboBoxOperatorChange(Sender: TObject); 42 44 procedure FormCreate(Sender: TObject); 43 45 procedure FormShow(Sender: TObject); … … 82 84 NewRuleItem := TRuleItem.Create; 83 85 NewRuleItem.Grammer := RuleItems.Grammer; 86 NewRuleItem.ParentRule := RuleItems.ParentRule; 84 87 FormRuleItem := TFormRuleItem.Create(nil); 85 88 FormRuleItem.LoadData(NewRuleItem); … … 141 144 end; 142 145 146 procedure TFormRuleItems.ComboBoxOperatorChange(Sender: TObject); 147 begin 148 UpdateInterface; 149 end; 150 143 151 procedure TFormRuleItems.FormCreate(Sender: TObject); 144 152 begin … … 174 182 AMoveUp.Enabled := Assigned(ListView1.Selected) and (ListView1.Selected.Index > 0); 175 183 AMoveDown.Enabled := Assigned(ListView1.Selected) and (ListView1.Selected.Index < (ListView1.Items.Count - 1)); 184 CheckBoxWhiteSpace.Enabled := ComboBoxOperator.ItemIndex = 0; 176 185 end; 177 186 … … 186 195 begin 187 196 Self.RuleItems := RuleItems; 188 ComboBox1.ItemIndex := Integer(RuleItems.RuleType); 197 ComboBoxOperator.ItemIndex := Integer(RuleItems.RuleType); 198 CheckBoxWhiteSpace.Checked := RuleItems.WithWhiteSpeaces; 189 199 end; 190 200 191 201 procedure TFormRuleItems.SaveData(RuleItems: TRuleItems); 192 202 begin 193 RuleItems.RuleType := TRuleType(ComboBox1.ItemIndex); 203 RuleItems.RuleType := TRuleType(ComboBoxOperator.ItemIndex); 204 RuleItems.WithWhiteSpeaces := CheckBoxWhiteSpace.Checked; 194 205 end; 195 206
Note:
See TracChangeset
for help on using the changeset viewer.