public LevelFailed(LevelFailedViewModel lfvm) { InitializeComponent(); LevelFailedVM = lfvm; adRewardedVideo = DependencyService.Get <IAdRewarded>(); adRewardedVideo.Init(this); adIntersticial = DependencyService.Get <IAdIntersticial>(); adIntersticial.Init(this); questionLbl.Text = LevelFailedVM.LevelPlayViewModel.GetActualQuestion().QuestionText; BindingContext = this; this.IsBusy = false; LevelFailedVM.LevelPlayViewModel.CanContinue = false; LevelFailedVM.LevelPlayViewModel.IsReturnedFromModal = true; }
public LevelPlayPage(LevelPlayViewModel lvlVM, JokersModel jokers) { InitializeComponent(); adIntersticial = DependencyService.Get <IAdIntersticial>(); adIntersticial.Init(this); Jokers = jokers; _rnd = new Random(); LevelPlayViewModel = lvlVM; LblQuestion.Text = LevelPlayViewModel.GetActualQuestion().QuestionText; actualOptions = LevelPlayViewModel.GetActualQuestion().Options.OrderBy((item) => _rnd.Next()).ToList(); listOptions.ItemsSource = actualOptions; listOptions.ItemClickCommand = ItemClickCommand; var fiftyTapRecognizer = new TapGestureRecognizer { Command = new Command(OnFiftyFifty), NumberOfTapsRequired = 1 }; fiftyfiftyImg.GestureRecognizers.Add(fiftyTapRecognizer); var peopleTapRecognizer = new TapGestureRecognizer { Command = new Command(OnPeopleTap), NumberOfTapsRequired = 1 }; peopleImg.GestureRecognizers.Add(peopleTapRecognizer); var phoneTapRecognizer = new TapGestureRecognizer { Command = new Command(OnPhoneTap), NumberOfTapsRequired = 1 }; phoneImg.GestureRecognizers.Add(phoneTapRecognizer); BindingContext = this; }