private void btnImportSchedules_Click(object sender, RoutedEventArgs e) { Microsoft.Win32.OpenFileDialog openDlg = new Microsoft.Win32.OpenFileDialog(); openDlg.DefaultExt = ".mca"; openDlg.Filter = "Complete schedule file|*.mca"; openDlg.Title = "Schedule to Import"; if (openDlg.ShowDialog(this) == true) { IFileController cntrl = new ScheduleFileControl(); FileParseBase parser = new FileParseBase(); parser.MessageToDisplay += new FileParseBase.MessageDisplayDel(parser_MessageToDisplay); ProvInfo provInfo = new ProvInfo(txtName.Text, this.rbUri.IsChecked == true); List <Exception> Errors; IGraph stationNameGraph = parser.ParseFile(openDlg.FileName, provInfo, cntrl, out Errors, this.viewModel, Properties.Settings.Default.ScheduleFNameFormat); saveGraphToTurtle(stationNameGraph); } }
private void combinedImport(object args) { IFileController cntrl = new StationFileControl(); FileParseBase parser = new FileParseBase(); parser.MessageToDisplay += new FileParseBase.MessageDisplayDel(parser_MessageToDisplay); this.viewModel = new MainWindowViewModel(); List <Exception> Errors; IGraph combinedGraph = parser.ParseFile(((CominedImportArgs)args).StationNameList, ((CominedImportArgs)args).Prov, cntrl, out Errors, this.viewModel, Properties.Settings.Default.fNameFormat); IFileController scheduledCntrl = new ScheduleFileControl(); List <Exception> ErrorsTwo; IGraph resultingGraph = parser.ParseFile(((CominedImportArgs)args).ScheduleFile, ((CominedImportArgs)args).Prov, scheduledCntrl, combinedGraph, out ErrorsTwo, this.viewModel, Properties.Settings.Default.ScheduleFNameFormat); //Dispatcher.BeginInvoke(new Action(() => //{ // saveGraphToTurtle(resultingGraph); //})); // saveGraphToRDF(resultingGraph); }