static void Main(string[] args) { var fetcher = new Fetcher(); var viewer = new ConsoleViewer(); bool exit = false; viewer.DisplayTubeStatus(fetcher.GetTubeInfo()); do { ConsoleKeyInfo key = System.Console.ReadKey(); switch (key.Key) { case ConsoleKey.F5: viewer.DisplayTubeStatus(fetcher.GetTubeInfo()); break; case ConsoleKey.Q: exit = true; break; default: System.Console.WriteLine("Unknown command"); break; } } while (!exit); }
public MainWindow() { InitializeComponent(); _fetcher = new Fetcher(); DisplayStatus(_fetcher.GetTubeInfo()); }
public override void ViewDidLoad() { base.ViewDidLoad (); var fetcher = new Fetcher (); var lineInfoList = fetcher.GetTubeInfo(); TableView.Source = new TubeStatusTableViewControllerSource(lineInfoList.ToArray()); TableView.ReloadData(); }