|
/*
* FileName: BrowserPreviewHandlerHost.cs
* Author: Alexei Bouravtsev
* Profiles: http://www.linkedin.com/pub/alexei-bouravtsev/13/201/293
* http://aleksey-buravtsev.moikrug.ru/
*/
using System.Linq;
using System.Windows.Forms;
namespace PreviewHandlers
{
public class BrowserPreviewHandlerHost : PreviewHandlerHostBase
{
private WebBrowser _browser;
private WebBrowser WebBrowser
{
get
{
if (_browser == null)
{
_browser = new WebBrowser();
_browser.Dock = DockStyle.Fill;
_browser.Name = "webbrowser";
_browser.ScrollBarsEnabled = true;
}
return _browser;
}
}
public override bool Open(string fileName)
{
WebBrowser.Navigate(fileName, false);
if (!Controls.Find("webbrowser", true).Any())
Controls.Add(WebBrowser);
return true;
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I'm a Russian (Moscow Aviational Institute 1996-2002) Software Engineer living in Moscow, Russia. I have a long experience in Windows programming and have been developing large GUI, Real Time Enterprise Client/Server C# applications and SQL Server/Oracle databases.
My point of interests is high load enterprise applications.