本文整理汇总了C#中AxWMPLib类的典型用法代码示例。如果您正苦于以下问题:C# AxWMPLib类的具体用法?C# AxWMPLib怎么用?C# AxWMPLib使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AxWMPLib类属于命名空间,在下文中一共展示了AxWMPLib类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MP3Player
public MP3Player(string url , AxWMPLib.AxWindowsMediaPlayer p)
{
_player = p;
_fileUrl = url;
ThreadStart ts = new ThreadStart(GetMp3File);
_httpThread = new Thread(ts);
_httpThread.Start();
_checkTimer = new DispatcherTimer();
_checkTimer.Interval = new TimeSpan(0,0,0,0,20);
_checkTimer.Tick += _checkTimer_Tick;
_checkTimer.Start();
}
示例2: wmp_MouseUpEvent
/// <summary>
/// MouseUp
/// </summary>
void wmp_MouseUpEvent(object sender, AxWMPLib._WMPOCXEvents_MouseUpEvent e)
{
if ((IsOpenContextMenu) && (e.nButton == 2) && (wmp.MouseGesture == ""))
{
contextMenuStripWMP.Show(MousePosition);
}
}
示例3: axWindowsMediaPlayer1_PlayStateChange
private void axWindowsMediaPlayer1_PlayStateChange(object sender, AxWMPLib._WMPOCXEvents_PlayStateChangeEvent e)
{
//QUANDO VIDEO FOR PARADO
if (axWindowsMediaPlayer1.playState == WMPLib.WMPPlayState.wmppsPlaying )
{
//PARA O AUDIO DE FUNDO
Player.controls.stop();
axWindowsMediaPlayer1.fullScreen = true;
}
//QUANDO VIDEO FOR PARADO
if (axWindowsMediaPlayer1.playState == WMPLib.WMPPlayState.wmppsPaused)
{
//O VIDEO FOI PARADO, PARA CONTINUAR PRECISA CLICAR EM OK
if (MessageBox.Show("Video Parado. Clique aqui para continuar!", "",
MessageBoxButtons.OK, MessageBoxIcon.Information) == DialogResult.OK)
{
axWindowsMediaPlayer1.Ctlcontrols.play();
}
}
//VOLTA O AUDIO DE FUNDO
if (axWindowsMediaPlayer1.playState == WMPLib.WMPPlayState.wmppsMediaEnded )
{
//Player.controls.play();
PlayFile();
}
}
示例4: axWindowsMediaPlayer1_PlayStateChange
private void axWindowsMediaPlayer1_PlayStateChange(object sender, AxWMPLib._WMPOCXEvents_PlayStateChangeEvent e)
{
switch (e.newState)
{
case 1:
textBox1.Text = "Stopped";
break;
case 2:
textBox1.Text = "Pause";
break;
case 3:
for (int i = 0; i < axWindowsMediaPlayer1.currentPlaylist.count; i++)
{
if (axWindowsMediaPlayer1.currentMedia.isIdentical[axWindowsMediaPlayer1.currentPlaylist.Item[i]])
{
textBox1.Text = audioList[i].artist + " - " + audioList[i].title;
listBox1.SelectedIndex = i;
break;
}
}
break;
case 6:
textBox1.Text = "Buffering... so slow internet........";
break;
default:
// textBox1.Text = "";
break;
}
}
示例5: wmp_MouseMoveEvent
/// <summary>
/// WMP:MouseMove
/// </summary>
void wmp_MouseMoveEvent(object sender, AxWMPLib._WMPOCXEvents_MouseMoveEvent e)
{
// 右クリックしている時
if (e.nButton == 2)
{
// マウスジェスチャ
string gesture = wmp.MouseGesture;
if (gesture != "")
{
for (int i = 0; i < settings.ShortcutList.Count; i++)
{
if (gesture == settings.ShortcutList[i][0])
{
gesture += " (" + CommandToString(settings.ShortcutList[i][1]) + ")";
break;
}
}
labelDetail.Text = "ジェスチャ:" + gesture;
}
}
// ToolStripの表示
if (e.fX > toolStrip.Left - 15 && e.fY < toolStrip.Height + 15)
{
toolStrip.Visible = true;
}
else
{
toolStrip.Visible = false;
}
}
示例6: axWindowsMediaPlayer1_CurrentItemChange
private void axWindowsMediaPlayer1_CurrentItemChange(object sender, AxWMPLib._WMPOCXEvents_CurrentItemChangeEvent e)
{
if (listBox1.SelectedIndex > -1)
{
if (listBox1.SelectedIndex != audioList.Count - 1)
{
if (axWindowsMediaPlayer1.Ctlcontrols.currentItem.name == axWindowsMediaPlayer1.currentPlaylist.get_Item(listBox1.SelectedIndex + 1).name)
{
listBox1.SelectedIndex = listBox1.SelectedIndex + 1;
}
}
if (listBox1.SelectedIndex != 0)
{
if (axWindowsMediaPlayer1.Ctlcontrols.currentItem.name == axWindowsMediaPlayer1.currentPlaylist.get_Item(listBox1.SelectedIndex - 1).name)
{
listBox1.SelectedIndex = listBox1.SelectedIndex - 1;
}
}
if (axWindowsMediaPlayer1.Ctlcontrols.currentItem.name != axWindowsMediaPlayer1.currentPlaylist.get_Item(listBox1.SelectedIndex).name)
{
axWindowsMediaPlayer1.Ctlcontrols.currentItem = axWindowsMediaPlayer1.currentPlaylist.get_Item(listBox1.SelectedIndex);
}
}
}
示例7: AxWmpPlayStateChange
void AxWmpPlayStateChange(object sender, AxWMPLib._WMPOCXEvents_PlayStateChangeEvent e)
{
if (e.newState == 8)
{
// indicate we are stopped
_finished = true;
}
}
示例8: axWindowsMediaPlayer1_PlayStateChange
private void axWindowsMediaPlayer1_PlayStateChange(object sender, AxWMPLib._WMPOCXEvents_PlayStateChangeEvent e)
{
if (mediaplayer.playState == WMPLib.WMPPlayState.wmppsMediaEnded)
{
SongEnded = true;
CheckSong.Start();
}
}
示例9: axWindowsMediaPlayer1_PlayStateChange
private void axWindowsMediaPlayer1_PlayStateChange(object sender, AxWMPLib._WMPOCXEvents_PlayStateChangeEvent e)
{
if (e.newState == 8)
{
Form1 N = new Form1(this);
this.Visible = false;
N.Show();
}
}
示例10: wmpDuck_PlayStateChange
private void wmpDuck_PlayStateChange(object sender, AxWMPLib._WMPOCXEvents_PlayStateChangeEvent e)
{
//Util.MensajeInformacion("wmpDuck_PlayStateChange " + e.newState, "");
switch (e.newState)
{
case 8: // MediaEnded
this.Close();
break;
}
}
示例11: MediaControl_PositionChange
private void MediaControl_PositionChange(object sender, AxWMPLib._WMPOCXEvents_PositionChangeEvent e)
{
if (_config == null)
return;
if (ExpectingPositionChange)
{
return;
}
_config.SyncState();
}
示例12: axWindowsMediaPlayer1_MouseMoveEvent
private void axWindowsMediaPlayer1_MouseMoveEvent(object sender, AxWMPLib._WMPOCXEvents_MouseMoveEvent e)
{
if (!mouseLocation.IsEmpty)
{
if (Math.Abs(mouseLocation.X - e.fX) > 5 || Math.Abs(mouseLocation.Y - e.fY) > 5)
{
if (!previewMode) Application.Exit();
}
}
mouseLocation = new Point(e.fX, e.fY);
}
示例13: axWindowsMediaPlayer1_ClickEvent
private void axWindowsMediaPlayer1_ClickEvent(object sender, AxWMPLib._WMPOCXEvents_ClickEvent e)
{
if (this.FormBorderStyle == FormBorderStyle.None)
{
this.FormBorderStyle = FormBorderStyle.FixedToolWindow;
}
else
{
this.FormBorderStyle = FormBorderStyle.None;
}
}
示例14: wmp_ClickEvent
private void wmp_ClickEvent(object sender, AxWMPLib._WMPOCXEvents_ClickEvent e)
{
if (wmp.Ctlcontrols.currentPosition > wmp.currentMedia.duration - 3)
{
wmp.Ctlcontrols.stop();
wmp.Ctlcontrols.play();
tmr.Interval = (int)((wmp.currentMedia.duration - 4) * 1000);
tmr.Enabled = true;
tmr.Start();
}
}
示例15: axInstruction_PlayStateChange
private void axInstruction_PlayStateChange(object sender, AxWMPLib._WMPOCXEvents_PlayStateChangeEvent e)
{
//wait two seconds when video stops, then close
//MessageBox.Show(axInstruction.playState.ToString());
if ((WMPLib.WMPPlayState)e.newState == WMPPlayState.wmppsMediaEnded | (WMPLib.WMPPlayState)e.newState == WMPPlayState.wmppsStopped)
{
System.Threading.Thread.Sleep(0);
this.Close();
}
}