private void SwitchIndoorOutdoor_Click(object sender, RoutedEventArgs e) { if (IndoorOutdoorButton.Content.Equals("Indoor")) { IndoorOutdoorButton.Content = "Outdoor"; _droneClient.SetOutdoorConfiguration(); } else { IndoorOutdoorButton.Content = "Indoor"; _droneClient.SetIndoorConfiguration(); } UpdateDisplay(); }
private void OutdoorModeToggleSwitch_OnToggled(object sender, RoutedEventArgs e) { var ts = sender as ToggleSwitch; if (ts == null) { throw new Exception(); } if (ts.IsOn) { _droneClient.SetOutdoorConfiguration(); } else { _droneClient.SetIndoorConfiguration(); } UpdateDisplay(); }