public static void ShowSingleInstance(SearchAndReplaceMode searchAndReplaceMode) { if (Instance == null) { Instance = new SearchAndReplaceDialog(searchAndReplaceMode); Instance.Show(WorkbenchSingleton.MainForm); } else { if (searchAndReplaceMode == SearchAndReplaceMode.Search) { Instance.searchButton.PerformClick(); } else { Instance.replaceButton.PerformClick(); } Instance.Focus(); } }
public static void ShowSingleInstance(SearchAndReplaceMode searchAndReplaceMode) { if (Instance == null) { Instance = new SearchAndReplaceDialog(searchAndReplaceMode); Instance.Show(WorkbenchSingleton.MainWin32Window); } else { if (searchAndReplaceMode == SearchAndReplaceMode.Search) { Instance.searchButton.PerformClick(); } else { Instance.replaceButton.PerformClick(); } Instance.Focus(); } }
protected override void OnClosing(System.ComponentModel.CancelEventArgs e) { base.OnClosing(e); Instance = null; }
public override void Run() { SetSearchPattern(); SearchAndReplaceDialog.ShowSingleInstance(SearchAndReplaceMode.Search); }