Exemplo n.º 1
0
        public static bool?Show(string message, string title, bool showCancelButton, DialogWinImage image, UIElement relative)
        {
            DialogWin win   = new DialogWin();
            Window    owner = FindTopWin(relative);

            win.Owner = owner;
            if (owner != null)
            {
                win.WindowStartupLocation = WindowStartupLocation.CenterOwner;
            }
            else
            {
                win.WindowStartupLocation = WindowStartupLocation.CenterScreen;
            }

            win.ViewModel.Content = message;
            win.ViewModel.Image   = image;
            if (title != null)
            {
                win.ViewModel.Title = title;
            }
            win.ViewModel.ButtonCancelVisible = showCancelButton ? Visibility.Visible : Visibility.Collapsed;
            bool?flag = win.ShowDialog();

            return(flag);
        }
Exemplo n.º 2
0
 public static void ShowError(string err)
 {
     DialogWin.Show(err, DialogWinImage.Error);
 }
Exemplo n.º 3
0
 public static void ShowWarning(string warning)
 {
     DialogWin.Show(warning, DialogWinImage.Warning);
 }
Exemplo n.º 4
0
 public static void ShowMessage(string msg)
 {
     DialogWin.Show(msg);
 }