コード例 #1
0
 private void droneControl_ConnectionStateChanged_Sync(object sender, DroneConnectionStateChangedEventArgs e)
 {
     HandleConnectionStateChange(e);
 }
コード例 #2
0
        private void HandleConnectionStateChange(DroneConnectionStateChangedEventArgs args)
        {
            UpdateInteractiveElements();

            if (args.Connected)
            {
                timerVideoUpdate.Start();
                UpdateUISync("Connected to the drone");
            }
            else
            {
                UpdateUISync("Disconnected from the drone");
            }
        }
コード例 #3
0
 private void droneControl_ConnectionStateChanged_Async(object sender, DroneConnectionStateChangedEventArgs e)
 {
     this.BeginInvoke(new DroneConnectionStateChangedEventHandler(droneControl_ConnectionStateChanged_Sync), sender, e);
 }
コード例 #4
0
 private void droneControl_ConnectionStateChanged_Async(object sender, DroneConnectionStateChangedEventArgs e)
 {
     //int x;
     UpdateUIAsync("Prisijungti pavyko");
     //Dispatcher.BeginInvoke(new DroneConnectionStateChangedEventHandler(droneControl_ConnectionStateChanged_Sync), sender, e);
 }
コード例 #5
0
        private void HandleConnectionStateChange(DroneConnectionStateChangedEventArgs args)
        {
            UpdateInteractiveElements();

            if (args.Connected)
                UpdateUISync("Connected to the drone");
            else
                UpdateUISync("Disconnected from the drone");
        }
コード例 #6
0
 private void InvokeNetworkConnectionStateChange(DroneConnectionStateChangedEventArgs e)
 {
     if (NetworkConnectionStateChanged != null)
         NetworkConnectionStateChanged.Invoke(this, e);
 }
コード例 #7
0
 private void networkWorker_ConnectionStateChanged(object sender, DroneConnectionStateChangedEventArgs e)
 {
     InvokeConnectionStateChange();
 }
コード例 #8
0
        //EVENT HANDLER
        private void droneControl_ConnectionStateChanged( object sender, DroneConnectionStateChangedEventArgs e )
        {
            if( e.Connected )
            {
                Logger.Instance.NewEntry( CKLogLevel.Info, CKTraitTags.ARDrone, "ARDrone is connected" );
            }
            else
            {
                Logger.Instance.NewEntry( CKLogLevel.Info, CKTraitTags.ARDrone, "ARDrone is disconnected" );
            }

            if ( this.ConnectionStateChanged != null )
            {
                ConnectionStateChanged( sender, e.Connected );
            }
        }