public override void Run() { ThisActivityHasFocus = true; actionBar.PrintView(); actionBar.ShowPointerCurrentPosition(); while (ThisActivityHasFocus) { switch (Console.ReadKey().Key) { case ConsoleKey.UpArrow: actionBar.MovePointerUp(); break; case ConsoleKey.DownArrow: actionBar.MovePointerDown(); break; case ConsoleKey.RightArrow: actionBar.MovePointerDown(); break; case ConsoleKey.LeftArrow: actionBar.MovePointerUp(); break; case ConsoleKey.Enter: ProcessEnterButtonPress(); actionBar.PrintView(); actionBar.ShowPointerCurrentPosition(); break; case ConsoleKey.Tab: actionBar.PrintView(); ThisActivityHasFocus = false; break; } } }
public override void Run() { ThisActivityHasFocus = true; actionBar.PrintView(); messageBarForCurrentMessages.ShowMessage(battleshipLogic.CurrentMessage); actionBar.ShowPointerCurrentPosition(); while (ThisActivityHasFocus) { switch (Console.ReadKey().Key) { case ConsoleKey.UpArrow: actionBar.MovePointerUp(); break; case ConsoleKey.DownArrow: actionBar.MovePointerDown(); break; case ConsoleKey.RightArrow: actionBar.MovePointerDown(); break; case ConsoleKey.LeftArrow: actionBar.MovePointerUp(); break; case ConsoleKey.Enter: actionBar.PrintView(); ProcessEnterButtonPress(); break; case ConsoleKey.Tab: Manager.RemoveFocusFromThisManager(); actionBar.PrintView(); ThisActivityHasFocus = false; break; } } }