Exemple #1
0
 private void timer4_Tick(object sender, EventArgs e)
 {
     if (realplay1 != -1)
     {
         try
         {
             string PICName = "CHN1" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".bmp";
             bool   capOK   = DHSDK.CLIENT_CapturePicture(realplay1, filepath + PICName);
         }
         catch { }
     }
 }
Exemple #2
0
        private void DHDVRStart()
        {
            cbDisConnect = new fDisConnect(DataCallBack);
            bool initOK = DHSDK.CLIENT_Init(cbDisConnect, this.Handle);

            deviceInfo = new NET_DEVICEINFO();
            int error = 0;

            loginID = DHSDK.CLIENT_Login("192.168.1.20", 37777, "admin", "admin", out deviceInfo, out error);
            if (loginID != 0)
            {
                realplay1 = DHSDK.CLIENT_RealPlay(loginID, 0, Play1.Handle);
                realplay2 = DHSDK.CLIENT_RealPlay(loginID, 1, Play2.Handle);
            }
        }
Exemple #3
0
 private void btnVideo2_Click(object sender, EventArgs e)
 {
     if (realplay2 != -1)
     {
         if (videoing2 == false)
         {
             string filename2 = "CHN2" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".dav";
             DHSDK.CLIENT_SaveRealData(realplay2, filepath + filename2);
             videoing2       = true;
             timer3.Enabled  = true;
             btnVideo2.Image = imageList1.Images[1];
         }
         else
         {
             DHSDK.CLIENT_StopSaveRealData(realplay2);
             videoing2       = false;
             timer3.Enabled  = false;
             btnVideo2.Image = imageList1.Images[0];
         }
     }
 }