public static ReplaceDialog GetReplaceDialog(FindReplaceModel findReplaceModel, ITextEditor textEditor, IMessageDisplayService messageManager) { if (ReplaceDialog.replaceDialog == null) { ReplaceDialog.replaceDialog = new ReplaceDialog(findReplaceModel, textEditor, messageManager); } return(ReplaceDialog.replaceDialog); }
protected override void OnClosing(CancelEventArgs e) { ReplaceDialog.replaceDialog = (ReplaceDialog)null; base.OnClosing(e); this.Owner.Activate(); if (!this.shouldFocusTextEditor) { return; } this.shouldFocusTextEditor = false; this.textEditor.Focus(); }