12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Windows.Media;
- namespace Aitex.Core.UI.Dialog
- {
- public class MessageBoxEx
- {
- /// <summary>
- /// show information dialog
- /// </summary>
- /// <param name="infoTitle">information title string</param>
- /// <param name="infoContent">information content string</param>
- public static void ShowInfo(string infoTitle, string infoContent)
- {
- NotificationDialog dlg = new NotificationDialog() { MessageTitle = infoTitle, MessageContent = infoContent, BannerColor = Brushes.DodgerBlue };
- dlg.Show();
- }
- /// <summary>
- /// show information dialog
- /// </summary>
- /// <param name="infoTitle">information title string</param>
- /// <param name="infoContent">information content string</param>
- public static void ShowInfoNoDelay(string infoTitle, string infoContent)
- {
- NotificationDialogNoDelay dlg = new NotificationDialogNoDelay() { MessageTitle = infoTitle, MessageContent = infoContent, BannerColor = Brushes.DodgerBlue };
- dlg.Show();
- }
- /// <summary>
- /// show warning dialog
- /// </summary>
- /// <param name="infoTitle">information title string</param>
- /// <param name="infoContent">information content string</param>
- public static void ShowWarning(string infoTitle, string infoContent)
- {
- NotificationDialog dlg = new NotificationDialog() { MessageTitle = infoTitle, MessageContent = infoContent, BannerColor = Brushes.Gold };
- dlg.Show();
- }
- /// <summary>
- /// show error dialog
- /// </summary>
- /// <param name="infoTitle">information title string</param>
- /// <param name="infoContent">information content string</param>
- public static void ShowError(string infoTitle, string infoContent)
- {
- NotificationDialog dlg = new NotificationDialog() { MessageTitle = infoTitle, MessageContent = infoContent, BannerColor = Brushes.Red };
- dlg.Show();
- }
- }
- }
|