예제 #1
0
 /// <summary>
 /// Invoked when this page is about to be displayed in a Frame.
 /// </summary>
 /// <param name="e">Event data that describes how this page was reached.
 /// This parameter is typically used to configure the page.</param>
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     sortOrder.Visibility = Visibility.Collapsed;
     base.OnNavigatedTo(e);
     NavigationParameterClass npc = new NavigationParameterClass();
     npc = (NavigationParameterClass)e.Parameter;
     ruserteam = (CollectionUsersTeam)(npc.dataClass);
     var memberobject = ruserteam.members;
     rmembers.Clear();
     rmembers_nonplayer.Clear();
     foreach (var t_member in memberobject)
     {
         if (t_member.is_non_player == true)
         {
             rmembers_nonplayer.Add(t_member);
         }
         else
         {
             rmembers.Add(t_member);
         }
     }
     sortOrder.Visibility = Visibility.Visible;
     RosterListView.DataContext = this;
     RosterListViewNonPlayer.DataContext = this;
     if (rmembers.Count <= 0)
     {
         RosterListView.Visibility = Visibility.Collapsed;
         addYourTeamPlayerMobile.Visibility = Visibility.Visible;
     }
     else
     {
         RosterListView.Visibility = Visibility.Visible;
         addYourTeamPlayerMobile.Visibility = Visibility.Collapsed;
     }
     if (rmembers_nonplayer.Count <= 0)
     {
         RosterListViewNonPlayer.Visibility = Visibility.Collapsed;
         addYourNonTeamPlayerMobile.Visibility = Visibility.Visible;
     }
     else
     {
         RosterListViewNonPlayer.Visibility = Visibility.Visible;
         addYourNonTeamPlayerMobile.Visibility = Visibility.Collapsed;
     }
 }
예제 #2
0
 private void RosterPanel_Tapped(object sender, TappedRoutedEventArgs e)
 {
     NavigationParameterClass npc = new NavigationParameterClass();
     npc.dataClass = ruserteam;
     Frame rootFrame = Window.Current.Content as Frame;
     rootFrame.Navigate(typeof(Roster), npc);
 }
예제 #3
0
 private void MyTeamsListView_ItemClick(object sender, ItemClickEventArgs e)
 {
     NavigationParameterClass npc = new NavigationParameterClass();
     CollectionUsersTeam ruserteam = (CollectionUsersTeam)e.ClickedItem;
     ApplicationData.Current.LocalSettings.Values["currentTeamID"] = ruserteam.id;
     ApplicationData.Current.LocalSettings.Values["currentMemberIDforLoggedInUser"] = ruserteam.loggedInUsersmemberID;
     npc.dataClass = ruserteam;
     Frame rootFrame = Window.Current.Content as Frame;
     rootFrame.Navigate(typeof(TeamPage), npc);
 }