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); } }
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); } }