private void btnValidate_Click( object sender, EventArgs e )
{
try
{
HourGlass.Start();
var error = new StringBuilder( 1024*1024*6 );
if (!SchemaManager.ValidateXml( atmlPreviewPanel.Text, ATMLCommon.TestDescriptionNameSpace, error ))
{
HourGlass.Stop();
ATMLErrorForm.ShowValidationMessage(
string.Format( "The Test Description has failed validation against the ATML schema." ),
error.ToString(),
"Note: This error will not prevent you from continuing." );
}
else
{
HourGlass.Stop();
MessageBox.Show( @"This Test Description has generated a valid ATML document." );
}
}
finally
{
HourGlass.Stop();
}
}