コード例 #1
0
ファイル: IETabPage.cs プロジェクト: visi/ipmessagernet
 /// <summary>
 /// 反绑定主机时候调用
 /// </summary>
 public void RemoveHost()
 {
     Host.AbsenceModeChanged    -= host_AbsenceModeChanged;
     Host.NickNameChanged       -= host_NickNameChanged;
     Host.AbsenceMessageChanged -= host_AbsenceMessageChanged;
     browser.Dispose();
 }
コード例 #2
0
ファイル: BrowserPage.xaml.cs プロジェクト: netcharm/PixivWPF
 private void DeleteHtmlRender()
 {
     try
     {
         if (webHtml is WebBrowserEx)
         {
             webHtml.DocumentCompleted -= new System.Windows.Forms.WebBrowserDocumentCompletedEventHandler(WebBrowser_DocumentCompleted);
             webHtml.Navigating        -= new System.Windows.Forms.WebBrowserNavigatingEventHandler(WebBrowser_Navigating);
             webHtml.ProgressChanged   -= new System.Windows.Forms.WebBrowserProgressChangedEventHandler(WebBrowser_ProgressChanged);
             webHtml.PreviewKeyDown    -= new System.Windows.Forms.PreviewKeyDownEventHandler(WebBrowser_PreviewKeyDown);
             webHtml.Dispose(true);
         }
     }
     catch (Exception ex) { ex.ERROR("DeleteHtmlRender"); }
     try
     {
         if (webHost is WindowsFormsHostEx)
         {
             webHost.Dispose();
         }
     }
     catch (Exception ex) { ex.ERROR("DeleteHtmlRender"); }
 }