static async Task Main() { var config = new SpyderConsoleTranslatorConfig() { RabbitMQHost = "SM3-3216", SpyderServerIP = "192.168.86.133", ButtonTranslationMap = await ButtonTranslationMap.LoadScreenMaster3216Map() }; SpyderConsoleTranslator translator = new SpyderConsoleTranslator(); if (!await translator.StartupAsync(config)) { Console.WriteLine("Failed to start up. Exiting..."); return; } Console.WriteLine("Running Spyder translator"); await Task.Delay(Timeout.Infinite); }
private async void MainWindow_Loaded(object sender, RoutedEventArgs e) { var config = new SpyderConsoleTranslatorConfig() { RabbitMQHost = "SM3-3216", SpyderServerIP = "192.168.86.133", ButtonTranslationMap = await ButtonTranslationMap.LoadScreenMaster3216Map() }; //Start the spyder translator SpyderConsoleTranslator translator = new SpyderConsoleTranslator(); //Set our data context this.DataContext = viewModel = new MainWindowViewModel(translator.GetSpyderSimClient()); //Start the spyder translator. This order of operations allows us to watch the initialization on our debug UI if (!await translator.StartupAsync(config)) { Console.WriteLine("Failed to start up. Exiting..."); return; } }