Ejemplo n.º 1
0
 /// <summary>
 /// 初始化
 /// </summary>
 public void InitSDK()
 {
     if (!SDKCommon.InitSDK())
     {
         CommonalityEntity.WriteTextLog("硬盘录像机初始化失败!");
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 初始化
 /// </summary>
 public void InitSDK()
 {
     if (!SDKCommon.InitSDK())
     {
         MessageBox.Show("硬盘录像机初始化失败!");
     }
 }
Ejemplo n.º 3
0
    /// <summary>
    /// 获取当前时间长度为10的时间戳
    /// </summary>
    protected string GetCurrentTimeMiss()
    {
        var  currentTime = SDKCommon.GetCorrectDateTime();
        var  dateStart   = new System.DateTime(1970, 1, 1, 8, 0, 0);
        long timeStamp   = System.Convert.ToInt32((System.DateTime.Now - dateStart).TotalSeconds);

        return(timeStamp.ToString());
    }
Ejemplo n.º 4
0
        /// <summary>
        /// 登录硬盘录像机(默认)
        /// </summary>
        public void SetLogin()
        {
            string DVRIPAddress  = SystemClass.DVRIPAddress;
            short  DVRPortNumber = SystemClass.DVRPortNumber;
            string DVRUserName   = SystemClass.DVRUserName;
            string DVRPassword   = SystemClass.DVRPassword;

            m_lUserID = SDKCommon.SetLogin(DVRIPAddress, DVRPortNumber, DVRUserName, DVRPassword);
            if (m_lUserID != -1)
            {
                //DebugInfo("登录硬盘录像机成功!");
            }
            else
            {
                //DebugInfo("登录硬盘录像机失败!");
                return;
            }
        }
Ejemplo n.º 5
0
        /// <summary>
        /// 登录硬盘录像机(默认)
        /// </summary>
        public void SetLogin()
        {
            string DVRIPAddress  = Common.DVRIP;
            short  DVRPortNumber = short.Parse(Common.DVRServerPort);
            string DVRUserName   = Common.DVRLoginName;
            string DVRPassword   = Common.DVRPwd;

            m_lUserID = SDKCommon.SetLogin(DVRIPAddress, DVRPortNumber, DVRUserName, DVRPassword);
            if (m_lUserID != -1)
            {
                //DebugInfo("登录硬盘录像机成功!");
            }
            else
            {
                //DebugInfo("登录硬盘录像机失败!");
                return;
            }
        }
Ejemplo n.º 6
0
 public void CapturePic(int channel)
 {
     if (channel == 0)
     {
         return;
     }
     try
     {
         InitSDK();
         base.Hide();//
         SetLogin();
         string strDirectoryName = SystemClass.BaseFile + "Car" + SystemClass.PosistionValue + "\\";
         if (!Directory.Exists(strDirectoryName))
         {
             Directory.CreateDirectory(strDirectoryName);
         }
         string strfileImage = SDKCommon.CaptureJPEGPicture(strDirectoryName, SystemClass.PosistionValue, SystemClass.DrivewayValue, channel);
     }
     catch
     {
     }
 }
Ejemplo n.º 7
0
        public void CapturePic(int iQcInfoID)
        {
            InitSDK();
            base.Hide();//
            SetLogin();
            string strDirectoryName = Common.BaseFile + "weightPic\\";

            if (!Directory.Exists(strDirectoryName))
            {
                Directory.CreateDirectory(strDirectoryName);
            }
            string strfileImage = SDKCommon.CaptureJPEGPicture(strDirectoryName, iQcInfoID, Common.Channel);

            //上传图片
            List <string> list = new List <string>();

            //得到图片的路径
            string path = Common.BaseFile + "weightPic\\" + strfileImage;

            ImageFile.UpLoadFile(path, Common.SaveFiel); //上传图片到指定路径

            ImageFile.Delete(path);                      //上传完成后,删除图片
            //保存图片信息
        }