public static string DialogString(string defaultText = "")
        {
            DialogGetString dialog = new DialogGetString();
            dialog.Owner = Application.Current.MainWindow;
            dialog.SetDefaultText(defaultText);

            Point point = Mouse.GetPosition(Application.Current.MainWindow);
            point = Application.Current.MainWindow.PointToScreen(point);
            dialog.Top = point.Y;
            dialog.Left = point.X;

            dialog.ShowDialog();

            return dialog.GetResult();
        }
示例#2
0
        public static string DialogString(string defaultText = "")
        {
            DialogGetString dialog = new DialogGetString();

            dialog.Owner = Application.Current.MainWindow;
            dialog.SetDefaultText(defaultText);

            Point point = Mouse.GetPosition(Application.Current.MainWindow);

            point       = Application.Current.MainWindow.PointToScreen(point);
            dialog.Top  = point.Y;
            dialog.Left = point.X;

            dialog.ShowDialog();

            return(dialog.GetResult());
        }