public virtual void FocusScreen(ScreenBase screen, Direction direction, bool doTransition)
 {
     if (screen == null) return;
     if (doTransition)
         screen.MoveTo(GetGridLocationByDirection(direction), GridCenter);
     screen.SetFocus();
 }
 public virtual void UnfocusScreen(ScreenBase screen, Direction direction)
 {
     if (screen == null)
     {
         return;
     }
     screen.MoveTo(GridCenter, GetOppositeGridLocationByDirection(direction));
     screen.UnsetFocus();
 }
 public virtual void FocusScreen(ScreenBase screen, Direction direction, bool doTransition)
 {
     if (screen == null)
     {
         return;
     }
     if (doTransition)
     {
         screen.MoveTo(GetGridLocationByDirection(direction), GridCenter);
     }
     screen.SetFocus();
 }
        private void LoadScreen(ScreenBase screen, Direction direction, bool doTransition = true)
        {
            if (screen == null)
            {
                return;
            }
            if (CurrentScreen != null)
            {
                PreviousScreen = CurrentScreen;
            }

            FocusScreen(screen, direction, doTransition);
            UnfocusScreen(CurrentScreen, direction);
            CurrentScreen = screen;
        }
        private ScreenBase GetScreenByName(string screenName)
        {
            ScreenBase screen = null;

            for (var i = 0; i < Screens.Count(); i++)
            {
                if (screenName != Screens[i].ScreenName)
                {
                    continue;
                }
                screen          = Screens[i];
                CurrentScreenId = i;
                break;
            }
            return(screen);
        }
        private void LoadScreen(ScreenBase screen, Direction direction, bool doTransition = true)
        {
            if (screen == null) return;
            if (CurrentScreen != null)
                PreviousScreen = CurrentScreen;

            FocusScreen(screen, direction, doTransition);
            UnfocusScreen(CurrentScreen, direction);
            CurrentScreen = screen;
        }
 protected void ResetNavigation()
 {
     CurrentScreen = null;
     PreviousScreen = null;
     CurrentScreenId = 0;
 }
 public virtual void UnfocusScreen(ScreenBase screen, Direction direction)
 {
     if (screen == null) return;
     screen.MoveTo(GridCenter, GetOppositeGridLocationByDirection(direction));
     screen.UnsetFocus();
 }