Esempio n. 1
0
 private static void ShowSilAboutBox(XWebBrowser.BrowserType browserType, bool useFullVersionNumber)
 {
     XWebBrowser.DefaultBrowserType = browserType;
     using (var tempfile = TempFile.WithExtension("html"))
     {
         File.WriteAllText(tempfile.Path,
             @"<html><body><h3>Copyright 2014 <a href=""http://sil.org"">SIL International</a></h3>" +
             @"<p>Testing the <b>about box</b></p></body></html>");
         var uri = new Uri(tempfile.Path);
         using (var dlg = new SILAboutBox(uri.AbsoluteUri, useFullVersionNumber))
         {
             dlg.ShowDialog();
         }
     }
 }
Esempio n. 2
0
		public HtmlLabel()
		{
			InitializeComponent();

			if (this.DesignModeAtAll())
			{
				return;
			}

			LoadGeckoAssembly();
			_browser = new XWebBrowser();

			_browser.Parent = this;
			_browser.Dock = DockStyle.Fill;
			Controls.Add(_browser);
			_browser.IsWebBrowserContextMenuEnabled = false;
			_browser.Margin = new Padding(0);
		}
Esempio n. 3
0
		public WebThumbnailViewer()
		{
			CanLoad = false;
			ThumbBorderColor = Color.Wheat;
			ThumbBackgroundColor = Color.White;
			ThumbNailSize = 95;
			InitializeComponent();

			_browser = new XWebBrowser(XWebBrowser.BrowserType.GeckoFx);
			_browser.Dock = DockStyle.Fill;
			Controls.Add(_browser);
			_browser.Navigated += ((sender, args) =>
			{
				if (LoadComplete != null)
					LoadComplete(this, new EventArgs());
			});
			_browser.DomClick += OnDomClick;
		}