Ejemplo n.º 1
0
        private void btnReportBug_Click(object sender, EventArgs e)
        {
            var lang = Language.ExceptionForm;

            string       email = null;
            DialogResult res   = MessageBox.Show(lang.WouldYouLikeAResponse_Message, lang.WouldYouLikeAResponse_Title, MessageBoxButtons.YesNo, MessageBoxIcon.Question);

            if (res == DialogResult.Yes)
            {
                GetInputForm.ShowForm(lang.HowCanWeContactYou_Title, lang.HowCanWeContactYou_Message, out email);
            }

            try
            {
                Cursor.Current = Cursors.WaitCursor;

                SubmitError(email);

                Cursor.Current = Cursors.Default;

                MessageBox.Show(lang.SubmitBugSuccessful_Message, "", MessageBoxButtons.OK, MessageBoxIcon.Information);

                Close();
            }
            catch (Exception ex)
            {
                Cursor.Current = Cursors.Default;
                MessageBox.Show(ex.Message, lang.SubmitBugError_Title, MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
Ejemplo n.º 2
0
 public static bool ShowForm(string windowText, string labelText, out string userInput)
 {
     Cursor.Current = Cursors.WaitCursor;
     using (GetInputForm form = new GetInputForm())
     {
         form.Text        = windowText;
         form.label1.Text = labelText;
         Cursor.Current   = Cursors.Default;
         if (form.ShowDialog() == DialogResult.OK)
         {
             userInput = form.textBox1.Text.Trim();
             return(!string.IsNullOrEmpty(userInput));
         }
         else
         {
             userInput = null;
             return(false);
         }
     }
 }
Ejemplo n.º 3
0
		public static bool ShowForm(string windowText, string labelText, out string userInput)
		{
			Cursor.Current = Cursors.WaitCursor;
			using (GetInputForm form = new GetInputForm())
			{
				form.Text = windowText;
				form.label1.Text = labelText;
				Cursor.Current = Cursors.Default;
				if (form.ShowDialog() == DialogResult.OK)
				{
					userInput = form.textBox1.Text.Trim();
					return !string.IsNullOrEmpty(userInput);
				}
				else
				{
					userInput = null;
					return false;
				}
			}
		}