public void Start() { _input_output.Output_line(""); _input_output.Output_options(new List <string> { ReconConsts.Load_pending_csvs, "2. Do actual reconciliation." }); string input = _input_output.Get_generic_input(ReconConsts.PendingOrReconciliate); switch (input) { case "1": { var file_loader = new FileLoader(_input_output, new Clock()); file_loader.Create_pending_csvs(); } break; case "2": { Reconciliate(); } break; } }
public ISpreadsheetRepoFactory Decide_on_debug() { _input_output.Output_line(""); _input_output.Output_options(new List <string> { $"1. Debug Mode A: Copy live sheet to debug version in [live location]/{ReconConsts.Backup_sub_folder}, and work on it from there.", $"2. Debug Mode B: Copy sheet from {ReconConsts.Source_debug_spreadsheet_path} to [live location]/{ReconConsts.Backup_sub_folder}, and work on it from there.", "3. Debug Mode C: Use fake spreadsheet repo (like you would get in .Net Core).", "4. Work in REAL mode" }); string input = _input_output.Get_generic_input(ReconConsts.DebugOrReal); WorkingMode working_mode = WorkingMode.DebugA; ISpreadsheetRepoFactory spreadsheet_factory = new FakeSpreadsheetRepoFactory();; switch (input) { case "1": { working_mode = WorkingMode.DebugA; spreadsheet_factory = Debug_mode_a(); } break; case "2": { working_mode = WorkingMode.DebugB; spreadsheet_factory = Debug_mode_b(); } break; case "3": { working_mode = WorkingMode.DebugC; spreadsheet_factory = Debug_mode_c(); } break; case "4": { working_mode = WorkingMode.Real; spreadsheet_factory = Real_mode(); } break; } new Communicator(_input_output).Show_instructions(working_mode); return(spreadsheet_factory); }
public void Start() { _input_output.Output_line(""); _input_output.Output_options(new List <string> { ReconConsts.Load_pending_csvs, "2. Do actual reconciliation." }); string input = _input_output.Get_generic_input(ReconConsts.PendingOrReconciliate); switch (input) { case "1": { ISpreadsheetRepoFactory spreadsheet_factory = new FakeSpreadsheetRepoFactory(); var path = new PathSetter(_input_output, spreadsheet_factory).Set_path(); var file_loader = new FileLoader(_input_output); file_loader.Create_pending_csvs(path); } break; case "2": { Do_actual_reconciliation(); } break; } }
private bool Set_all_file_details() { bool success = true; _input_output.Output_line(""); _input_output.Output_line("Would you like to enter your own file details, or use defaults?"); _input_output.Output_options(new List <string> { "1. Enter my own file details", ReconConsts.File_details_02, ReconConsts.File_details_03, ReconConsts.File_details_04, ReconConsts.File_details_05, }); string input = _input_output.Get_generic_input(ReconConsts.Five_file_details); success = Set_file_details_according_to_user_input(input); return(success); }
private void Proceed_after_showing_matching_results() { _input_output.Output_options(new List <string> { "1. Go again! (this means you can match any item, regardless of amount)", "2. Write csv and finish.", }); string input = _input_output.Get_generic_input(ReconConsts.GoAgainFinish); switch (input) { case "1": Go_again(); break; case "2": Finish(); break; } }