Exemple #1
0
 /// <summary>
 /// Show custom MessageBox with title
 /// </summary>
 /// <param name="title">Title of message box</param>
 /// <returns></returns>
 public static DialogResult ShowCustomMessageBox(string title)
 {
     messageBox = new PassMessageBox();
     messageBox.lblTitle.Text = title;
     messageBox.ShowDialog();
     messageBox.btnOK.Visible = false;
     return(dialogResult);
 }
Exemple #2
0
 /// <summary>
 /// Show custom MessageBox with message, title and icon
 /// </summary>
 /// <param name="message">Message of message box</param>
 /// <param name="title">Title of message box</param>
 /// <param name="icon">Icon of message box</param>
 /// <returns></returns>
 public static DialogResult ShowCustomMessageBox(string message, string title, Common.Config.CUSTOM_MESSAGEBOX_ICON icon)
 {
     messageBox = new PassMessageBox();
     messageBox.lblMessage.Text = message;
     messageBox.lblTitle.Text   = title;
     if (icon == Common.Config.CUSTOM_MESSAGEBOX_ICON.Information)
     {
         messageBox.pbIcon.BackgroundImage = Properties.Resources.information;
     }
     if (icon == Common.Config.CUSTOM_MESSAGEBOX_ICON.Error)
     {
         messageBox.pbIcon.BackgroundImage = Properties.Resources.thoat;
     }
     messageBox.btnOK.Visible = false;
     messageBox.ShowDialog();
     return(dialogResult);
 }
Exemple #3
0
 /// <summary>
 /// Show custom MessageBox with title, messageButton
 /// </summary>
 /// <param name="title"></param>
 /// <param name="messageButton"></param>
 /// <returns></returns>
 public static DialogResult ShowCustomMessageBox(string title, Common.Config.CUSTOM_MESSAGEBOX_BUTTON messageButton)
 {
     messageBox = new PassMessageBox();
     messageBox.lblTitle.Text = title;
     if (messageButton.Equals(Common.Config.CUSTOM_MESSAGEBOX_BUTTON.OK))
     {
         messageBox.btnAccept.Visible = false;
         messageBox.btnCancel.Visible = false;
         messageBox.btnOK.Location    = messageBox.btnCancel.Location;
     }
     if (messageButton.Equals(Common.Config.CUSTOM_MESSAGEBOX_BUTTON.YESNO))
     {
         messageBox.btnOK.Visible = false;
     }
     messageBox.ShowDialog();
     return(dialogResult);
 }