예제 #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();
            }
        }
예제 #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();
            }
        }