public static void CreateNewConfiguration() { if (ConfigAccess.ReadConfiguration() is not null) { ShowConfiguration(); var option = AnsiConsole.Confirm("Desea eliminar la configuración?"); if (option) ConfigAccess.DeleteConfiguration(); } else { var color1 = AnsiConsole.Prompt(new SelectionPrompt<string>().Title("Color 1, row 1 table?").AddChoices(Colors)); var color2 = AnsiConsole.Prompt(new SelectionPrompt<string>().Title("Color 2, row 2 table?").AddChoices(Colors)); var color3 = AnsiConsole.Prompt(new SelectionPrompt<string>().Title("Color 3, header table?").AddChoices(Colors)); var salary = AnsiConsole.Ask<int>("Salario minimo"); ConfigAccess.CreateConfigurations(color1, color2, color3, salary); } }
public static void DeleteConfiguration() { ShowConfiguration(); var option = AnsiConsole.Confirm("Desea eliminar la configuración?"); if (option) ConfigAccess.DeleteConfiguration(); }