private void LevelOne_Click(object sender, EventArgs e)
 {
     player = MediaPlayer.Create(Activity, Resource.Raw.plop_sound);
     player.Start();
     Android.Support.V4.App.Fragment fragmentLogin = new LevelOneFragment(0);
     FragmentManager.BeginTransaction().Replace(Resource.Id.parent_fragment, fragmentLogin).Commit();
 }
Beispiel #2
0
 private void LeftBlock_Click(object sender, EventArgs e)
 {
     player = MediaPlayer.Create(Activity, Resource.Raw.plop_sound);
     player.Start();
     if (leftBlock.IsCorrectAnswer)
     {
         CountCorrectAnswers++;
         player = MediaPlayer.Create(Activity, Resource.Raw.correctAnswer);
         player.Start();
         if (CountCorrectAnswers == 5)
         {
             Android.Support.V4.App.Fragment fragmentLogin = new YouTubeVideo();
             FragmentManager.BeginTransaction().Replace(Resource.Id.parent_fragment, fragmentLogin).Commit();
         }
         else
         {
             Android.Support.V4.App.Fragment fragmentLogin = new LevelOneFragment(CountCorrectAnswers);
             FragmentManager.BeginTransaction().Replace(Resource.Id.parent_fragment, fragmentLogin).Commit();
         }
     }
     else
     {
         player = MediaPlayer.Create(Activity, Resource.Raw.hmmThinkAgain);
         player.Start();
     }
 }