# HG changeset patch
# User sl
# Date 1421488650 -3600
# Node ID aa157e129c420d482a96d2dfddd27a3bc353c433
# Parent 0e8c077d63bf7b0f2878da0c94074125aa7da6b7
Update checks now gives notification when the application is already up-to-date.
Adding version number to main form text.
diff -r 0e8c077d63bf -r aa157e129c42 Server/MainForm.cs
--- a/Server/MainForm.cs Fri Jan 16 09:50:19 2015 +0100
+++ b/Server/MainForm.cs Sat Jan 17 10:57:30 2015 +0100
@@ -74,6 +74,15 @@
private void MainForm_Load(object sender, EventArgs e)
{
+ if (ApplicationDeployment.IsNetworkDeployed)
+ {
+ this.Text += " - v" + ApplicationDeployment.CurrentDeployment.CurrentVersion;
+ }
+ else
+ {
+ this.Text += " - development";
+ }
+
StartServer();
if (Properties.Settings.Default.DisplayConnectOnStartup)
@@ -1353,43 +1362,47 @@
return;
}
- if (info.UpdateAvailable)
- {
- Boolean doUpdate = true;
+ if (info.UpdateAvailable)
+ {
+ Boolean doUpdate = true;
- if (!info.IsUpdateRequired)
- {
- DialogResult dr = MessageBox.Show("An update is available. Would you like to update the application now?", "Update Available", MessageBoxButtons.OKCancel);
- if (!(DialogResult.OK == dr))
- {
- doUpdate = false;
- }
- }
- else
- {
- // Display a message that the app MUST reboot. Display the minimum required version.
- MessageBox.Show("This application has detected a mandatory update from your current " +
- "version to version " + info.MinimumRequiredVersion.ToString() +
- ". The application will now install the update and restart.",
- "Update Available", MessageBoxButtons.OK,
- MessageBoxIcon.Information);
- }
+ if (!info.IsUpdateRequired)
+ {
+ DialogResult dr = MessageBox.Show("An update is available. Would you like to update the application now?", "Update Available", MessageBoxButtons.OKCancel);
+ if (!(DialogResult.OK == dr))
+ {
+ doUpdate = false;
+ }
+ }
+ else
+ {
+ // Display a message that the app MUST reboot. Display the minimum required version.
+ MessageBox.Show("This application has detected a mandatory update from your current " +
+ "version to version " + info.MinimumRequiredVersion.ToString() +
+ ". The application will now install the update and restart.",
+ "Update Available", MessageBoxButtons.OK,
+ MessageBoxIcon.Information);
+ }
- if (doUpdate)
- {
- try
- {
- ad.Update();
- MessageBox.Show("The application has been upgraded, and will now restart.");
- Application.Restart();
- }
- catch (DeploymentDownloadException dde)
- {
- MessageBox.Show("Cannot install the latest version of the application. \n\nPlease check your network connection, or try again later. Error: " + dde);
- return;
- }
- }
- }
+ if (doUpdate)
+ {
+ try
+ {
+ ad.Update();
+ MessageBox.Show("The application has been upgraded, and will now restart.");
+ Application.Restart();
+ }
+ catch (DeploymentDownloadException dde)
+ {
+ MessageBox.Show("Cannot install the latest version of the application. \n\nPlease check your network connection, or try again later. Error: " + dde);
+ return;
+ }
+ }
+ }
+ else
+ {
+ MessageBox.Show("You are already running the latest version.", "Application up-to-date");
+ }
}
}
}
diff -r 0e8c077d63bf -r aa157e129c42 Server/SharpDisplayManager.csproj
--- a/Server/SharpDisplayManager.csproj Fri Jan 16 09:50:19 2015 +0100
+++ b/Server/SharpDisplayManager.csproj Sat Jan 17 10:57:30 2015 +0100
@@ -30,7 +30,7 @@
true
index.htm
false
- 12
+ 14
0.1.0.%2a
false
true