Inheritance: System.Windows.Window
Esempio n. 1
0
        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;
        }
Esempio n. 2
0
        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);
        }