public static void Show(string mess, BitmapSource BackImgSour = null) { MessageBoxOK AduMessageBoxOK = new MessageBoxOK(mess); if (BackImgSour != null) { ImageBrush img = new ImageBrush(BackImgSour); img.Stretch = Stretch.UniformToFill; AduMessageBoxOK = new MessageBoxOK(mess, BackImgSour); } AduMessageBoxOK.Show(); }
/// <summary> /// 显示对话框 /// </summary> /// <param name="mess">提示消息</param> /// <param name="style">对话框样式</param> public static bool?ShowDialog(string mess, int style, BitmapSource backImgSour = null) { switch (style) { case 0: MessageBoxOK AduMessageBoxOK = new MessageBoxOK(mess, backImgSour); return(AduMessageBoxOK.ShowDialog()); case 1: MessageBoxOKCancle AduMessageBoxOKCancle = new MessageBoxOKCancle(mess, backImgSour); return(AduMessageBoxOKCancle.ShowDialog()); default: return(false); } }