private void StartButton_Click(object sender, RoutedEventArgs e) { IStatementParser parser = null; switch (StatementTypeComboBox.SelectionBoxItem.ToString()) { case "DES Visa": parser = new StatementParserForDejardingsVisa(); break; case "RBC Chequing": parser = new StatementParserForRbcChecking(); break; case "RBC Visa": parser = new StatementParserForRbcVisa(); break; } if (parser == null) { MessageBox.Show("Statement type is not supported."); return; } LogTextBox.Clear(); Log("Started..."); var path = InputFolderTextBox.Text; //Saving the path var s = new Settings { Path = path, StatementType = StatementTypeComboBox.SelectedItem.ToString(), }; s.Save(); ProcessFiles(Path.Combine(InputFolderTextBox.Text), parser, GeneratePdfTextFilesCheckBox.IsChecked == true); Log("Done."); }