Put in a check for updates menu

This commit is contained in:
Lars Brubaker 2015-05-22 12:33:59 -07:00
parent 1f1ec9f701
commit 108dbee140
3 changed files with 76 additions and 27 deletions

View file

@ -20,8 +20,11 @@ namespace MatterHackers.MatterControl
{
{LocalizedString.Get("Getting Started"), gettingStarted_Click},
{LocalizedString.Get("View Help"), help_Click},
{LocalizedString.Get("Report a Bug"), bug_Click},
{LocalizedString.Get("Release Notes"), notes_Click},
{LocalizedString.Get("------------------------"), nothing_Click},
{LocalizedString.Get("Report a Bug"), bug_Click},
{LocalizedString.Get("Check For Update"), checkForUpdate_Click},
{LocalizedString.Get("------------------------"), nothing_Click},
{LocalizedString.Get("About MatterControl"), about_Click},
};
}
@ -44,6 +47,16 @@ namespace MatterHackers.MatterControl
return true;
}
private bool checkForUpdate_Click()
{
UiThread.RunOnIdle((state) =>
{
ApplicationMenuRow.AlwaysShowUpdateStatus = true;
UpdateControlData.Instance.CheckForUpdateUserRequested();
});
return true;
}
private bool about_Click()
{
UiThread.RunOnIdle((state) =>
@ -53,6 +66,11 @@ namespace MatterHackers.MatterControl
return true;
}
private bool nothing_Click()
{
return true;
}
private bool notes_Click()
{
UiThread.RunOnIdle((state) =>