private void OnNavigating(object sender, WebBrowserNavigatingEventArgs e) { if (e.Url.ToString() == "about:blank") { return; } e.Cancel = true; var url = e.Url.ToString(); BrowserUtil.OpenUrl(url); }
private static void HandleException(Exception exception) { if (exception == null) { return; } SentryId eventId = default; SentrySdk.WithScope(scope => { scope.AddAttachment(AppConfigs.Configuration.FileLocation); eventId = SentrySdk.CaptureException(exception); } ); var exceptionMessage = exception.Message; if (exception.InnerException != null) { exceptionMessage += $"\n{exception.InnerException.Message}"; } var message = $@"It seems {Application.ProductName} has crashed. {exceptionMessage} Would you like to share more information with the developers?"; var result = MessageBox.Show(message, $@"{Application.ProductName} crashed...", MessageBoxButtons.YesNo, MessageBoxIcon.Error); if (result != DialogResult.Yes) { return; } using (new HourGlass()) { BrowserUtil.OpenUrl($"https://soundswitch.aaflalo.me/#sentry?eventId={eventId}"); } }
private void PopulateSettingsMenu() { var applicationDirectory = Path.GetDirectoryName(ApplicationPath.Executable); Debug.Assert(applicationDirectory != null, "applicationDirectory != null"); var readmeHtml = Path.Combine(applicationDirectory, "Readme.html"); _settingsMenu.Items.Add( Application.ProductName + ' ' + AssemblyUtils.GetReleaseState() + " (" + Application.ProductVersion + ")", SoundSwitchLogoIcon.ToBitmap()); _settingsMenu.Items.Add("-"); _settingsMenu.Items.Add(TrayIconStrings.playbackDevices, RessourcePlaybackDevicesBitmap, (sender, e) => { Process.Start(new ProcessStartInfo("control", "mmsys.cpl sounds")); }); _settingsMenu.Items.Add(TrayIconStrings.mixer, RessourceMixerBitmap, (sender, e) => { Process.Start(new ProcessStartInfo("sndvol.exe")); }); _settingsMenu.Items.Add("-"); _settingsMenu.Items.Add(_updateMenuItem); _settingsMenu.Items.Add(TrayIconStrings.settings, RessourceSettingsSmallBitmap, (sender, e) => ShowSettings()); _settingsMenu.Items.Add("-"); _settingsMenu.Items.Add(TrayIconStrings.help, RessourceInfoHelpBitmap, (sender, e) => { if (!File.Exists(readmeHtml)) { Log.Error("File {readme} doesn\'t exists", readmeHtml); return; } BrowserUtil.OpenUrl(readmeHtml); }); _settingsMenu.Items.Add(TrayIconStrings.communityMenu, ResourceDiscord.ToBitmap(), (sender, e) => { BrowserUtil.OpenUrl("https://discord.gg/gUCw3Ue"); }); _settingsMenu.Items.Add(TrayIconStrings.donate, ResourceDonateBitmap, (sender, e) => BrowserUtil.OpenUrl("https://soundswitch.aaflalo.me/?utm_source=application#donate")); _settingsMenu.Items.Add(TrayIconStrings.about, RessourceHelpSmallBitmap, (sender, e) => new About().Show()); _settingsMenu.Items.Add("-"); _settingsMenu.Items.Add(TrayIconStrings.exit, RessourceExitBitmap, (sender, e) => Application.Exit()); }
public void ShowInBrowser() { BrowserUtil.OpenUrl("https://hub.docker.com/_/" + Name); }
public void GivenIAmOnGoogleHomepage() { BrowserUtil.OpenUrl("https://google.com"); }
private void eretikLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { BrowserUtil.OpenUrl("http://eretik.omegahg.com"); }
private void logoCreatorLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { BrowserUtil.OpenUrl("https://github.com/linadesteem"); }
private void maintainerLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { BrowserUtil.OpenUrl("https://www.aaflalo.me"); }
private void linkLabel3_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { BrowserUtil.OpenUrl("http://www.liensberger.it/web/blog/?p=207"); }
private void linkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { BrowserUtil.OpenUrl("https://codefisher.org/pastel-svg/"); }
private void Version_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { BrowserUtil.OpenUrl("https://github.com/Belphemur/SoundSwitch/releases"); }
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { BrowserUtil.OpenUrl("http://jeroenpelgrims.be"); }