Пример #1
0
        public PhotoPage()
        {
            this.InitializeComponent();

            this._navigationHelper = new NavigationHelper(this);

            _photoProcessor      = new CPhotoProcessor();
            _settings            = App.Settings;
            _yuvPixelArray       = new byte[MaxFrameCount][];
            _imageWidthInPixels  = new int[MaxFrameCount];
            _imageHeightInPixels = new int[MaxFrameCount];

            colorPickerControl.CurrentColor = _settings.TargetColor;

            _actionQueue = new ActionQueue();
            _actionQueue.ExecuteIntervalInMilliseconds = 50;

            saveImageButton.IsEnabled = false;
        }
Пример #2
0
        protected override async void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);


            //await Dispatcher.RunAsync(CoreDispatcherPriority.Normal,() => buttonShoot.Focus(FocusState.Pointer));
            buttonShoot.Focus(FocusState.Pointer);
            viseur.Visibility = Visibility.Visible;
            await Windows.UI.ViewManagement.StatusBar.GetForCurrentView().HideAsync();

            _actionQueue = new ActionQueue();
            _actionQueue.ExecuteIntervalInMilliseconds = 500;

            await InitializeAndStartVideoEngineAsync();

            SetFlash(_settings.Flash, false);
            _videoEngine.ShowMessageRequest            += OnVideoEngineShowMessageRequestAsync;
            _videoEngine.Messenger.FrameCaptured       += OnFrameCapturedAsync;
            _videoEngine.Messenger.PostProcessComplete += OnPostProcessCompleteAsync;

            Window.Current.VisibilityChanged += OnVisibilityChangedAsync;

            DataContext = this;
        }