Esempio n. 1
0
        // ----------------------------------------------------------------------

        void GoButton_Click(object sender, RoutedEventArgs e)
        {
            switch (State)
            {
            case PresentState.InitialWait:
                State = PresentState.HintInfoHidden;
                break;

            case PresentState.PresentingInitialInfo:
                break;

            case PresentState.InitialInfoPresented:
                RunHideStoryboard();
                State = PresentState.HidingInitialInfo;
                break;

            case PresentState.HidingInitialInfo:
            case PresentState.HintInfoHidden:
            case PresentState.PresentingHintInfo:
            case PresentState.HintInfoPresented:
            case PresentState.HidingHintInfo:
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
Esempio n. 2
0
        // ----------------------------------------------------------------------

        void Storyboard_Completed(object sender, EventArgs e)
        {
            var clockGroup = (ClockGroup)sender;

            Debug.WriteLine(
                string.Format(
                    CultureInfo.InvariantCulture,
                    "Storyboard_Completed : {0}",
                    clockGroup.Timeline.Name ?? "NULL"));
            switch (State)
            {
            case PresentState.InitialWait:
                RunPresentStoryboard();
                State = PresentState.PresentingInitialInfo;
                break;

            case PresentState.PresentingInitialInfo:
                if (FolderTreeView.Job != null)
                {
                    State = PresentState.HidingInitialInfo;
                    RunHideStoryboard();
                }
                else
                {
                    State = PresentState.InitialInfoPresented;
                }
                break;

            case PresentState.InitialInfoPresented:
                Debug.Assert(false);
                break;

            case PresentState.HidingInitialInfo:
                State = PresentState.HintInfoHidden;
                RunIdlingStoryboard();
                break;

            case PresentState.HintInfoHidden:
                State = PresentState.PresentingHintInfo;
                InitialInfoText.Visibility = Visibility.Collapsed;
                HintInfoText.Visibility    = Visibility.Visible;
                RunPresentStoryboard();
                break;

            case PresentState.PresentingHintInfo:
                State = PresentState.HintInfoPresented;
                break;

            case PresentState.HintInfoPresented:
                break;

            case PresentState.HidingHintInfo:
                State = PresentState.HintInfoHidden;
                RunIdlingStoryboard();
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
Esempio n. 3
0
        // ----------------------------------------------------------------------

        void UserInputDetected()
        {
            switch (State)
            {
            case PresentState.InitialWait:
            case PresentState.PresentingInitialInfo:
            case PresentState.InitialInfoPresented:
            case PresentState.HidingInitialInfo:
                break;

            case PresentState.HintInfoHidden:
                RunIdlingStoryboard();
                break;

            case PresentState.PresentingHintInfo:
                break;

            case PresentState.HintInfoPresented:
                RunHideStoryboard();
                State = PresentState.HidingHintInfo;
                break;

            case PresentState.HidingHintInfo:
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
 public void AddFrame(T state)
 {
     if (PresentState == null || state.TimeStamp() > PresentState.TimeStamp())
     {
         lock (this) {
             _frames[state] = true;
         }
     }
 }