public bool CreateImage() { WebRequest webRequest = WebRequest.Create(this.mLocation); AutoProxyClass ap = new AutoProxyClass(new Uri(this.mLocation)); // webRequest.Proxy = ap.TheAutoProxy; try { this.mPhotoImage = Bitmap.FromStream(webRequest.GetResponse().GetResponseStream()); } catch (Exception e) { throw new Exception(e.Message, e); } finally { ap = null; webRequest = null; } return true; }
public bool CreateImage() { WebRequest webRequest = WebRequest.Create(this.mLocation); AutoProxyClass ap = new AutoProxyClass(new Uri(this.mLocation)); // webRequest.Proxy = ap.TheAutoProxy; try { this.mPhotoImage = Bitmap.FromStream(webRequest.GetResponse().GetResponseStream()); } catch (Exception e) { throw new Exception(e.Message, e); } finally { ap = null; webRequest = null; } return(true); }