Exemplo n.º 1
0
        /// <summary>
        /// Use to alert the user with a message. Will not log. Use HandleException on unexpected errors
        /// </summary>
        /// <param name="message"></param>
        /// <param name="emp"></param>
        public static void ShowMessage(string message)
        {
            UserAlertBox txtUserAlert = new UserAlertBox(
                message,
                UserAlertBox.UserAlertType.regularMessage);

            txtUserAlert.Show();
        }
Exemplo n.º 2
0
      /// <summary>
      /// Use to alert the user with a message. Will not log. Use HandleException on unexpected errors
      /// </summary>
      /// <param name="message"></param>
      /// <param name="emp"></param>
      public static void ShowMessage(string message)
      {
         UserAlertBox txtUserAlert = new UserAlertBox(
                 message,
                 UserAlertBox.UserAlertType.regularMessage);

         txtUserAlert.Show();
      }
Exemplo n.º 3
0
        private static void ShowError(string generalMessage, string details)
        {
            UserAlertBox txtUserAlert = new UserAlertBox(
                generalMessage,
                details,
                UserAlertBox.UserAlertType.exception);

            txtUserAlert.Show();
        }
Exemplo n.º 4
0
      private static void ShowError(string generalMessage, string details)
      {
         UserAlertBox txtUserAlert = new UserAlertBox(
                 generalMessage,
                 details,
                 UserAlertBox.UserAlertType.exception);

         txtUserAlert.Show();
      }
Exemplo n.º 5
0
      private void OnTestClassCommandHandler()
      {
         List<TestFixturOption> lstRunOptions = new List<TestFixturOption>();
         
         FileCodeModel2 fcm = (FileCodeModel2)_applicationObject.ActiveDocument.ProjectItem.FileCodeModel;

         //Noticed that null happens on metadata files...
         if (fcm == null)
         {
            UTGHelper.UserAlertBox userAlert = new UserAlertBox("No selection is made!", UserAlertBox.UserAlertType.regularMessage);
            userAlert.Show();
            return;
         }

         TextSelection sel = (TextSelection)_applicationObject.ActiveDocument.Selection;

         
         CodeElement ce = CodeExaminor.FindInnerMostCodeElement(fcm.CodeElements, sel.TopPoint);

         if (ce is CodeClass)
         {
            TestFixturOption runOption = new TestFixturOption();
            runOption.IsDebugging = false;
            runOption.Project = ce.ProjectItem.ContainingProject;
            runOption.CClass = ce as CodeClass;
            lstRunOptions.Add(runOption);
         }
         else
         {
            UTGHelper.UserAlertBox userAlert = new UserAlertBox("Selection is not a Method or Function!", UserAlertBox.UserAlertType.regularMessage);
            userAlert.Show();
            return;
         }

         OnRunTestCommandHandler(lstRunOptions);
      }