public static NS_MessageBoxResult ShowDialog(string messageText, string messageDesctiption, NS_MessageBoxButtons buttons, NS_MessageBoxIcon icon) { return(ShowDialog(null, messageText, messageDesctiption, buttons, icon)); }
public static NS_MessageBoxResult ShowDialog(Window owner, string messageText, string messageDesctiption, NS_MessageBoxButtons buttons, NS_MessageBoxIcon icon) { MessageBoxWin content = new MessageBoxWin() { MessageText = messageText, MessageDescription = messageDesctiption, MessageBoxButtons = buttons, MessageBoxImage = icon }; Window win = new Window(); //NS.Controls.CustomControls.CustomWindow win = new NS.Controls.CustomControls.CustomWindow(); if (owner != null) { win.Owner = owner; win.WindowStartupLocation = WindowStartupLocation.CenterOwner; } else { win.WindowStartupLocation = WindowStartupLocation.CenterScreen; } //win.TitleLeft = true; win.SizeToContent = SizeToContent.WidthAndHeight; win.ResizeMode = ResizeMode.NoResize; //win.ShowFullScreenButton = false; //win.ShowMinimizeButton = false; win.Content = content; win.ShowDialog(); return(content.MessageBoxResult); }
public static NS_MessageBoxResult ShowDialog(Window owner, string messageText, string messageDesctiption, NS_MessageBoxButtons buttons) { return(ShowDialog(owner, messageText, messageDesctiption, buttons, NS_MessageBoxIcon.None)); }