private void Button_Click(object sender, RoutedEventArgs e) { WirelessLanDroneConnection droneConnection = new WirelessLanDroneConnection("192.168.2.1", 44444, "com.example.arsdkap"); droneController = new DroneController(droneConnection); droneController.addBatteryListener(b => LOGGER.Info("BatteryState: " + b)); droneController.addPCMDListener(b => LOGGER.Info("PCMD: " + b)); droneController.ondulation(); }
private async void Page_Loaded(object sender, RoutedEventArgs e) { options.ItemsSource = animaciones; options.SelectedIndex = 0; await Task.Run(() => { WirelessLanDroneConnection droneConnection = new WirelessLanDroneConnection("192.168.2.1", 44444, "com.example.arsdkap"); droneController = new DroneController(droneConnection); droneController.addBatteryListener(b => LOGGER.Info("BatteryState: " + b)); droneController.addPCMDListener(b => LOGGER.Info("PCMD: " + b)); }); progressRing.Visibility = Visibility.Collapsed; }