public void PTZ(PTZAction action)
 {
     DecoderControl((int)action);
 }
Exemple #2
0
 public static extern int OpenSDK_PTZCtrlEx(IntPtr intptrSessionID, IntPtr intptrDevSerial, int intChannel, PTZCommand enCommand, PTZAction enAction, int iSpeed);
 public void PTZ(PTZAction action)
 {
     DecoderControl((int)action);
 }
 [DllImport(@"OpenNetStream.dll")]//SDK云台控制
 public static extern int OpenSDK_PTZCtrl(IntPtr szSessionId, string szAccessToken, string szCameraId, PTZCommand enCommand, PTZAction enAction, int iSpeed, IntPtr pNSCBMsg);
Exemple #5
0
 public void PTZ(PTZAction action, bool once = false)
 {
     DecoderControl((int)action, once);
 }
Exemple #6
0
 public void PTZ(PTZAction action)
 {
     // Note:  for the phone, OneStep seems better.
     DecoderControl((int)action, true);
 }
Exemple #7
0
        private void PTZToolStripButton_Click(object sender, EventArgs e)
        {
            ToolStripButton tb = sender as ToolStripButton;

            if (this.PlugIn == null || tb == null)
            {
                return;
            }
            PTZControlItem pi = tb.Tag as PTZControlItem;

            if (pi == null)
            {
                return;
            }
            PTZAction pa = null;
            int       v  = 1;

            switch (pi.Group)
            {
            case PTZControlItemGroup.P:
                pa = this.PlugIn.P;
                v  = (int)(pi.Direction);
                if (this.Mirror)
                {
                    v = 0 - v;
                }
                break;

            case PTZControlItemGroup.T:
                pa = this.PlugIn.T;
                v  = (int)(pi.Direction);
                if (this.Flip)
                {
                    v = 0 - v;
                }
                break;

            case PTZControlItemGroup.Z:
                pa = this.PlugIn.Z;
                v  = (int)(pi.Direction);
                break;

            default:
                v = 1;
                break;
            }
            if (pa == null)
            {
                return;
            }
            this.mParent.Cursor = Cursors.WaitCursor;
            switch (pi.Move)
            {
            case PTZControlItemMoveAction.STEP:
                pa.Step(v);
                break;

            case PTZControlItemMoveAction.NEXT:
                pa.Next(v);
                break;
            }
            this.mParent.Cursor = Cursors.Default;
        }