Exemplo n.º 1
0
        /// <summary>
        /// Initialize preview.
        /// </summary>
        /// <param name="viewModel">View model.</param>
        private void InitializePreviewAsync(PreviewDialogViewModel viewModel)
        {
            viewModel.SetStatus(LoadingStatus.Loading);

            this.PreviewPanel.InitializePreview();

            viewModel.SetStatus(LoadingStatus.Loaded);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Take picture.
        /// </summary>
        /// <param name="viewModel">View model.</param>
        /// <returns>Returns picture.</returns>
        private Bitmap TakePicture(PreviewDialogViewModel viewModel)
        {
            viewModel.SetStatus(LoadingStatus.Loading);

            var screenshot = this.PreviewPanel.TakePicture();

            viewModel.SetStatus(LoadingStatus.Added);

            return(screenshot);
        }