/// <summary> /// Dispose /// </summary> /// <param name="disposing"></param> public override void Dispose() { // Remove the webbrowser control try { _webBrowser.Dispose(); } catch { System.Diagnostics.Trace.WriteLine(new LogMessage("WebBrowser still in use.", String.Format("Dispose"))); } // Remove the temporary file we created try { _tempHtml.Dispose(); } catch (Exception ex) { Trace.WriteLine(new LogMessage("Dispose", String.Format("Unable to dispose TemporaryHtml with exception {0}", ex.Message))); } base.Dispose(); }
/// <summary> /// Dispose of this text item /// </summary> /// <param name="disposing"></param> public override void Dispose() { { // Remove the webbrowser control try { Dispatcher.BeginInvoke(DispatcherPriority.Normal, new ThreadStart(() => { MediaCanvas.Children.Remove(_webBrowser); _webBrowser.Dispose(); })); } catch { System.Diagnostics.Trace.WriteLine(new LogMessage("WebBrowser still in use.", String.Format("Dispose"))); } // Remove the temporary file we created try { _tempHtml.Dispose(); } catch (Exception ex) { Trace.WriteLine(new LogMessage("Dispose", String.Format("Unable to dispose TemporaryHtml with exception {0}", ex.Message))); } } base.Dispose(); }
public override void Dispose() { { try { _webBrowser.Dispose(); System.Diagnostics.Debug.WriteLine("Disposed of the Web Browser control", "Rss - Dispose"); } catch { System.Diagnostics.Debug.WriteLine("Web browser control already disposed", "Rss - Dispose"); } try { _wc.Dispose(); } catch { System.Diagnostics.Debug.WriteLine("Web Client control already disposed", "Rss - Dispose"); } // Remove the temporary file we created try { _tempHtml.Dispose(); } catch (Exception ex) { Trace.WriteLine(new LogMessage("Dispose", String.Format("Unable to dispose TemporaryHtml with exception {0}", ex.Message))); } } base.Dispose(); }