Exemplo n.º 1
0
        /// <summary>
        /// Called by ConfirmationPopup after the user has chosen OK or Cancel
        /// </summary>
        public void ConfirmationFinished()
        {
            ConfirmationPopup popup = (ConfirmationPopup)CurrentPopup;

            CurrentPopup = null;

            ActionAwaitingConfirmation action = (ActionAwaitingConfirmation)popup.UserData;

            switch (action)
            {
            case ActionAwaitingConfirmation.New:
                if (popup.DidConfirm)
                {
                    _imageUnsaved = false;
                    CreatePaintableImage();
                }
                break;

            case ActionAwaitingConfirmation.Load:
                if (popup.DidConfirm)
                {
                    CurrentPopup = new LoadPopup(this);
                }
                break;

            case ActionAwaitingConfirmation.Close:
                if (popup.DidConfirm)
                {
                    Close();
                }
                break;
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Called by ConfirmationPopup after the user has chosen OK or Cancel
        /// </summary>
        public void ConfirmationFinished()
        {
            ConfirmationPopup popup = (ConfirmationPopup)CurrentPopup;

            CurrentPopup = null;
            ActionAwaitingConfirmation action = (ActionAwaitingConfirmation)popup.UserData;

            switch (action)
            {
            case ActionAwaitingConfirmation.New:
                if (popup.DidConfirm)
                {
                    _imageUnsaved = false;
                    CreatePaintableImage();
                }
                break;

            case ActionAwaitingConfirmation.Load:
                if (popup.DidConfirm)
                {
                    CurrentPopup = new LoadPopup(this);
                }
                break;

            case ActionAwaitingConfirmation.Close:
                if (popup.DidConfirm)
                {
                    Container.Instance.Close();
                }
                break;

            case ActionAwaitingConfirmation.Back:
                if (popup.DidConfirm)
                {
                    if (Menu.multiple)
                    {
                        MainWindow.Instance.SetTutorialActive(true);
                        Tutorial.Instance.Visibility = Visibility.Visible;
                        Menu.multiple = false;
                        CreatePaintableImage();
                    }
                    else
                    {
                        Container.Instance.Menu.Visibility       = Visibility.Visible;
                        Container.Instance.MainWindow.Visibility = Visibility.Hidden;
                        CreatePaintableImage();
                    }
                }
                break;
            }
        }
Exemplo n.º 3
0
        public void ConfirmationFinished()
        {
            ConfirmationPopup popup = (ConfirmationPopup)CurrentPopup;

            CurrentPopup = null;
            ActionAwaitingConfirmation action = (ActionAwaitingConfirmation)popup.UserData;

            switch (action)
            {
            case ActionAwaitingConfirmation.Close:
                if (popup.DidConfirm)
                {
                    Container.Instance.Close();
                }
                break;

            case ActionAwaitingConfirmation.Contibute:
                if (popup.DidConfirm)
                {
                }
                break;
            }
        }