示例#1
0
 private void RefreshSpecialPivots()
 {
     if (IsCurrentPivotItemMovement())
     {
         TheMoveJoystick.StartJoystick();
     }
     else
     {
         TheMoveJoystick.StopJoystick();
     }
     ViewModel.AccelMovement.EnsureAccelerometerIsOnCommand.Execute(IsCurrentPivotItemAccelerometer());
     ViewModel.Speech.EnsureSpeechIsOn.Execute(IsCurrentPivotItemSpeech());
 }
示例#2
0
        protected override void OnNavigatingFrom(NavigatingCancelEventArgs e)
        {
            _isNavigatingFrom = true;
            if (CameraIsRecording)
            {
/*
 *              var task = DoStopRecording();
 *              task.Start();
 *              task.Wait();
 */
            }
            TheMoveJoystick.StopJoystick();
            ViewModel.AccelMovement.EnsureAccelerometerIsOnCommand.Execute(false);
            ViewModel.Speech.EnsureSpeechIsOn.Execute(false);
            ViewModel.AccelMovement.PropertyChanged -= AccelMovementOnPropertyChanged;
            _hackTimer.Stop();
            if (_cam != null)
            {
                _cam.Dispose();
                _cam = null;
            }
            _isNavigatingFrom = false;
            base.OnNavigatingFrom(e);
        }