Ejemplo n.º 1
0
        public override bool Control(ControlMode mode)
        {
            switch (mode)
            {
            case ControlMode.AutoFocus:
                return(CHCNetSDK.NET_DVR_FocusOnePush(userId, irCameraChannel));

            case ControlMode.FocusFar:
                if (!CHCNetSDK.NET_DVR_PTZControl_Other(userId, irCameraChannel, CHCNetSDK.FOCUS_FAR, 0))
                {
                    return(false);
                }

                Thread.Sleep(1000);
                return(CHCNetSDK.NET_DVR_PTZControl_Other(userId, irCameraChannel, CHCNetSDK.FOCUS_FAR, 1));

            case ControlMode.FocusNear:
                if (!CHCNetSDK.NET_DVR_PTZControl_Other(userId, irCameraChannel, CHCNetSDK.FOCUS_NEAR, 0))
                {
                    return(false);
                }

                Thread.Sleep(1000);
                return(CHCNetSDK.NET_DVR_PTZControl_Other(userId, irCameraChannel, CHCNetSDK.FOCUS_NEAR, 1));

            default:
                return(false);
            }
        }
Ejemplo n.º 2
0
 private void focus_help_btn_Click(object sender, EventArgs e)
 {
     bool result = CHCNetSDK.NET_DVR_FocusOnePush(m_lRealHandle, 1);
 }