private void GoBack()
        {
            if (CameraSettings.CanUndo)
            {
                bool result = _dialogService.ShowConfirmationDialog("При переходе все изменения будут потеряны. Продолжить?");
                if (!result)
                {
                    return;
                }

                CameraSettings.ResetChanges();
            }

            CameraSettings.ClearChanges();
            Dispose();
            _cameraStreamSynchronize.Do(x => x.Set());
            _navigator.NavigateBack(this);
        }
        public override void Initialize()
        {
            _cameraSettings = new CameraSettingsViewModel(_imageProcessor, _settingsProvider);
            _imageProcessor.CameraErrorEvent  += ImageProcessorOnCameraErrorEvent;
            _imageProcessor.ImageChanged      += ImageProcessorOnStreamChanged;
            _imageProcessor.CameraAddEvent    += ImageProcessorCameraAddEvent;
            _imageProcessor.CameraRemoveEvent += ImageProcessorCameraRemoveEvent;
            _imageProcessor.InitializeProcessor();
            _cameraStreamSynchronize = new AutoResetEvent(false);
            TestPhotoTimeEllapsed    = 0;
            CommandManager.InvalidateRequerySuggested();

            OpenSession();
            _takePhotoEnable = PreviewReady;
            if (!_sessionOpened)
            {
                return;
            }

            StartLiveView();
            CameraSettings.ClearChanges();
        }
 private void Save()
 {
     CameraSettings.ClearChanges();
     _settingsProvider.SaveCameraSettings(_mappingEngine.Map <CameraSettingsDto>(CameraSettings));
 }