Exemplo n.º 1
0
 private void BtnKids_Click(object sender, RoutedEventArgs e)
 {
     if (CurrentScene != CVScene.Kids)
     {
         //Go to the Kids page
         _mainFrame.NavigationService.Navigate(new Pages.Kids());
         LastScene    = CurrentScene;
         CurrentScene = CVScene.Kids;
     }
 }
Exemplo n.º 2
0
 private void BtnCompiler_Click(object sender, RoutedEventArgs e)
 {
     if (CurrentScene != CVScene.Compiler)
     {
         //Go to the Settings page
         _mainFrame.NavigationService.Navigate(new Pages.Compiler());
         LastScene    = CurrentScene;
         CurrentScene = CVScene.Compiler;
         ButtonControl();
     }
 }
Exemplo n.º 3
0
 private void BtnShop_Click(object sender, RoutedEventArgs e)
 {
     if (CurrentScene != CVScene.Shop)
     {
         //Go to the Shop page
         _mainFrame.NavigationService.Navigate(new Pages.Shop());
         LastScene    = CurrentScene;
         CurrentScene = CVScene.Shop;
         ButtonControl();
     }
 }
Exemplo n.º 4
0
 private void BtnProgress_Click(object sender, RoutedEventArgs e)
 {
     if (CurrentScene != CVScene.Progress)
     {
         //Go to the Progress page
         _mainFrame.NavigationService.Navigate(new Pages.Progress());
         LastScene    = CurrentScene;
         CurrentScene = CVScene.Progress;
         ButtonControl();
     }
 }
Exemplo n.º 5
0
 private void BtnAccount_Click(object sender, RoutedEventArgs e)
 {
     if (CurrentScene != CVScene.Account)
     {
         //Go to the account page
         _mainFrame.NavigationService.Navigate(new Pages.Account());
         LastScene    = CurrentScene;
         CurrentScene = CVScene.Account;
         ButtonControl();
     }
 }
Exemplo n.º 6
0
 private void BtnLB_Click(object sender, RoutedEventArgs e)
 {
     if (CurrentScene != CVScene.LB)
     {
         //Go to to the LeaderBoards page
         _mainFrame.NavigationService.Navigate(new Pages.Leaderboards());
         LastScene    = CurrentScene;
         CurrentScene = CVScene.LB;
         ButtonControl();
     }
 }
Exemplo n.º 7
0
 private void BtnAchievements_Click(object sender, RoutedEventArgs e)
 {
     if (CurrentScene != CVScene.Achievements)
     {
         //Go to the Achievements page
         _mainFrame.NavigationService.Navigate(new Pages.Achievements());
         LastScene    = CurrentScene;
         CurrentScene = CVScene.Achievements;
         ButtonControl();
     }
 }
Exemplo n.º 8
0
 //private void BtnCources_Click(object sender, RoutedEventArgs e)
 //{
 //    if (CurrentScene != CVScene.Courses)
 //    {
 //        //Go to the Courses page
 //        _mainFrame.NavigationService.Navigate(new Pages.Courses());
 //        LastScene = CurrentScene;
 //        CurrentScene = CVScene.Courses;
 //        ButtonControl();
 //    }
 //}
 private void BtnHome_Click(object sender, RoutedEventArgs e)
 {
     if (CurrentScene != CVScene.Home)
     {
         //Go to the Home page
         _mainFrame.NavigationService.Navigate(new Pages.MainPage());
         LastScene    = CurrentScene;
         CurrentScene = CVScene.Home;
         ButtonControl();
     }
 }
Exemplo n.º 9
0
        public MainWindow()
        {
            InitializeComponent();
            win = this;
            new SettingsSaver();

            _mainFrame.NavigationUIVisibility = NavigationUIVisibility.Hidden;
            _mainFrame.NavigationService.Navigate(new Pages.MainPage());
            CurrentScene = CVScene.Home;
            LastScene    = CVScene.NULL;
            ButtonControl();
        }
Exemplo n.º 10
0
        /// <summary>
        /// Navigates to the last active page.
        /// </summary>
        public void NavigateLast()
        {
            bool fl = false;

            switch (LastScene)
            {
            //Pages Navigation
            case CVScene.Home:
                _mainFrame.NavigationService.Navigate(new Pages.MainPage());
                break;

            case CVScene.LB:
                _mainFrame.NavigationService.Navigate(new Pages.Leaderboards());
                break;

            case CVScene.Achievements:
                _mainFrame.NavigationService.Navigate(new Pages.Achievements());
                break;

            case CVScene.Account:
                _mainFrame.NavigationService.Navigate(new Pages.Account());
                break;

            case CVScene.Shop:
                _mainFrame.NavigationService.Navigate(new Pages.Shop());
                break;

            case CVScene.News:
                _mainFrame.NavigationService.Navigate(new Pages.News());
                break;

            case CVScene.Languages:
                _mainFrame.NavigationService.Navigate(new Pages.Languages());
                break;

            case CVScene.Progress:
                _mainFrame.NavigationService.Navigate(new Pages.Progress());
                break;

            case CVScene.Donate:
                _mainFrame.NavigationService.Navigate(new Pages.Donate());
                break;

            case CVScene.Kids:
                _mainFrame.NavigationService.Navigate(new Pages.Kids());
                break;

            case CVScene.Compiler:
                _mainFrame.NavigationService.Navigate(new Pages.Compiler());
                break;

            //Settings
            case CVScene.Settings:
                _mainFrame.NavigationService.Navigate(new Pages.Settings());
                break;

            default:
                fl = true;
                return;
            }
            if (fl)
            {
                return;
            }

            //Flip the scenes
            CurrentScene = LastScene;

            //Toggle the buttons
            ButtonControl();
        }