private void UpdateCheckCompleted(object sender, RunWorkerCompletedEventArgs e) { if (e.Cancelled || e.Error != null) { return; } var updateInfo = (UpdateInfo)e.Result; if (Updater.UpdateAvailable(updateInfo)) { MetroUpdateDialog.Show(updateInfo, true); } }
public static async Task BeginUpdateProcess() { var info = await GetBranchInfo(); // If the request failed, tell the user to gtfo if (info == null) { App.AssemblyStorage.AssemblySettings.HomeWindow.Dispatcher.Invoke(new Action( () => MetroMessageBox.Show("Update Check Failed", "Assembly is unable to check for updates at this time. Sorry :("))); return; } App.AssemblyStorage.AssemblySettings.HomeWindow.Dispatcher.Invoke( new Action(() => MetroUpdateDialog.Show(info, UpdateAvailable(info)))); }
public static void BeginUpdateProcess() { // Grab JSON Update package from the server UpdateInfo info = Updates.GetUpdateInfo(); // If the request failed, tell the user to gtfo if (info == null || !info.Successful) { App.MetroIdeStorage.MetroIdeSettings.HomeWindow.Dispatcher.Invoke(new Action( () => MetroMessageBox.Show("Update Check Failed", "MetroIde is unable to check for updates at this time. Sorry :("))); return; } App.MetroIdeStorage.MetroIdeSettings.HomeWindow.Dispatcher.Invoke( new Action(() => MetroUpdateDialog.Show(info, UpdateAvailable(info)))); }
private async Task CheckForUpdates() { // Grab JSON Update package from the server try { var result = await Updater.GetBranchInfo(); if (result == null) { return; } if (Updater.UpdateAvailable(result)) { MetroUpdateDialog.Show(result, true); } } catch { } }