void axWindowsMediaPlayer1_OpenStateChange(object sender, AxWMPLib._WMPOCXEvents_OpenStateChangeEvent e) { if (axWindowsMediaPlayer1.openState == WMPLib.WMPOpenState.wmposMediaOpen) { t.Start(); } }
private void WMP_OpenStateChange(object sender, AxWMPLib._WMPOCXEvents_OpenStateChangeEvent e) { if (Quiz.randomStart && WMP.openState == WMPLib.WMPOpenState.wmposMediaOpen) { WMP.Ctlcontrols.currentPosition = rnd.Next(0, (int)WMP.currentMedia.duration / 2); } }
private void axWindowsMediaPlayer_OpenStateChange(object sender, AxWMPLib._WMPOCXEvents_OpenStateChangeEvent e) { if (e.newState == (int)WMPLib.WMPOpenState.wmposMediaOpen) { this.axWindowsMediaPlayer.Ctlcontrols.currentPosition = this.currentPlayingLink.LastPosition; } }
/// <summary> /// Player OpenStateChange event handler. /// Show current media metadata when the user opens a media file. /// </summary> /// <param name="sender"></param> /// <param name="e">e.NewState contains the WMPOpenState value for the event.</param> private void Player_OpenStateChange(object sender, AxWMPLib._WMPOCXEvents_OpenStateChangeEvent e) { if ((WMPOpenState)e.newState == WMPOpenState.wmposMediaOpen) { mnuCurrentMedia_Click(this, null); SetDVDButtonStates(); } }
private void axWindowsMediaPlayer1_OpenStateChange(object sender, AxWMPLib._WMPOCXEvents_OpenStateChangeEvent e)//Check for Playr is open or not { if (axWindowsMediaPlayer1.openState == WMPLib.WMPOpenState.wmposMediaOpen) { bunifuSlider1.MaximumValue = (int)axWindowsMediaPlayer1.currentMedia.duration; T.Start(); } }
private void WMP_OpenStateChange(object sender, AxWMPLib._WMPOCXEvents_OpenStateChangeEvent e) { if (Controller.getRandomStart()) { if (WMP.openState == WMPLib.WMPOpenState.wmposMediaOpen) { WMP.Ctlcontrols.currentPosition = (new Random()).Next(0, (int)WMP.currentMedia.duration / 2); } } }
private void WMP_OpenStateChange(object sender, AxWMPLib._WMPOCXEvents_OpenStateChangeEvent e) { if (Settings.randomMusicStart) { if (WMP.openState == WMPLib.WMPOpenState.wmposMediaOpen) { WMP.Ctlcontrols.currentPosition = random.Next(0, (int)WMP.currentMedia.duration - Settings.musicDuration); } } }
private void axWindowsMediaPlayer1_OpenStateChange(object sender, AxWMPLib._WMPOCXEvents_OpenStateChangeEvent e) { //動画の長さを取得 switch (e.newState) { case 13: //メディアが開いている状態 string aa = axWindowsMediaPlayer1.currentMedia.durationString; break; } }
private void WMP_OpenStateChange(object sender, AxWMPLib._WMPOCXEvents_OpenStateChangeEvent e) { if (GameEngine.randomStart) { if (WMP.openState == WMPLib.WMPOpenState.wmposMediaOpen) { WMP.Ctlcontrols.currentPosition = rnd.Next(0, (int)WMP.currentMedia.duration - (GameEngine.musicDuration + 10)); } } }
private void Player_OpenStateChange(object sender, AxWMPLib._WMPOCXEvents_OpenStateChangeEvent e) { if (e.newState == (int)WMPLib.WMPOpenState.wmposMediaOpen) { if (MediaOpened != null) { MediaOpened(this, new EventArgs()); } } }
private void winMediaPlayer_OpenStateChange(object sender, AxWMPLib._WMPOCXEvents_OpenStateChangeEvent e) { if (Quiz.randomStartPartInMusic) { if (winMediaPlayer.openState == WMPLib.WMPOpenState.wmposMediaOpen) { winMediaPlayer.Ctlcontrols.currentPosition = random.Next(0, (int)winMediaPlayer.currentMedia.duration / 2); } } }
private void axWindowsMediaPlayer1_OpenStateChange(object sender, AxWMPLib._WMPOCXEvents_OpenStateChangeEvent e) { if (Victorina.randomStart) { if (axWindowsMediaPlayer1.openState == WMPLib.WMPOpenState.wmposMediaOpen) { axWindowsMediaPlayer1.Ctlcontrols.currentPosition = rnd.Next(0, (int)axWindowsMediaPlayer1.currentMedia.duration / 2); } } }
private void WMP_OpenStateChange(object sender, AxWMPLib._WMPOCXEvents_OpenStateChangeEvent e) { if (Victorina.RandomStart) { if (WMP.openState == WMPOpenState.wmposMediaOpen) { WMP.Ctlcontrols.currentPosition = rand.Next(0, (int)(WMP.currentMedia.duration / 2)); } } }
/// <summary> /// Function which creates log when media is changed. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void mediaPlayer_OpenStateChange(object sender, AxWMPLib._WMPOCXEvents_OpenStateChangeEvent e) { String currentFile; if (mediaPlayer.openState == WMPOpenState.wmposMediaOpen) { currentFile = mediaPlayer.currentMedia.name; log.Info("started playing " + currentFile); labelFileName.Text = currentFile; } }
private void WMP_OpenStateChange(object sender, AxWMPLib._WMPOCXEvents_OpenStateChangeEvent e) { //begin with random part of music if (Victorina.randomStart) { if (WMP.openState == WMPLib.WMPOpenState.wmposMediaOpen) { WMP.Ctlcontrols.currentPosition = rnd.Next(0, (int)WMP.currentMedia.duration / 2);// duration is double, so we must make this (int) } } //duration of music/2, in other words this is our "random part" }
private void axWindowsMediaPlayer1_OpenStateChange(object sender, AxWMPLib._WMPOCXEvents_OpenStateChangeEvent e) { this.listBox1.Items.Add(string.Format("state:{0}, msg:{1}", e.newState, this.axWindowsMediaPlayer1.status)); if (e.newState == 13) { int count = this.axWindowsMediaPlayer1.currentMedia.markerCount; this.listBox1.Items.Add(string.Format("marker count : {0}", count)); //1からカウント for (int i = 1; i <= count; i++) { this.listBox1.Items.Add(string.Format("marker name:{0}, time:{1}", this.axWindowsMediaPlayer1.currentMedia.getMarkerName(i), this.axWindowsMediaPlayer1.currentMedia.getMarkerTime(i))); } } }
private void axWindowsMediaPlayer1_OpenStateChange(object sender, AxWMPLib._WMPOCXEvents_OpenStateChangeEvent e) { if (axWindowsMediaPlayer1.playState == WMPLib.WMPPlayState.wmppsPlaying) { progressBar1.Maximum = (int)axWindowsMediaPlayer1.Ctlcontrols.currentItem.duration; timer1.Start(); } else if (axWindowsMediaPlayer1.playState == WMPLib.WMPPlayState.wmppsPaused) { timer1.Stop(); } else if (axWindowsMediaPlayer1.playState == WMPLib.WMPPlayState.wmppsStopped) { timer1.Stop(); progressBar1.Value = 0; } }
void axWindowsMediaPlayer1_OpenStateChange(object sender, AxWMPLib._WMPOCXEvents_OpenStateChangeEvent e) { if (e.newState == 13) { var rate = (int)_rate; var startPos = axWindowsMediaPlayer1.currentMedia.duration * _initialPosition; axWindowsMediaPlayer1.Ctlcontrols.currentPosition = startPos; if (rate >= 1) { axWindowsMediaPlayer1.Ctlcontrols.play(); } else { axWindowsMediaPlayer1.Ctlcontrols.pause(); } _isOpened = true; } }
//If song/video loaded then get this data otherwise it would return 0 private void axWindowsMediaPlayer1_OpenStateChange(object sender, AxWMPLib._WMPOCXEvents_OpenStateChangeEvent e) { if (axWindowsMediaPlayer1.playState == WMPLib.WMPPlayState.wmppsPlaying) { textBox2.Visible = true; textBox3.Visible = true; textBox4.Visible = true; textBox5.Visible = true; button1.Enabled = true; button1.BackColor = Color.LightGreen; button4.Enabled = true; button4.BackColor = Color.LightGreen; string[] duration = axWindowsMediaPlayer1.currentMedia.durationString.Split(':'); length = int.Parse(duration[1]) + int.Parse(duration[0]) * 60; axWindowsMediaPlayer1.Ctlcontrols.stop(); label2.Text = "Length : " + int.Parse(duration[0]) + ":" + int.Parse(duration[1]) + " (hh:mm:ss)"; } }
private void axWindowsMediaPlayer2_OpenStateChange(object sender, AxWMPLib._WMPOCXEvents_OpenStateChangeEvent e) { }
private void axWindowsMediaPlayer1_OpenStateChange(object sender, AxWMPLib._WMPOCXEvents_OpenStateChangeEvent e) { Debug.Print("OpenStateChange"); }