Exemplo n.º 1
0
        public static CustomMessageBoxReturnValue ShowMessage(String messageText, CustomMessageBoxMessageType customMessageBoxMessageType, CustomMessageBoxButtonType customMessageBoxButtonType)
        {
            _newMessageBox = new CustomMessageBox
            {
                StartPosition   = FormStartPosition.CenterScreen,
                messageControl1 =
                {
                    MessageText                 = messageText,
                    CustomMessageBoxMessageType = customMessageBoxMessageType
                }
            };

            switch (customMessageBoxButtonType)
            {
            case CustomMessageBoxButtonType.YesNo:
                _newMessageBox.btnCancel.Text = ResourceHelper.GetResourceText("No");
                _newMessageBox.btnOK.Text     = ResourceHelper.GetResourceText("Yes");
                break;

            case CustomMessageBoxButtonType.OKSkip:
                _newMessageBox.btnCancel.Text = ResourceHelper.GetResourceText("Skip");
                break;

            case CustomMessageBoxButtonType.OKOnly:
                _newMessageBox.btnOK.Text        = ResourceHelper.GetResourceText("OKText");
                _newMessageBox.btnOK.Left        = (_newMessageBox.Width / 2) - _newMessageBox.btnOK.Width / 2;
                _newMessageBox.btnCancel.Visible = false;
                break;
            }

            _newMessageBox.ShowDialog();
            return(_returnValue);
        }
Exemplo n.º 2
0
 public static CustomMessageBoxReturnValue ShowMessage(String messageText, CustomMessageBoxMessageType customMessageBoxMessageType)
 {
     _newMessageBox = new CustomMessageBox
     {
         StartPosition   = FormStartPosition.CenterScreen,
         messageControl1 =
         {
             MessageText                 = messageText,
             CustomMessageBoxMessageType = customMessageBoxMessageType
         }
     };
     _newMessageBox.ShowDialog();
     return(_returnValue);
 }