ATMLCommonLibrary.forms.ATMLErrorForm.ShowValidationMessage C# (CSharp) Method

ShowValidationMessage() public static method

public static ShowValidationMessage ( string title, string message, string note = null ) : void
title string
message string
note string
return void
        public static void ShowValidationMessage( string title, string message, string note = null )
        {
            ATMLErrorForm form = new ATMLErrorForm(title.Replace("\n", "<br/>"), message.Replace("\n", "<br/>"), note);
            form.Show();
        }

Usage Example

        private void ValidateToSchema()
        {
            HourGlass.Start();
            var error = new StringBuilder(1024 * 1024 * 6);
            InstrumentDescription instrument = InstrumentDescription;

            try
            {
                if (!SchemaManager.ValidateXml(instrument.Serialize(), ATMLCommon.InstrumentNameSpace, error))
                {
                    HourGlass.Stop();
                    string name = GetName(instrument);
                    ATMLErrorForm.ShowValidationMessage(
                        string.Format("The \"{0}\" Instrument has failed validation against the {1} ATML schema.", name,
                                      ATMLCommon.InstrumentNameSpace),
                        error.ToString(), "Note: This error will not prevent you from continuing.");
                }
                else
                {
                    HourGlass.Stop();
                    MessageBox.Show(@"This Instrument generated valid ATML");
                }
            }
            catch (Exception)
            {
                HourGlass.Stop();
            }
        }
All Usage Examples Of ATMLCommonLibrary.forms.ATMLErrorForm::ShowValidationMessage