Пример #1
0
 /// <summary>
 /// 保存图片
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void camera1_ImageCaptured(object sender, BinaryResultArgs e)
 {
     if (string.IsNullOrEmpty(e.error))
     {
         if (imgL.ResourceID.Trim().Length > 0)
         {
             e.SaveFile(imgL.ResourceID); //保存图片文件到本地运行项目的image文件夹中
             imgL.Refresh();              //当图片上传文件名相同时,刷新界面图片内容
         }
         else
         {
             e.SaveFile(e.ResourceID);//保存图片文件到本地运行项目的image文件夹中
             imgL.ResourceID = e.ResourceID;
         }
     }
 }
Пример #2
0
 private void camera1_ImageCaptured(object sender, BinaryResultArgs e)
 {
     if (!e.isError)
     {
         e.SaveFile(e.ResourceID, "./Resources/Image");
         image1.ResourceID = e.ResourceID;
     }
 }
Пример #3
0
 /// <summary>
 /// 保存并赋值头像
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void cameraPortrait_ImageCaptured(object sender, BinaryResultArgs e)
 {
     if (string.IsNullOrEmpty(e.error))
     {
         if (imgPortrait.ResourceID.Trim().Length > 0 & string.IsNullOrEmpty(department.IMAGEID) == false)
         {
             e.SaveFile(department.IMAGEID + ".png");
             imgPortrait.ResourceID = department.IMAGEID;
             imgPortrait.Refresh();
         }
         else
         {
             e.SaveFile(e.ResourceID + ".png");
             department.IMAGEID     = e.ResourceID;
             imgPortrait.ResourceID = e.ResourceID;
             imgPortrait.Refresh();
         }
     }
 }
 /// <summary>
 /// 保存并赋值头像
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void cameraPortrait_ImageCaptured(object sender, BinaryResultArgs e)
 {
     if (string.IsNullOrEmpty(e.error))
     {
         if (imgPortrait.ResourceID.Trim().Length > 0 & string.IsNullOrEmpty(D_Portrait) == false)
         {
             e.SaveFile(D_Portrait);
             imgPortrait.ResourceID = D_Portrait;
             imgPortrait.Refresh();
         }
         else
         {
             e.SaveFile(e.ResourceID);
             D_Portrait             = e.ResourceID;
             imgPortrait.ResourceID = e.ResourceID;
             imgPortrait.Refresh();
         }
     }
 }
Пример #5
0
 private void camera1_ImageCaptured(object sender, BinaryResultArgs e)
 {
     if (e.isError == true)
     {
         MessageBox.Show("错误:" + e.error);
     }
     else
     {
         e.SaveFile();
         AddTagPageControl(e.ResourceID, e.Data.Length, false);
     }
 }
Пример #6
0
 /// <summary>
 /// 图片获取到后
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void CamPicture_ImageCaptured(object sender, BinaryResultArgs e)
 {
     try
     {
         if (string.IsNullOrEmpty(e.error))
         {
             e.SaveFile(UserId + DateTime.Now.ToString("yyyyMMddHHmmss") + ".png");
             ImgPicture.ResourceID = UserId + DateTime.Now.ToString("yyyyMMddHHmmss");
             ImgPicture.Refresh();
         }
     }
     catch (Exception ex)
     {
         Toast(ex.Message);
     }
 }
Пример #7
0
 /// <summary>
 /// 图片捕获事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void Camera1_ImageCaptured(object sender, BinaryResultArgs e)
 {
     try
     {
         if (String.IsNullOrEmpty(e.error))
         {
             e.SaveFile(UserID + ".png"); //保存图片文件到服务器
             imgUser.ResourceID = UserID;
             imgUser.Refresh();           //刷新当前显示界面
             UpdateUserInfo(EuserInfo.修改头像, imgUser.ResourceID);
         }
     }
     catch (Exception ex)
     {
         Toast(ex.Message);
     }
 }
Пример #8
0
        private void voiceRecorder1_RecordedAudio(object sender, BinaryResultArgs e)
        {
            try
            {
                this.Client.ShowOfflineResources();     // 显示离线资源页

                if (string.IsNullOrEmpty(e.error))
                {
                    e.SaveFile();
                    //保存到本地运行项目的文件夹中
                }
            }
            catch (Exception ex)
            {
                Toast(ex.Message);
            }
        }
Пример #9
0
 /// <summary>
 /// 修改用户头像
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void cameraPortrait_ImageCaptured(object sender, BinaryResultArgs e)
 {
     if (e.isError == false)
     {
         UserInputDto upuser = new UserInputDto();
         upuser.U_ID       = Client.Session["U_ID"].ToString();
         upuser.U_Portrait = e.ResourceID;
         ReturnInfo result = AutofacConfig.userService.UpdateUser(upuser);
         if (result.IsSuccess == false)
         {
             Toast(result.ErrorInfo, ToastLength.SHORT);
         }
         else
         {
             e.SaveFile(e.ResourceID + ".png");
             imgPortrait.ResourceID = e.ResourceID;
             imgPortrait.Refresh();
         }
     }
 }
Пример #10
0
 private void signatureView1_OnSignatureImageSave(object sender, BinaryResultArgs e)
 {
     e.SaveFile();
     image1.ResourcePath = MobileResourceManager.DefaultUploadPath;
     image1.ResourceID   = e.ResourceID;
 }