Exemplo n.º 1
0
 /// <summary>
 /// 为WebBrowser所开线程的启动入口函数,相当于Winform里面的Main()
 /// </summary>
 /// <param name="_wp"></param>
 private static void StaRun(object _wp)
 {
     WebPreview2 wp = (WebPreview2)_wp;
     try
     {
        // WebPreviewBase wpb = new WebPreviewBase(wp._uri,wp._width,wp._height,wp._fullPage);
         WebPreviewBase wpb = new WebPreviewBase(wp._uri,wp._fullPage);
         wp._bitmap = wpb.GetWebPreview();
     }
     catch (Exception ex)
     {
         wp._ex = ex;
     }
 }
Exemplo n.º 2
0
 public static Bitmap GetWebPreview(Uri uri, int timeout, int width, int height, bool fullPage)
 {
     WebPreview2 wp = new WebPreview2(uri,timeout,width,height,fullPage);
     return wp.GetWebPreview();
 }
Exemplo n.º 3
0
 public static Bitmap GetWebPreview(Uri uri)
 {
     WebPreview2 wp = new WebPreview2(uri);
     
     return wp.GetWebPreview();
 }