Ejemplo n.º 1
0
        //保存
        private void btnSave_Click(object sender, EventArgs e) {
            if (CheckInput()) {
                Config.Replacement elm = new Config.Replacement();
                elm.NewValue = this.txtNewValue.Text;
                elm.OldValue = this.txtOldValue.Text;
                elm.OnlyMatchOldValue = this.chbOnlyOldValue.Checked;
                elm.Repeatable = this.chbRepeatedReplacement.Checked;
                elm.UseRegex = this.chbUseRegex.Checked;

                Replace.Add(elm);
                BindDataToFormControle();

                this.txtNewValue.Clear();
                this.txtOldValue.Clear();
                this.chbOnlyOldValue.Checked = false;
                this.chbRepeatedReplacement.Checked = false;
                this.chbUseRegex.Checked = false;
                this.txtOldValue.Focus();
            }
        }
Ejemplo n.º 2
0
        //保存
        private void btnSave_Click(object sender, EventArgs e)
        {
            if (CheckInput())
            {
                Config.Replacement elm = new Config.Replacement();
                elm.NewValue          = this.txtNewValue.Text;
                elm.OldValue          = this.txtOldValue.Text;
                elm.OnlyMatchOldValue = this.chbOnlyOldValue.Checked;
                elm.Repeatable        = this.chbRepeatedReplacement.Checked;
                elm.UseRegex          = this.chbUseRegex.Checked;

                Replace.Add(elm);
                BindDataToFormControle();

                this.txtNewValue.Clear();
                this.txtOldValue.Clear();
                this.chbOnlyOldValue.Checked        = false;
                this.chbRepeatedReplacement.Checked = false;
                this.chbUseRegex.Checked            = false;
                this.txtOldValue.Focus();
            }
        }