Inheritance: System.Windows.Window
コード例 #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;
        }
コード例 #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);
        }