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"; } }
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"; } } }