예제 #1
0
 private void navigationBar_StoreButtonClick(object sender, RoutedEventArgs e)
 {
     var testStoreScreen = new NewStoreScreen();
     testStoreScreen.SetInfo(true);
     ChangeScreen(testStoreScreen);
 }
예제 #2
0
 private UserControl GetCurrentScreen()
 {
     switch (ScreenList[CurrentIndex].Type)
     {
         case Screen.ScreenType.StoreScreen:
             var storeScreen = new NewStoreScreen();
             storeScreen.SetInfo(false);
             return storeScreen;
         case Screen.ScreenType.MotionDetail:
             var motionScreen = new MotionDetailScreen();
             var motionID = (ulong)ScreenList[CurrentIndex].Parameter;
             motionScreen.SetInfo(motionID, false);
             return motionScreen;
         case Screen.ScreenType.ArtistDetail:
             var artistScreen = new ArtistDetailScreen();
             var artistID = (ulong)ScreenList[CurrentIndex].Parameter;
             artistScreen.SetInfo(artistID, false);
             return artistScreen;
         case Screen.ScreenType.Search:
             var searchScreen = new SearchResultScreen();
             var query = (string)ScreenList[CurrentIndex].Parameter;
             searchScreen.SetQuery(query, false);
             return searchScreen;
         case Screen.ScreenType.SeeAll:
             var seeAllScreen = new SeeAllScreen();
             var category = (string)ScreenList[CurrentIndex].Parameter;
             seeAllScreen.SetCategory(category, false);
             return seeAllScreen;
         default:
             Debug.Fail(string.Format("GetCurrentScreen error, index: {0}", CurrentIndex));
             return null;
     }
     return null;
 }
예제 #3
0
        private void navigationBar_LogoutSuccessfully(object sender)
        {
            GlobalVariables.CurrentUser = null;
            GlobalVariables.UserOnline = false;

            Dispatcher.BeginInvoke((Action)delegate
            {
                navigationBar.UserMenu.Visibility = Visibility.Hidden;
                navigationBar.SignInButton.Visibility = Visibility.Visible;
                //var storeScreen = new StoreScreen();
                var storeScreen = new NewStoreScreen();
                storeScreen.SetInfo(true);
                ChangeScreen(storeScreen);
            });
        }