當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。