public void ShowError(string title, string text, string extra, params ButtonExtras[] buttonExtras)
        {
            DialogMessageService service = new DialogMessageService(null);

            service.Icon         = DialogMessageIcon.Error;
            service.Buttons      = DialogMessageButtons.Ok;
            service.Title        = title;
            service.Text         = text;
            service.Extra        = extra;
            service.ButtonExtras = buttonExtras;
            var result = service.Show();
        }
示例#2
0
 public bool ShowConfirmation(string title, string text, string extra, params ButtonExtras[] buttonExtras)
 {
     DialogMessageService service = new DialogMessageService(null);
     service.Icon = DialogMessageIcon.Question;
     service.Buttons = DialogMessageButtons.Yes | DialogMessageButtons.No;
     service.Title = title;
     service.Text = text;
     service.Extra = extra;
     service.ButtonExtras = buttonExtras;
     var result = service.Show();
     return result == DialogMessageResult.Yes;
 }
        public bool ShowConfirmation(string title, string text, string extra, params ButtonExtras[] buttonExtras)
        {
            DialogMessageService service = new DialogMessageService(null);

            service.Icon         = DialogMessageIcon.Question;
            service.Buttons      = DialogMessageButtons.Yes | DialogMessageButtons.No;
            service.Title        = title;
            service.Text         = text;
            service.Extra        = extra;
            service.ButtonExtras = buttonExtras;
            var result = service.Show();

            return(result == DialogMessageResult.Yes);
        }
示例#4
0
        public void ShowError(string title, string text, string extra, params ButtonExtras[] buttonExtras)
        {
            var service = new DialogMessageService(null)
            {
                Icon         = DialogMessageIcon.Error,
                Buttons      = DialogMessageButtons.Ok,
                Title        = title,
                Text         = text,
                Extra        = extra,
                ButtonExtras = buttonExtras
            };

            service.Show();
        }
示例#5
0
        public bool ShowConfirmation(string title, string text, string extra, params ButtonExtras[] buttonExtras)
        {
            var service = new DialogMessageService(null)
            {
                Icon         = DialogMessageIcon.Question,
                Buttons      = DialogMessageButtons.Yes | DialogMessageButtons.No,
                Title        = title,
                Text         = text,
                Extra        = extra,
                ButtonExtras = buttonExtras
            };
            var result = service.Show();

            return(result == DialogMessageResult.Yes);
        }
        public bool?ShowConfirmationWithCancel(string title, string text, string extra, params ButtonExtras[] buttonExtras)
        {
            DialogMessageService service = new DialogMessageService(null);

            service.Icon         = DialogMessageIcon.Question;
            service.Buttons      = DialogMessageButtons.Yes | DialogMessageButtons.No | DialogMessageButtons.Cancel;
            service.Title        = title;
            service.Text         = text;
            service.Extra        = extra;
            service.ButtonExtras = buttonExtras;
            var result = service.Show();

            switch (result)
            {
            case DialogMessageResult.Yes:
                return(true);

            case DialogMessageResult.No:
                return(false);
            }
            return(null);
        }
示例#7
0
 public bool? ShowConfirmationWithCancel(string title, string text, string extra, params ButtonExtras[] buttonExtras)
 {
     DialogMessageService service = new DialogMessageService(null);
     service.Icon = DialogMessageIcon.Question;
     service.Buttons = DialogMessageButtons.Yes | DialogMessageButtons.No | DialogMessageButtons.Cancel;
     service.Title = title;
     service.Text = text;
     service.Extra = extra;
     service.ButtonExtras = buttonExtras;
     var result = service.Show();
     switch (result)
     {
         case DialogMessageResult.Yes:
             return true;
         case DialogMessageResult.No:
             return false;
     }
     return null;
 }
示例#8
0
 public void ShowWarning(string title, string text, string extra, params ButtonExtras[] buttonExtras)
 {
     DialogMessageService service = new DialogMessageService(null);
     service.Icon = DialogMessageIcon.Warning;
     service.Buttons = DialogMessageButtons.Ok;
     service.Title = title;
     service.Text = text;
     service.Extra = extra;
     service.ButtonExtras = buttonExtras;
     var result = service.Show();
 }
示例#9
0
 public bool ShowConfirmation(string title, string text, string extra, params ButtonExtras[] buttonExtras)
 {
     var service = new DialogMessageService(null)
                   {
                       Icon = DialogMessageIcon.Question,
                       Buttons = DialogMessageButtons.Yes | DialogMessageButtons.No,
                       Title = title,
                       Text = text,
                       Extra = extra,
                       ButtonExtras = buttonExtras
                   };
     var result = service.Show();
     return result == DialogMessageResult.Yes;
 }
示例#10
0
 public void ShowWarning(string title, string text, string extra, params ButtonExtras[] buttonExtras)
 {
     var service = new DialogMessageService(null)
                                    {
                                        Icon = DialogMessageIcon.Warning,
                                        Buttons = DialogMessageButtons.Ok,
                                        Title = title,
                                        Text = text,
                                        Extra = extra,
                                        ButtonExtras = buttonExtras
                                    };
     service.Show();
 }