Esempio n. 1
0
 public static MessageBoxResult ShowDialogYesNo(this ModernDialog modernDialog)
 {
     modernDialog.set_Buttons(new Button[]
     {
         modernDialog.get_YesButton(),
         modernDialog.get_NoButton()
     });
     modernDialog.ShowDialog();
     return(modernDialog.get_MessageBoxResult());
 }
Esempio n. 2
0
        public static ModernDialog CreateModernDialog(string title, string content, string textYesButton = null, string textNoButton = null, string textOkButton = null, string textCancelButton = null)
        {
            ModernDialog expr_05 = new ModernDialog();

            expr_05.Title = title;
            BBCodeBlock expr_12 = new BBCodeBlock();

            expr_12.set_BBCode(content);
            expr_12.TextWrapping = TextWrapping.WrapWithOverflow;
            expr_05.Content      = expr_12;
            ModernDialog modernDialog = expr_05;

            modernDialog.BorderBrush = (modernDialog.FindResource("YellowBaseBrush") as Brush);
            if (ObjectHolder.MainForm != null && ObjectHolder.MainForm.IsVisible)
            {
                modernDialog.Owner = ObjectHolder.MainForm;
            }
            modernDialog.get_YesButton().Content    = (textYesButton ?? Components.ModernDialogExtension_CreateModernDialog_Yes);
            modernDialog.get_NoButton().Content     = (textNoButton ?? Components.ModernDialogExtension_CreateModernDialog_No);
            modernDialog.get_OkButton().Content     = (textOkButton ?? Components.ModernDialogExtension_CreateModernDialog_Ok);
            modernDialog.get_CancelButton().Content = (textCancelButton ?? Components.ModernDialogExtension_CreateModernDialog_Cancel);
            return(modernDialog);
        }