Exemple #1
0
 private void BtnOperator_Click(object sender, RoutedEventArgs e)
 {
     if (BtnOperator.Tag.ToString() == "Play")
     {
         MediaShowElement.Play();
         m_Timer.Start();
         BtnOperator.Style = Resources["MediaBtnPause"] as Style;
         BtnOperator.Tag   = "Pause";
     }
     else
     {
         MediaShowElement.Pause();
         BtnOperator.Style = Resources["MediaBtnPlay"] as Style;
         BtnOperator.Tag   = "Play";
     }
 }
Exemple #2
0
        private void OnPlayerViewLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            if (e.ButtonState == MouseButtonState.Pressed)
            {
                this.DragMove();

                if (BtnOperator.Tag.ToString() == "Play")
                {
                    MediaShowElement.Play();
                    m_Timer.Start();
                    BtnOperator.Style = Resources["MediaBtnPause"] as Style;
                    BtnOperator.Tag   = "Pause";
                }
                else
                {
                    MediaShowElement.Pause();
                    BtnOperator.Style = Resources["MediaBtnPlay"] as Style;
                    BtnOperator.Tag   = "Play";
                }
            }
        }