private void NextPhotoButtonClickHandler(object sender, RoutedEventArgs e)
        {
            if (_previewBitmap.UndoStepCount > 0 && !MessageDialog.ShowOkCancelMessage(ExecutionEngine.Instance.Resource[Constants.MessageEditNextTextKey] as string))
            {
                return;
            }

            SetPhoto(_listItem.GetNext());
            LoadImage();
            Reset();
        }
Beispiel #2
0
        private void CancelButtonClickHandler(object sender, RoutedEventArgs e)
        {
            if (_executionEngine == null)
            {
                throw new Aurigma.GraphicsMill.UnexpectedException("_executionEngine cannot be null");
            }

            if (MessageDialog.ShowOkCancelMessage((string)this.Resources[Constants.MessageSureWantToCancelOrderKey]))
            {
                ExecutionEngine.RunCancelOrderProcess();
                _executionEngine.ExecuteCommand(new ResetOrderDataCommand());
            }
        }
        private void ButtonReturnToPhotosClickHandler(object sender, RoutedEventArgs e)
        {
            if (_previewBitmap.UndoStepCount > 0 && !MessageDialog.ShowOkCancelMessage((string)TryFindResource(Constants.MessageWantToExitTextKey)))
            {
                return;
            }

            if (_tmpBitmap != null)
            {
                _tmpBitmap.Dispose();
                _tmpBitmap = null;
            }
            if (_autoLevelsBitmap != null)
            {
                _autoLevelsBitmap.Dispose();
                _autoLevelsBitmap = null;
            }
            if (_cropBitmap != null)
            {
                _cropBitmap.Dispose();
                _cropBitmap = null;
            }
            if (_redEyeBitmap != null)
            {
                _redEyeBitmap.Dispose();
                _redEyeBitmap = null;
            }

            if (_previewBitmap != null)
            {
                _previewBitmap.Dispose();
                _previewBitmap = null;
            }

            _listItem.GoToPage();

            _frame.Photo.MouseLeftButtonDown -= new MouseButtonEventHandler(ManualRedEyeClickHandler);
            ExecutionEngine.Instance.ExecuteCommand(new SwitchToStageCommand(Constants.SelectStageName));
        }