Example #1
0
 /// <summary>
 /// Конструктор главной формы
 /// </summary>
 public fMain()
 {
     InitializeComponent();
     Log.Write("Запуск программы");
     validator = new ValidatorXML(CommonConst.AppPathXSD);
     UpdateFileList();
 }
Example #2
0
        /// <summary>
        /// Показать форму
        /// </summary>
        public static void Show(ValidatorXML validator)
        {
            var t = new fResult();

            t.LoadResult(validator);
            t.ShowDialog();
        }
Example #3
0
 /// <summary>
 /// Загрузить схемы XSD
 /// </summary>
 public ValidatorXML(string schemaPath)
 {
     WarningAsErrors = true;
     schemaset       = new XmlSchemaSet();
     foreach (string s in Directory.GetFiles(schemaPath, "*.xsd"))
     {
         schemaset.Add(XmlSchema.Read(XmlReader.Create(s), new ValidationEventHandler((ss, e) => OnValidateReadSchema(ss, e))));
     }
     instance = this;
 }
Example #4
0
 /// <summary>
 /// Обновитить контролы на форме
 /// </summary>
 private void LoadResult(ValidatorXML validator)
 {
     _validator         = validator;
     memoEditError.Text = string.Format("{0}\r\n{1}", validator.WarningMessage, validator.ErrorMessage);
 }