Ejemplo n.º 1
0
        private void btnReplace_Click(object sender, EventArgs e)
        {
            if (this.MainForm == null || this.MainForm.IsDisposed)
            {
                return;
            }

            IScriptEditForm scriptEditForm = this.MainForm.ActiveDocument as IScriptEditForm;

            if (scriptEditForm != null && !scriptEditForm.IsDisposed)
            {
                scriptEditForm.ReplaceText(this.txtFindText.Text, this.txtReplaceText.Text, this.chkMatchCase.Checked, false);
            }
        }
Ejemplo n.º 2
0
        private void btnReplaceAll_Click(object sender, EventArgs e)
        {
            if (this.MainForm == null || this.MainForm.IsDisposed)
            {
                return;
            }

            IScriptEditForm scriptEditForm = this.MainForm.ActiveDocument as IScriptEditForm;

            if (scriptEditForm != null && !scriptEditForm.IsDisposed)
            {
                GlobalMethods.UI.SetCursor(this, Cursors.WaitCursor);
                scriptEditForm.ReplaceText(this.txtFindText.Text, this.txtReplaceText.Text, this.chkMatchCase.Checked, true);
                GlobalMethods.UI.SetCursor(this, Cursors.Default);
            }
        }