当前位置: 首页>>代码示例>>C#>>正文


C# AxWMPLib类代码示例

本文整理汇总了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();
 }
开发者ID:joewen,项目名称:KKWindowsComponent,代码行数:12,代码来源:MP3Player.cs

示例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);
     }
 }
开发者ID:progre,项目名称:PeerstPlayer,代码行数:10,代码来源:MainFormWMPEvent.cs

示例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();
            }
        }
开发者ID:marcommas,项目名称:videoIndaiatubaCSharp,代码行数:28,代码来源:Home.cs

示例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;
            }
        }
开发者ID:Igor4uk,项目名称:VKAudioPlayer,代码行数:30,代码来源:Form1.cs

示例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;
            }
        }
开发者ID:progre,项目名称:PeerstPlayer,代码行数:36,代码来源:MainFormWMPEvent.cs

示例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);
                }
            }
        }
开发者ID:HappyLittleProgrammer,项目名称:music-player-course-work,代码行数:27,代码来源:MainForm.cs

示例7: AxWmpPlayStateChange

 void AxWmpPlayStateChange(object sender, AxWMPLib._WMPOCXEvents_PlayStateChangeEvent e)
 {
     if (e.newState == 8)
     {
         // indicate we are stopped
         _finished = true;
     }
 }
开发者ID:afrog33k,项目名称:eAd,代码行数:8,代码来源:VideoPlayer.cs

示例8: axWindowsMediaPlayer1_PlayStateChange

        private void axWindowsMediaPlayer1_PlayStateChange(object sender, AxWMPLib._WMPOCXEvents_PlayStateChangeEvent e)
        {
            if (mediaplayer.playState == WMPLib.WMPPlayState.wmppsMediaEnded)
            {
                SongEnded = true;
                CheckSong.Start();

            }
        }
开发者ID:Ricardo1991,项目名称:osump3,代码行数:9,代码来源:OsuMp3.cs

示例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();

            }
        }
开发者ID:YousefRabieKhalil,项目名称:N-Puzzle-Solver,代码行数:10,代码来源:FirstForm.cs

示例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;
     }
 }
开发者ID:moisesiq,项目名称:aupaga,代码行数:10,代码来源:Duck.cs

示例11: MediaControl_PositionChange

 private void MediaControl_PositionChange(object sender, AxWMPLib._WMPOCXEvents_PositionChangeEvent e)
 {
     if (_config == null)
         return;
     if (ExpectingPositionChange)
     {
         return;
     }
     _config.SyncState();
 }
开发者ID:NicholasVanSickle,项目名称:Sync-Video,代码行数:10,代码来源:PlayerForm.cs

示例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);
 }
开发者ID:KennethWussmann,项目名称:VideoScreenSaver,代码行数:11,代码来源:ScreenSaverForm.cs

示例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;
     }
 }
开发者ID:yesterday17,项目名称:DanmakuSong,代码行数:11,代码来源:frmPlayer.cs

示例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();
     }
 }
开发者ID:stankowalczyk,项目名称:composition,代码行数:11,代码来源:frmMain.cs

示例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();

            }
        }
开发者ID:NeilSokol,项目名称:syde461,代码行数:11,代码来源:InstructionVideo.cs


注:本文中的AxWMPLib类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。