private void StartIEByProcess(string url, IUIService uiService) { bool flag = false; try { this.helpProcess = new Process { StartInfo = new ProcessStartInfo("iexplore.exe", this.IsIE8OrNewer() ? " -new -nomerge " : " -new ") }; if (this.helpProcess.Start()) { this.helpProcess.WaitForInputIdle(2000); flag = true; } } catch (InvalidOperationException) { } catch (Win32Exception) { } if (!flag) { try { WinformsHelper.OpenUrl(new Uri(url)); } catch (UrlHandlerNotFoundException ex) { uiService.ShowError(ex.Message); } } }
private void OpenURL(string url) { try { WinformsHelper.OpenUrl(new Uri(url)); } catch (UrlHandlerNotFoundException ex) { base.ShowError(ex.Message); } }
private void contentLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { string text = e.Link.LinkData as string; if (!string.IsNullOrEmpty(text)) { try { WinformsHelper.OpenUrl(new Uri(text)); } catch (UrlHandlerNotFoundException ex) { base.ShowError(ex.Message); } catch (UriFormatException) { } } }