//Onclick method for the file uploading button private void FileButton_Click(object sender, RoutedEventArgs e) { if (!_xmlUploded) { PathBox.Text = "Please uplode the XML file first and then upload the CSV file"; return; } OpenFileDialog openFileDialog = new OpenFileDialog(); if (openFileDialog.ShowDialog() == true) { try { _generalVM.LoadCSVFile(openFileDialog.FileName); } catch (Exception) { PathBox.Text = "Invalid CSV file"; return; } PathBox.Text = openFileDialog.FileName; _csvUploaded = true; step3box.Background = Brushes.Green; enableContinueButton(); } }
//On Click method for the file button private void FileButton_Click(object sender, RoutedEventArgs e) { OpenFileDialog openFileDialog = new OpenFileDialog(); if (openFileDialog.ShowDialog() == true) { try { _generalVM.LoadCSVFile(openFileDialog.FileName); graphs._graphsVM.ChangeField(GraphsViewModel.Properties[0]); } catch (Exception) { filePathTextBox.Text = "Invalid CSV file"; return; } filePathTextBox.Text = openFileDialog.FileName; graphs.cmbProperties.SelectedIndex = 0; playback.playBtn.Content = "Start"; playback.IsPlaying = false; } }