public virtual void setupForm(ruleForm pRuleForm) { pRuleForm.cbRuleType.Items.AddRange(nameList.Values.ToArray<string>()); pRuleForm.cbRuleType.SelectedIndex = pRuleForm.cbRuleType.Items.IndexOf(nameList[this.GetType()]); pRuleForm.gbRule.Text = nameList[this.GetType()]; pRuleForm.tbFrom.Text = this.fromStr; pRuleForm.tbTo.Text = this.toStr; }
protected void addControl(Control pNewControl, String pControlName, ruleForm pRuleForm) { if (!pRuleForm.ruleControls.ContainsKey(pControlName)) { pRuleForm.addNamedControl(pControlName, pNewControl); } else { Control existingControl = (Label)pRuleForm.ruleControls[pControlName]; existingControl.Show(); } }
public override void setupForm(ruleForm pRuleForm) { base.setupForm(pRuleForm); addControl(new Label() { Location = new System.Drawing.Point(40, 140), Text = "Case Sensitive", AutoSize = true }, "lbCaseSensitive", pRuleForm); addControl( new Label() { Location = new System.Drawing.Point(20, 170), Text = "", AutoSize = true }, "lbRegexError", pRuleForm); addControl( new CheckBox() { Location = new System.Drawing.Point(20, 150) }, "cbCaseSensitive", pRuleForm); // set current Values ((CheckBox)pRuleForm.ruleControls["cbCaseSensitive"]).CheckState = caseSensitive ? CheckState.Checked : CheckState.Unchecked; mkRegEx(); ((Label)pRuleForm.ruleControls["lbRegexError"]).Text = regexError; }
public virtual void saveData(ruleForm ruleForm) { }
public override void saveData(ruleForm ruleForm) { base.saveData(ruleForm); caseSensitive = ((CheckBox)ruleForm.ruleControls["cbCaseSensitive"]).CheckState == CheckState.Checked; }