Esempio n. 1
0
 /// <summary>
 /// 开始播放
 /// </summary>
 private void lb_play_Click(object sender, EventArgs e)
 {
     //获取player状态
     Constant.PLAY_STATE state = (Constant.PLAY_STATE) this.player.GetState();
     //如果为播放
     if (state == Constant.PLAY_STATE.PS_PLAY)
     {
         this.player.SetConfig(602, "1");  //激活视频叠图加功能, 1-激活, 0-不激活
         this.player.SetConfig(621, "1");  //获取或设置 EVRCP 是否使用线形插值叠图,0-不是用,1-使用,默认0
         this.player.SetConfig(612, "暂停"); //设置一段文本作为叠加图像,值为文本内容
         ClearTip.Clear(player, 1000);
         this.player.Pause();
         this.lb_play.DM_Key = DMSkin.Controls.DMLabelKey.播放;
     }
     //如果为暂停
     else if (state == Constant.PLAY_STATE.PS_PAUSED)
     {
         this.player.SetConfig(602, "1");
         this.player.SetConfig(621, "1");
         this.player.SetConfig(612, "播放");
         ClearTip.Clear(player, 1000);
         this.player.Play();
         this.lb_play.DM_Key = DMSkin.Controls.DMLabelKey.暂停;
     }
 }
Esempio n. 2
0
        private void Snap(object sender, EventArgs e)
        {
            if (this.player.GetConfig(701) == "0")
            {
                this.player.SetConfig(602, "0");
                timer.Enabled = false;
                return;
            }
            this.player.SetConfig(602, "1");
            this.player.SetConfig(621, "1"); //使用线形插值叠图

            if (num-- <= 0)
            {
                timer.Enabled = false;
                //this.player.Pause();
                //this.player.SetVolume(this.oldVol);
                //this.player.SetPosition(this.oldPos);
                //this.startBtn.Text = "开始截图";
                //this.startBtn.Enabled = true;
                this.player.SetConfig(612, "截图完成");
                ClearTip.Clear(this.player, 500);
                this.Close();
                return;
            }

            //截图
            this.player.SetConfig(612, "正在截图中..(" + (this.numBox.Value - num) + ")");

            this.player.SetConfig(707, "2");
            string path = this.dir + @"\" + (this.numBox.Value - num) + ".jpg";

            Console.WriteLine(path);
            this.player.SetConfig(702, path);
        }
Esempio n. 3
0
        /// <summary>
        /// 鼠标:改变音量
        /// </summary>
        private void pgb_vol_MouseMove(object sender, MouseEventArgs e)
        {
            int num = 1;

            if (this.IsMouseDown)
            {
                this.volume = ((int)this.pgb_vol.DM_Value) * num;
                this.player.SetConfig(602, "1");                         //激活视频叠加图功能, 1-激活, 0-不激活
                this.player.SetConfig(621, "1");                         //获取或设置 EVRCP 是否使用线形插值叠图,0-不是用,1-使用,默认0
                this.player.SetConfig(612, "音量 (" + this.volume + "%)"); //设置一段文本作为叠加图像,值为文本内容,支持回车换行符主动换行和自动换行
                ClearTip.Clear(player, 1000);
                UpdateVol();                                             //更新喇叭音量视图效果
            }
        }
Esempio n. 4
0
 /// <summary>
 /// 截屏操作
 /// </summary>
 private void lb_jietu_Click(object sender, EventArgs e)
 {
     if (this.player.GetConfig(701) == "1") //查询截图功能是否可用。
     {
         this.player.SetConfig(707, "2");   //截图的输出格式,1-bmp, 2-jpg, 3-png, 4-gif, 默认为 1。
         string dir  = Settings.Default.picDir;
         string date = DateTime.Now.ToString("HHMMddhhmmssfff");
         string path = dir + "\\我的视频截图" + date + ".jpg";
         this.player.SetConfig(702, path);     //截取当前视频图像,值为文件路径,例如:"C:\snapshot.bmp"
         this.player.SetConfig(602, "1");      //激活视频叠加图功能, 1-激活, 0-不激活
         this.player.SetConfig(621, "1");      //获取或设置 EVRCP 是否使用线形插值叠图,0-不是用,1-使用,默认0
         this.player.SetConfig(612, "视频截图成功"); //设置一段文本作为叠加图像,值为文本内容。
         ClearTip.Clear(player, 2000);
     }
 }