Пример #1
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
     {
     }
 }
Пример #2
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);                      //上传完成后,删除图片
            //保存图片信息
        }