Example #1
0
 private void cmdCheckUpdate_Click(object sender, System.EventArgs e)
 {
     //Check for latest version
     if (VersionHelper.CanConnect())
     {
         var lastest = VersionHelper.GetLatestVersion();
         if (VersionHelper.NeedUpdate(lastest))
         {
             MessageBox.Show("The version of nHydrate you are using is " + VersionHelper.GetCurrentVersion() + ". There is a newer version available " + lastest + ". Download the latest version from the Visual Studio 'Tools|Extensions and Updates' menu.", "New Version Available", MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
         else
         {
             MessageBox.Show("This is the latest version.", "Version Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
         VersionHelper.DidVersionCheck();
     }
     else
     {
         MessageBox.Show("There was an error trying to connect to the server.", "Error!", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }