Exemplo n.º 1
0
 /// <summary>
 /// 开启页面
 /// </summary>
 /// <param name="browserHelperParam"></param>
 public virtual void Init(BrowserHelperParam browserHelperParam)
 {
     if (browserHelperParam.Container == null)
         browserHelperParam.Container = pContainer;
     _browserHelperParam = browserHelperParam;
     InitTimer();
 }
Exemplo n.º 2
0
 public BrowserHelper(BrowserHelperParam p)
 {
     Browser = new WebKitBrowser();
     Browser.Dock = DockStyle.Fill;
     Browser.Load += (o, e) =>
     {
         Browser.GetScriptManager.ScriptObject = p.ScriptObject;//必须在Add到父控件后GetScriptManager才不为空
     };
     p.Container.Controls.Add(Browser);
     Browser.Navigate(p.GetUrl());
 }