Esempio n. 1
0
 private void HandleViewStateChanged(ViewStateEnum state)
 {
     if (state == ViewStateEnum.Street)
     {
         TryShowStartThought();
     }
 }
Esempio n. 2
0
 public void SetState(ViewStateEnum state)
 {
     if (states.Peek() != state)
     {
         states.Push(state);
     }
     if (OnStateChanged != null)
     {
         OnStateChanged(State);
     }
 }
Esempio n. 3
0
        public void BackState(ViewStateEnum from)
        {
            while (states.Count > 1 && states.Pop() != from)
            {
                ;
            }

            if (OnStateChanged != null)
            {
                OnStateChanged(State);
            }
        }
Esempio n. 4
0
        private bool ShouldShow(ViewStateEnum state)
        {
            foreach (var showScreenState in config.ShowScreenStates)
            {
                if (state == showScreenState)
                {
                    return(true);
                }
            }

            return(false);
        }
Esempio n. 5
0
 public void InitState(ViewStateEnum state)
 {
     states.Push(state);
 }
Esempio n. 6
0
 private void HandleViewStateChanged(ViewStateEnum state)
 {
     SetShown(ShouldShow(state));
 }