Exemplo n.º 1
0
        /// <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();
        }
Exemplo n.º 2
0
Arquivo: Text.cs Projeto: afrog33k/eAd
        /// <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();
        }
Exemplo n.º 3
0
        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();
        }