private void Application_Startup(object sender, StartupEventArgs e) { Preferences.Init(); MainWindow window = new MainWindow(); window.Show(); if (Preferences.PromptWhenUpdatesAreAvailable == true) { Updates.CheckForUpdates(); } }
private void HelpCheckForUpdates_Click(object sender, RoutedEventArgs e) { string updates = Updates.CheckForUpdates(); switch (updates) { case "false": GetInput.ShowInfoDialog("ChromebookGUI Updater", "No updates available", "This product, ChromebookGUI by iamtheyammer, is up to date. You are running " + Software.Type + " " + Software.Version + "."); return; case "true": return; //case "error": // GetInput.ShowInfoDialog("ChromebookGUI Updater", "Error checking for updates.", "There was an error checking for updates."); // this should never happen! // return; } }
private void Application_Startup(object sender, StartupEventArgs e) { IDisposable sentry = SentrySdk.Init(o => { o.Dsn = new Dsn("https://[email protected]/1457501"); o.Release = Software.Version; if (Debug.IsDebugMode()) { o.Debug = true; } o.BeforeSend = ((arg) => { Console.WriteLine("Sending..."); return(arg); }); }); SentrySdk.ConfigureScope((scope) => { scope.SetTag("software-type", Software.Type); }); try { Preferences.Init(); Task.Run(() => AutoComplete.Init()); MainWindow window = new MainWindow(); window.Show(); if (Preferences.PromptWhenUpdatesAreAvailable == true) { Updates.CheckForUpdates(); } } catch (Exception err) { if (Debug.IsDebugMode() == true) { throw; } Debug.CaptureException(err); } }