Пример #1
0
 private void button3_Click(object sender, EventArgs e)
 {
     Cnas.wns.CnasCameraUC.ControlCameraTools ControlCameraTools01 = new Cnas.wns.CnasCameraUC.ControlCameraTools();
     if (ControlCameraTools01.ShowDialog() == DialogResult.OK)
     {
         this.pictureBox1.Image = ControlCameraTools01.BitmapData;
     }
 }
Пример #2
0
 /// <summary>
 /// 拍照上传图片
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void but_scan_Click(object sender, EventArgs e)
 {
     isChangeImage = true;
     cameraTool    = new Cnas.wns.CnasCameraUC.ControlCameraTools();
     if (cameraTool.ShowDialog() == DialogResult.OK)
     {
         System.Drawing.Image aa = cameraTool.BitmapData.GetThumbnailImage(80, 85, null, IntPtr.Zero);
         pic_userimg.Image = aa;
         ImageCache    imageCache      = new ImageCache();
         CnasRemotCall reCnasRemotCall = new CnasRemotCall();
         string        guid            = reCnasRemotCall.RemotInterface.Get_SerialNumber(1);
         pictureName = string.Format("{0}.jpg", guid);
         imageCache.DeleteImageCache(userImageFolder, pictureName);
     }
 }