コード例 #1
0
        private void wnd_DragDrop(object sender, DragEventArgs e)
        {
            ucSinglePlayWnd p = sender as ucSinglePlayWnd;


            Type dataType = typeof(DevComponents.AdvTree.Node);

            if (e.Data.GetDataPresent(dataType))
            {
                DevComponents.AdvTree.Node node = (DevComponents.AdvTree.Node)e.Data.GetData(dataType);
                TaskInfoV3_1 task = node.Tag as TaskInfoV3_1;
                if (task != null)
                {
                    TaskMSSInfoV3_1 mssinfo = m_viewModel.GetMssTaskInfo(task.TaskId);
                    if (mssinfo != null)
                    {
                        p.VideoName = task.TaskName;
                        p.StartPlayBack(mssinfo.MssHostIp, mssinfo.MssHostPort, mssinfo.VideoPath, 0, 0);
                    }
                    else
                    {
                        DevComponents.DotNetBar.MessageBoxEx.Show("无此视频文件", Framework.Environment.PROGRAM_NAME, MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                    }
                }
            }
        }
コード例 #2
0
 private void buttonX7_Click(object sender, EventArgs e)
 {
     Framework.Environment.VODPlayControler = axvodocx1;
     if (ucSinglePlayWnd1.Init())
     {
         currWnd           = ucSinglePlayWnd1;
         currWnd.VideoName = System.IO.Path.GetFileName(textBoxPath.Text);
     }
 }
コード例 #3
0
 private void UpdataTime(View.ucSinglePlayWnd wnd)
 {
     if (InvokeRequired)
     {
         this.Invoke(new Action <View.ucSinglePlayWnd>(UpdataTime), wnd);
     }
     else
     {
         labelX2.Text = wnd.VideoTime;
     }
 }
コード例 #4
0
 void ucSinglePlayWnd1_PropertyChanged(object sender, PropertyChangedEventArgs e)
 {
     View.ucSinglePlayWnd wnd = sender as View.ucSinglePlayWnd;
     if (e.PropertyName == "VideoTime")
     {
         UpdataTime(wnd);
     }
     if (e.PropertyName == "VideoStatus")
     {
         UpdataStatus(wnd);
     }
 }
コード例 #5
0
        void ucSinglePlayWnd_PropertyChanged(object sender, PropertyChangedEventArgs e)
        {
            ucSinglePlayWnd wnd = sender as ucSinglePlayWnd;

            if (e.PropertyName == "VideoStatus")
            {
                SetButtonStatus();
            }
            if (e.PropertyName == "VideoStatusString")
            {
                SetPlayStatusText();
            }
        }
コード例 #6
0
        private void UpdataStatus(View.ucSinglePlayWnd wnd)
        {
            if (InvokeRequired)
            {
                this.Invoke(new Action <View.ucSinglePlayWnd>(UpdataStatus), wnd);
            }
            else
            {
                switch (wnd.VideoStatus)
                {
                case E_VDA_PLAY_STATUS.E_PLAY_STATUS_FINISH:
                case E_VDA_PLAY_STATUS.E_PLAY_STATUS_FAILED:
                    wnd.StopPlayBack();
                    break;

                default:
                    break;
                }
                labelX3.Text = wnd.VideoStatusString;
            }
        }
コード例 #7
0
        void ucSinglePlayWnd1_MouseClickEx(object sender, MouseEventArgs e)
        {
            View.ucSinglePlayWnd wnd = sender as View.ucSinglePlayWnd;

            wnd.PlayOrPauseOrResume();
        }