public static DialogResult Show(string message) { _msgBox = new lxMessageBox(); _msgBox._lblMessage.Text = message; lxMessageBox.InitButtons(Buttons.OK); _msgBox.ShowDialog(); MessageBeep(0); return(_buttonResult); }
public static DialogResult Show(string message, string title, Buttons buttons, Icon icon) { _msgBox = new lxMessageBox(); _msgBox._lblMessage.Text = message; _msgBox._lblTitle.Text = title; lxMessageBox.InitButtons(buttons); _msgBox.Size = lxMessageBox.MessageSize(message); _msgBox.ShowDialog(); MessageBeep(0); return(_buttonResult); }
public static DialogResult Show(string message, string title, Buttons buttons, Icon icon, AnimateStyle style) { _msgBox = new lxMessageBox(); _msgBox._lblMessage.Text = message; _msgBox._lblTitle.Text = title; _msgBox.Height = 0; lxMessageBox.InitButtons(buttons); _timer = new Timer(); Size formSize = lxMessageBox.MessageSize(message); switch (style) { case lxMessageBox.AnimateStyle.SlideDown: _msgBox.Size = new Size(formSize.Width, 0); _timer.Interval = 1; _timer.Tag = new ApplyAnimation(formSize, style); break; case lxMessageBox.AnimateStyle.FadeIn: _msgBox.Size = formSize; _msgBox.Opacity = 0; _timer.Interval = 20; _timer.Tag = new ApplyAnimation(formSize, style); break; case lxMessageBox.AnimateStyle.ZoomIn: _msgBox.Size = new Size(formSize.Width + 100, formSize.Height + 100); _timer.Tag = new ApplyAnimation(formSize, style); _timer.Interval = 1; break; } _timer.Tick += timer_Tick; _timer.Start(); _msgBox.ShowDialog(); MessageBeep(0); return(_buttonResult); }