Пример #1
0
        // xml navigation sample at http://support.microsoft.com/kb/308333

        private void OpenFile(object sender, RoutedEventArgs e)
        {
            var supportedFiles = new []
            {
                "All supprted files|*.xlsx;*.xls;*.xml;*.json;*.zip",
                "Validation requirement Excel|*.xlsx;*.xls",
                "Validation requirement XML|*.xml",
                "Validation requirement json|*.json",
                "Validation requirement zip|*.zip"
            };

            var openFile = new OpenFileDialog {
                Filter = string.Join("|", supportedFiles)
            };
            var res = openFile.ShowDialog();

            if (!res.HasValue || !res.Value)
            {
                return;
            }
            var r = new FacilityReader();

            ReqFacility = r.LoadFacility(openFile.FileName);
            TestValidation();
        }
Пример #2
0
        internal void ExecuteValidation()
        {
            IsWorking = true;
            PropertyChanged.Invoke(this, new PropertyChangedEventArgs(@"FilesCanChange"));
            SelectRequirement.ChangesHappened();
            SelectSubmission.ChangesHappened();
            SelectReport.ChangesHappened();

            ActivityStatus = "Loading requirement file";
            var fReader = new FacilityReader();

            RequirementFacility = fReader.LoadFacility(RequirementFileSource);

            ActivityStatus = "Loading submission file";
            LoadSubmissionFile(SubmissionFileSource);
        }
        internal void ExecuteValidation()
        {
            IsWorking = true;
            if (PropertyChanged != null)
            {
                PropertyChanged.Invoke(this, new PropertyChangedEventArgs(@"FilesCanChange"));
            }
            SelectRequirement.ChangesHappened();
            SelectModelSubmission.ChangesHappened();
            SelectReport.ChangesHappened();

            ActivityStatus = "Loading requirement file";
            var fReader = new FacilityReader();

            RequirementFacility = fReader.LoadFacility(RequirementFileSource);

            ActivityStatus = "Loading submission file";
            // once done loading the model file execute ValidateFacilities
            LoadModelFile(SubmissionFileSource, ValidateFacilities);
        }