public PlayViewModel(int DeckID) { DeckDatabase = new DeckDB(); Deck = DeckDatabase.GetDeck(DeckID); CardDatabase = new CardDB(Deck); GetHand(); this.navigation = navigation; RightAnswer = new Command(Right); WrongAnswer = new Command(Wrong); Flip = new Command(FlipIt); }
public ByScoreViewModel(int DeckID) { DeckDatabase = new DeckDB(); this.Deck = DeckDatabase.GetDeck(DeckID); CardDatabase = new CardDB(Deck); HandSize = Settings.HandSize; RightAnswer = new Command(Right); WrongAnswer = new Command(Wrong); Flip = new Command(FlipIt); Random = new Random(); GetCards(); }
public MultiChoiceViewModel(int DeckID) { DeckDatabase = new DeckDB(); this.Deck = DeckDatabase.GetDeck(DeckID); CardDatabase = new CardDB(Deck); Cards = CardDatabase.GetCards(); GetHand(); Answers = new ObservableCollection <AnswerCard>(); Pick = new Command(Picked); Position = 0; index = 0; Setup(); }
void NavToPlayPage(object s) { var deckLabel = s as DeckLabel; var deck = DeckDatabase.GetDeck(deckLabel.ID); if (Type == 1) { Xamarin.Forms.Application.Current.MainPage.Navigation.PushAsync(new PlayPage(deck)); } else if (Type == 2) { Xamarin.Forms.Application.Current.MainPage.Navigation.PushAsync(new MultiChoicePage(deck)); } else if (Type == 3) { Xamarin.Forms.Application.Current.MainPage.Navigation.PushAsync(new ByScorePage(deck)); } else if (Type == 4) { Xamarin.Forms.Application.Current.MainPage.Navigation.PushAsync(new NotificationSettingsPage(deck)); } }