ATMLCommonLibrary.controls.equipment.TestStationForm.btnValidate_Click C# (CSharp) Method

btnValidate_Click() private method

private btnValidate_Click ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void
        private void btnValidate_Click( object sender, EventArgs e )
        {
            try
            {
                var error = new StringBuilder(1024 * 1024 * 6);
                TestStationDescription11 testStation = TestStationDescription;
                if (testStation != null)
                {
                    if (!SchemaManager.ValidateXml( testStation.Serialize(), ATMLCommon.TestStationNameSpace, error ))
                    {
                        ATMLErrorForm.ShowValidationMessage(
                            string.Format(
                                "The \"{0}\" Test Station has failed validation against the ATML {1} schema.",
                                testStation.name, ATMLCommon.TestStationNameSpace ),
                            error.ToString(),
                            "Note: This error will not prevent you from continuing." );
                    }
                    else
                    {
                        MessageBox.Show( @"This Test Station generated valid ATML" );
                    }
                }
            }
            catch (Exception err)
            {
                LogManager.Error( err );
            }
        }