private void UpdateDisplay()
        {
            var active = _droneClient.IsActive;

            TakeOffLandButton.IsEnabled  = active;
            TakeOffLandingTextBlock.Text = _droneClient.IsFlying() ? "LANDING" : "TAKE OFF";

            SwitchVideoChannelButton.IsEnabled  = active;
            EmergencyButton.IsEnabled           = active;
            ResetEmergencyButton.IsEnabled      = active;
            IndoorOutdoorSwitch.IsEnabled       = active;
            TakePictureButton.IsEnabled         = active;
            PlayAnimationButton.IsEnabled       = active;
            PlayLedAnimationButton.IsEnabled    = active;
            FlatTrimButton.IsEnabled            = active;
            StartVideoRecordingButton.IsEnabled = active;
            StopVideoRecordingButton.IsEnabled  = active;
        }
Exemplo n.º 2
0
 private void TakeOff_Click(object sender, RoutedEventArgs e)
 {
     if (_droneClient.IsFlying())
     {
         _droneClient.Land();
         TakeOffButton.Content = "Take off";
     }
     else
     {
         _droneClient.TakeOff();
         TakeOffButton.Content = "Land";
     }
 }