public CreateTeamView() { _buffer = new Buffer(); Content = _buffer; _form = new Form( new Question("Team Name?", x => Controller.Team.Name = x) .Required("Team Name is required"), new InputList( "Team Color?", Enum.GetNames(typeof(Color)), x => { Color color; if (Enum.TryParse(x, out color)) { Controller.Team.TeamColor = color; } }), new Question("Manager First Name?", x => Controller.Team.Manager.FirstName = x) .Required("Manager First Name is required"), new Question("Manager Last Name?", x => Controller.Team.Manager.LastName = x) .Required("Manager Last Name is required"), new Question("Coach First Name?", x => Controller.Team.Coach.FirstName = x) .Required("Coach First Name is required"), new Question("Coach Last Name?", x => Controller.Team.Coach.LastName = x) .Required("Coach Last Name is required")); }
public PlayersView() { _buffer = new Buffer(); Content = _buffer; _menu = new Menu( new MenuItem("Create Player", ConsoleKey.C, () => Controller.GoToCreatePlayer())); }
public TeamView() { _buffer = new Buffer(); Content = _buffer; _menu = new Menu( new MenuItem("Edit Team", ConsoleKey.E, () => Controller.GoToEditTeam()), new MenuItem("Create Team", ConsoleKey.C, () => Controller.GoToCreateTeam())); }
public HeaderView() { _buffer = new Buffer(); Content = _buffer; _buffer.WriteLine("Major Leage Miruken"); _buffer.WriteLine(); _menu = new Menu( new MenuItem("Teams", ConsoleKey.T, () => Controller.GoToTeams()), new MenuItem("Players", ConsoleKey.P, () => Controller.GoToPlayers())); _buffer.Write(_menu.ToString()); }
public EditPlayerView() { _buffer = new Buffer(); Content = _buffer; }
public EditTeamView() { _buffer = new Buffer(); Content = _buffer; }
public CreatePlayerView() { _buffer = new Buffer(); Content = _buffer; }