/// <summary> /// Build the menu for displaying fixing /// </summary> /// <param name="builder"></param> /// <returns></returns> public override MenuToDisplay GetFixMenu(MenuBuilder builder) { builder = base.GetFixMenu(builder).GetBuilder(); builder.AddOption(Strings.FixStrings.Reservoir.Drain); builder.AddOption(Strings.FixStrings.Reservoir.Sensor); return(builder.Build()); }
/// <summary> /// Build the menu for displaying attacking /// </summary> /// <param name="builder"></param> /// <returns></returns> public override MenuToDisplay GetAttackMenu(MenuBuilder builder) { builder = base.GetAttackMenu(builder).GetBuilder(); builder.AddOption(Strings.AttackStrings.Filter.Purity); builder.AddOption(Strings.AttackStrings.Filter.Sensor); return(builder.Build()); }
/// <summary> /// Build the menu for displaying fixing /// </summary> /// <param name="builder"></param> /// <returns></returns> public override MenuToDisplay GetFixMenu(MenuBuilder builder) { builder = base.GetFixMenu(builder).GetBuilder(); builder.AddOption(Strings.FixStrings.Pump.Flow); builder.AddOption(Strings.FixStrings.Pump.Sensor); return(builder.Build()); }
static void Main(string[] args) { PrintCitizenOption printCitizen = new PrintCitizenOption(); Option1 option1 = new Option1(); ExitOption existOption = new ExitOption(); Validation validation = new Validation(); ConsoleSystem consoleSystem = new ConsoleSystem(); MenuBuilder <string> menuBuilderString = new MenuBuilder <string>(consoleSystem, validation); MenuBuilder <int> menuBuilderInt = new MenuBuilder <int>(consoleSystem, validation); var menu = menuBuilderString .AddOption(option1.OptionMessage, option1) .AddOption(existOption.OptionMessage, existOption); var menu2 = menuBuilderInt .AddOption(1, new MenuOption <string>(menu.Build(), "new menu")) .AddOption(2, printCitizen) .AddOption(3, existOption) .Build(); menu .AddOption("return to previous menu", new MenuOption <int>(menu2, "new menu")) .Build(); menu2.RunMenu(); }
public void RunMenu() { var mainMenu = _menuBuilderInt .AddOption(1, _globalChatOption) .AddOption(2, _privateChat) .AddOption(3, _createGroupChat) .AddOption(4, _enterGroupChat) .AddOption(5, _managerSettings) .AddOption(6, _leaveGroupChat) .Build(); mainMenu.RunMenu(); }