private static void RenderCarCommands(string Car, CarCommands op) { // TODO: Implement this method switch (op) { case CarCommands.AddGAS: AddGas(Car); break; case CarCommands.Moving: Moving(Car); break; case CarCommands.Stopping: Stopping(Car); break; case CarCommands.TurnOfTheLights: TurnOfTheLights(Car); break; case CarCommands.TurnOnTheLights: TurnOnTheLights(Car); break; } }
static CarCommands ChoseOperation() { Console.WriteLine("---------------------------Welcome----------------------------------------"); Console.WriteLine("Please Choose Op:\t0:AddGas\t1:Moving\t2:Stoping\t3:TurnOnTheLights\t4:TurnOfTheLights"); int input = int.Parse(Console.ReadLine()); CarCommands op = (CarCommands)input; return(op); }