private void processReportButton_Click(object sender, RoutedEventArgs e) { Cursor = Cursors.Wait; var parms = new BackgroundWorkerParams("process"); worker.RunWorkerAsync(parms); }
private void loadReportButton_Click(object sender, RoutedEventArgs e) { var dlg = new OpenFileDialog(); dlg.Filter = "Report files (*.axr; *.igc; *.trk)|*.axr; *.igc; *.trk"; dlg.InitialDirectory = Environment.CurrentDirectory; dlg.RestoreDirectory = true; if (dlg.ShowDialog(this) == true) { Cursor = Cursors.Wait; var parms = new BackgroundWorkerParams("openTrack", new string[] { dlg.FileName }); worker.RunWorkerAsync(parms); } }
private void batchProcessButton_Click(object sender, RoutedEventArgs e) { var dlg = new OpenFileDialog(); dlg.Filter = "Report files (*.axr; *.igc; *.trk)|*.axr; *.igc; *.trk"; dlg.Multiselect = true; dlg.InitialDirectory = Environment.CurrentDirectory; dlg.RestoreDirectory = true; if (dlg.ShowDialog(this) == true && dlg.FileNames.Length > 0) { Cursor = Cursors.Wait; Report = null; RaisePropertyChanged("Report"); Engine.Reset(); Engine.Display(); var parms = new BackgroundWorkerParams("batchProcess", dlg.FileNames); worker.RunWorkerAsync(parms); } }