Beispiel #1
0
        public UserAlertBox(string message, UserAlertType userAlertType)
        {
            InitializeComponent();

            if (userAlertType == UserAlertType.unitTestErrorMessage)
            {
                chkbNeverShowAgain.Visible = true;
                chkbNeverShowAgain.Checked = ivNeverShowThisAgainForThisSession;
                this.Refresh();
            }
            else if (userAlertType == UserAlertType.exception)
            {
                this.Text            = UTGHelper.CommonErrors.DEFAULT_EXCEPTION_TEXT_TITLE;
                this.txtContent.Text = UTGHelper.CommonErrors.DEFAULT_EXCEPTION_TEXT;
            }
            else if (userAlertType == UserAlertType.regularMessage)
            {
                this.Text            = UTGHelper.CommonErrors.DEFAULT_MESSAGE_TEXT_TITLE;
                this.txtContent.Text = UTGHelper.CommonErrors.DEFAULT_MESSAGE_TEXT;
            }

            if (userAlertType == UserAlertType.unitTestErrorMessage && ivNeverShowThisAgainForThisSession)
            {
                this.Close();
                return;
            }

            this.txtContent.Text += message;
        }
Beispiel #2
0
      public UserAlertBox(string message, UserAlertType userAlertType)
      {
         InitializeComponent();

         if (userAlertType == UserAlertType.unitTestErrorMessage)
         {
            chkbNeverShowAgain.Visible = true;
            chkbNeverShowAgain.Checked = ivNeverShowThisAgainForThisSession;
            this.Refresh();
         }
         else if (userAlertType == UserAlertType.exception)
         {
            this.Text = UTGHelper.CommonErrors.DEFAULT_EXCEPTION_TEXT_TITLE;
            this.txtContent.Text = UTGHelper.CommonErrors.DEFAULT_EXCEPTION_TEXT;
         }
         else if (userAlertType == UserAlertType.regularMessage)
         {
             this.Text = UTGHelper.CommonErrors.DEFAULT_MESSAGE_TEXT_TITLE;
             this.txtContent.Text = UTGHelper.CommonErrors.DEFAULT_MESSAGE_TEXT;
         }

         if (userAlertType == UserAlertType.unitTestErrorMessage && ivNeverShowThisAgainForThisSession)
         {
            this.Close();
            return;
         }

         this.txtContent.Text += message;
      }