コード例 #1
0
ファイル: DialogWindow.xaml.cs プロジェクト: UcAspNet/ntminer
        public static void ShowSoftDialog(DialogWindowViewModel vm)
        {
            Window window = new DialogWindow(vm);

            window.MousePosition();
            window.ShowSoftDialog();
        }
コード例 #2
0
        public static void ShowDialog(string icon    = null,
                                      string title   = null,
                                      string message = null,
                                      string helpUrl = null,
                                      Action onYes   = null,
                                      Action onNo    = null)
        {
            Window window = new DialogWindow(icon, title, message, helpUrl, onYes, onNo);

            if (window.Owner != null)
            {
                window.MousePosition();
                double ownerOpacity = window.Owner.Opacity;
                window.Owner.Opacity = 0.6;
                window.ShowDialog();
                window.Owner.Opacity = ownerOpacity;
            }
            else
            {
                window.ShowDialog();
            }
        }