private void About_Click(object sender, EventArgs e) { using (var dlg = new SILAboutBox(FileLocator.GetFileDistributedWithApplication("aboutbox.htm"))) { dlg.ShowDialog(this); } }
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(); } } }