Example #1
0
 private void Player_OnMessage(object sender, _IPlayerEvents_OnMessageEvent e)
 {
     if (e.nMessage == 517)  //右键按下
     {
         ConfigForm cong = new ConfigForm();
         cong.ShowDialog();
     }
 }
Example #2
0
        /// <summary>
        /// axPlayer的鼠标、键盘事件处理
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void axPlayer1_OnMessage(object sender, _IPlayerEvents_OnMessageEvent e)
        {
            switch (e.nMessage)
            {
            case 513:
                APlayPlayOrPause();
                break;

            case 517:
                //contextMenuStrip2.Show(axPlayer1, axPlayer1.PointToClient(Cursor.Position));
                break;

            default:
                break;
            }
            //....
        }
Example #3
0
        /// <summary>
        /// axPlayer的鼠标、键盘事件处理
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void axPlayer1_OnMessage(object sender, _IPlayerEvents_OnMessageEvent e)
        {
            //throw new NotImplementedException();
            switch (e.nMessage)
            {
            case conf.WM_RBUTTONDOWN:
                int tempstatus = axPlayer1.GetState();

                if (axPlayer1.GetState() == 5)
                {
                    contextMenuStrip1.Items["playpause"].Text = "暂停";
                }
                else
                {
                    contextMenuStrip1.Items["playpause"].Text = "播放";
                }
                contextMenuStrip1.Show(axPlayer1, axPlayer1.PointToClient(Cursor.Position));
                break;

            default: break;
            }
        }
Example #4
0
        /// <summary>
        /// axPlayer的鼠标、键盘事件处理
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void axPlayer1_OnMessage(object sender, _IPlayerEvents_OnMessageEvent e)
        {
            //throw new NotImplementedException();
            switch (e.nMessage)
            {
                case conf.WM_LBUTTONDOWN:
                    if (_play.isScreen == false)
                        MoveForm();
                    break;
                case conf.WM_LBUTTONUP:
                    if (_play.isScreen == true)
                    {// 进度跳转
                        //MessageBox.Show(colorSlider2.Maximum + "   "+ colorSlider2.Value);
                        int tmp = (int)((Control.MousePosition.X - _play.VM_X) * 30);
                        colorSlider2.Value += tmp;
                        axPlayer1.SetPosition(colorSlider2.Value * 10);
                    }
                    break;
                case conf.WM_RBUTTONDOWN:
                     int tempstatus=axPlayer1.GetState();
                    if (axPlayer1.GetState()== 5)
                    {
                        contextMenuStrip1.Items["playpause"].Text = "暂停";
                    }
                    else
                    {
                        contextMenuStrip1.Items["playpause"].Text = "播放";
                    }
                    contextMenuStrip1.Show(axPlayer1, axPlayer1.PointToClient(Cursor.Position));
                    break;
                case conf.WM_LBUTTONDBLCLK:
                    FullScreenInAndOut();break;
                default: break;
	        }

            //switch (e.nMessage)
            //{

            //    case conf.WM_LBUTTONDOWN:
            //        //Functions.moveForm(this.Handle);//拖动窗口SendMessage   这里按下默认拖动窗口
            //        //VM_X = Control.MousePosition.X; //记录鼠标此刻位置
            //        //VM_Y = Control.MousePosition.Y;
            //        //System.Threading.Thread.Sleep(300); //300毫秒后执行interval时钟事件
            //        //interval.Enabled = true;
            //        //Functions.moveForm(this.Handle);
            //        break;
            //    case conf.WM_LBUTTONUP:
            //        //interval.Enabled = false;//鼠标弹起静止时钟 减耗内存
            //        break;
            //    case conf.WM_LBUTTONDBLCLK://双击全屏事件
            //        MessageBox.Show("双击");
            //        //interval.Enabled = false;
            //        maxScreen();


            //        break;
            //    case conf.WM_RBUTTONDOWN:
            //        MessageBox.Show("右键单击");
            //        //rightButtonMenu.Show(new Point(Control.MousePosition.X, Control.MousePosition.Y));
            //        break;
            //    default:
            //        break;

            //}
        }