public void Start() { if (!IsListening) { IsListening = true; LiveDataService.MonitorCurrentScreen(OnScreenUpdated); LiveDataService.MonitorFormulae(UpdateFormulae); LiveDataService.MonitorSaints(UpdateSaints); } }
private static void DoListFormulae(string[] args) { if (args.Length == 1 || args[1] == "list") { foreach (var l in StaticDataService.Formulae) { Console.WriteLine(l); } } else if (args[1] == "listen") { StartLiveDataService(() => { LiveDataService.MonitorFormulae(formulae => { Console.WriteLine(); foreach (var f in formulae) { Console.WriteLine(f); } }); }); } }