Skip to content

Commit

Permalink
Make the update menu button gray if there are no updates
Browse files Browse the repository at this point in the history
  • Loading branch information
ManlyMarco committed Jan 21, 2020
1 parent ebaad3a commit 991298b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions KKManager/Windows/MainWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,7 @@ private void ShowModUpdateDialog()
window.ReloadList();

updateSideloaderModpackToolStripMenuItem.BackColor = DefaultBackColor;
updateSideloaderModpackToolStripMenuItem.ForeColor = DefaultForeColor;
}

private readonly CancellationTokenSource _checkForUpdatesCancel = new CancellationTokenSource();
Expand All @@ -436,6 +437,11 @@ private async void MainWindow_Shown(object sender, EventArgs e)
SetStatusText($"Found {updates} mod updates!");
updateSideloaderModpackToolStripMenuItem.BackColor = Color.Lime;
}
else
{
SetStatusText("No mod updates were found");
updateSideloaderModpackToolStripMenuItem.ForeColor = Color.Gray;
}
}
catch (OperationCanceledException) { }
catch (Exception ex) { Console.WriteLine(ex); }
Expand Down

0 comments on commit 991298b

Please sign in to comment.