private void getUserImput(ref bool exit) { ConsoleKeyInfo key; do { key = Console.ReadKey(true); } while (Console.KeyAvailable); switch (key.Key) { case ConsoleKey.D0: exit = true; Clientes.Save(); break; case ConsoleKey.D1: if (Index > 1) { Index--; } break; case ConsoleKey.D2: if (Index < Clientes.Count) { Index++; } break; case ConsoleKey.D3: Index = JumpIntoClient(); break; case ConsoleKey.D4: Index = searchText(); break; case ConsoleKey.D5: Clientes.Add(newClient()); break; case ConsoleKey.D6: Clientes.Clientes[Index - 1] = modifyClient(Clientes.Get(Index)); break; default: break; } }
public void Add(Cliente clienteToAdd) { Clientes.Add(clienteToAdd); Count++; }