public IntroPage5() { InitializeComponent(); if (Device.RuntimePlatform == Device.Android) { header.IsVisible = false; } this.BindingContext = new IntroPage5ViewModel(GetVideoView()); NextButton.GestureRecognizers.Add(new TapGestureRecognizer { Command = new Command(() => { VideoView.Stop(); IntroCarousel.NavigateToMainMenu(); }), }); SkipIntroText.GestureRecognizers.Add(new TapGestureRecognizer { Command = new Command(() => { VideoView.Stop(); IntroCarousel.NavigateToMainMenu(); }), }); //System.Diagnostics.Debug.WriteLine("Source: " + "android.resource://" + _Source); }
/// <summary> /// Button Clicked event handler. /// </summary> /// <param name="sender">event sender</param> /// <param name="e">event parameters</param> private void OnClicked(object sender, ClickedEventArgs e) { Button button = sender as Button; switch (button.Text) { case "play": player.Play(); break; case "pause": player.Pause(); break; case "stop": player.Stop(); break; case "forward": player.Forward(1000); // +1 sec break; case "backward": player.Backward(1000); // -1 sec break; } }
private void btnPlay_Click(object sender, EventArgs e) { if (videoIsOn) { _videoView.Stop(); btnPlay.Image = new Bitmap(Properties.Resources.img_play1, btnPlay.Size); videoIsOn = false; } else { _videoView.Start(); btnPlay.Image = new Bitmap(Properties.Resources.silver_pause_sign, btnPlay.Size); videoIsOn = true; labelDeviceInfo.Text = GetDeviceInfo(); } Delegate pointGuiControlsEnable = new delegateEnableControl(ControlEnable); foreach (Control ctrl in new Control[] { btnRecord, btnSnapshot, groupBoxDeviceInfo }) { InvokeGuiThread(pointGuiControlsEnable, ctrl, videoIsOn); } }