Exemplo n.º 1
0
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     MediaShowElement.Play();
     m_Timer.Start();
     BtnOperator.Style = Resources["MediaBtnPause"] as Style;
     BtnOperator.Tag   = "Pause";
 }
Exemplo n.º 2
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";
     }
 }
Exemplo n.º 3
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";
                }
            }
        }