Пример #1
0
        protected override async void OnPause()
        {
            base.OnPause();

            // on pause turn off the flash
            _isFlashOn = await CameraActions.TurnOffFlash(_isFlashOn);
        }
Пример #2
0
        protected override async void OnResume()
        {
            base.OnResume();

            // on resume turn on the flash
            if (_isFlashOn)
            {
                _isFlashOn = await CameraActions.TurnOnFlash(_isFlashOn);
            }
        }
Пример #3
0
        public async void OnClick()
        {
            if (_isFlashOn)
            {
                _isFlashOn = await CameraActions.TurnOffFlash(_isFlashOn);

                ImageActions.SwitchImage(_switchButton, _isFlashOn);
            }
            else
            {
                SoundActions.PlaySound(this, MediaPlayer);
                _isFlashOn = await CameraActions.TurnOnFlash(_isFlashOn);

                ImageActions.SwitchImage(_switchButton, _isFlashOn);
            }
        }