private string GetText(DTE2 dte) { GeneratorDialog dialog = new GeneratorDialog(this, 0); var hwnd = new IntPtr(dte.MainWindow.HWnd); System.Windows.Window window = (System.Windows.Window)HwndSource.FromHwnd(hwnd).RootVisual; dialog.Owner = window; var result = dialog.ShowDialog(); if (result.HasValue && result.Value) return dialog.Text; return null; }
private string GetText(DTE2 dte) { GeneratorDialog dialog = new GeneratorDialog(this, 0); var hwnd = new IntPtr(dte.MainWindow.HWnd); System.Windows.Window window = (System.Windows.Window)HwndSource.FromHwnd(hwnd).RootVisual; dialog.Owner = window; var result = dialog.ShowDialog(); if (result.HasValue && result.Value) { return(dialog.Text); } return(null); }