protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) { // Maintain a list of peers and bind that list to the UI _peerApps = new ObservableCollection<PeerAppInfo>(); PeerList.ItemsSource = _peerApps; // Register for incoming connection requests PeerFinder.ConnectionRequested += PeerFinder_ConnectionRequested; // Start advertising ourselves so that our peers can find us PeerFinder.Start(); RefreshPeerAppList(); base.OnNavigatedTo(e); string parameterValue = NavigationContext.QueryString["parameter"]; card = new Cards(); card = card.getCard(int.Parse(parameterValue)); this.DataContext = card; }
private void GetCard() { Random rand = new Random(); int id = rand.Next(0, 2); Cards card = new Cards(); card = card.getCard(id); card.Increase(); }