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;
        }
示例#2
0
        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);
        }