Inheritance: System.Windows.Forms.Form
Exemple #1
0
        //public void SaveModel()
        //{
        //  SaveFile(_modelFile.FullName);
        //}

        public void Verify()
        {
            if (this.Generator != null)
            {
                if (((INHydrateGenerator)this.Generator).RootController != null)
                {
                    var processKey = UIHelper.ProgressingStarted();
                    try
                    {
                        this.Enabled = false;
                        this.lvwError.ClearMessages();
                        var mList = ((INHydrateGenerator)this.Generator).RootController.Verify();
                        this.lvwError.AddMessages(mList);
                        UIHelper.ProgressingComplete(processKey);

                        var text = "Verification is complete.";
                        if (mList.Count > 0)
                        {
                            text += "\r\nThere are " + mList.Count + " error(s) and warning(s).";
                        }
                        MessageBox.Show(text, "Complete", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }
                    catch (Exception ex)
                    {
                        UIHelper.ProgressingComplete(processKey);
                        WSLog.LogError(ex);
                        var F = new ErrorForm("An error occurred during the verification process.", ex.ToString());
                        F.ShowDialog();
                        System.Diagnostics.Debug.WriteLine(ex.ToString());
                    }
                    finally
                    {
                        UIHelper.ProgressingComplete(processKey);
                        this.Enabled = true;
                    }
                }
            }
        }
		public static void ShowError(string text, Exception exception)
		{
			var F = new ErrorForm(text, exception.ToString());
			F.ShowDialog();
		}
		public static void ShowError(string text)
		{
			var F = new ErrorForm(text, "No other information is available.");
			F.ShowDialog();
		}
Exemple #4
0
		//public void SaveModel()
		//{
		//  SaveFile(_modelFile.FullName);
		//}

		public void Verify()
		{
			if (this.Generator != null)
			{
				if (((INHydrateGenerator)this.Generator).RootController != null)
				{
					var processKey = UIHelper.ProgressingStarted();
					try
					{
						this.Enabled = false;
						this.lvwError.ClearMessages();
						var mList = ((INHydrateGenerator)this.Generator).RootController.Verify();
						this.lvwError.AddMessages(mList);
						UIHelper.ProgressingComplete(processKey);

						var text = "Verification is complete.";
						if (mList.Count > 0)
						{
							text += "\r\nThere are " + mList.Count + " error(s) and warning(s).";
						}
						MessageBox.Show(text, "Complete", MessageBoxButtons.OK, MessageBoxIcon.Information);
					}
					catch (Exception ex)
					{
						UIHelper.ProgressingComplete(processKey);
						WSLog.LogError(ex);
						var F = new ErrorForm("An error occurred during the verification process.", ex.ToString());
						F.ShowDialog();
						System.Diagnostics.Debug.WriteLine(ex.ToString());
					}
					finally
					{
						UIHelper.ProgressingComplete(processKey);
						this.Enabled = true;
					}

				}
			}
		}