コード例 #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",
                "Validation requirement Excel|*.xlsx;*.xls",
                "Validation requirement XML|*.xml",
                "Validation requirement json|*.json"
            };

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

            var res = openFile.ShowDialog();

            if (res.HasValue && res.Value)
            {
                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);
        }