Skip to content

Commit

Permalink
Remove update check
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Minton committed Nov 20, 2013
1 parent 6a428d6 commit 4b242c1
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 50 deletions.
4 changes: 2 additions & 2 deletions Setup/setup.iss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "DataButler"
#define MyAppVersion "1.0.0.30"
#define MyAppVersion "1.0.0.31"
#define MyAppPublisher "Michael Minton"
#define MyAppURL "http://michaelminton.com"
#define MyAppExeName "DataButler.exe"
Expand All @@ -24,7 +24,7 @@ DefaultGroupName={#MyAppName}
AllowNoIcons=yes
LicenseFile=C:\Dev\DataButler\Resources\License.txt
OutputDir=C:\Dev\DataButler\Setup
OutputBaseFilename=DataButlerSetup1.0.0.30
OutputBaseFilename=DataButlerSetup1.0.0.31
SetupIconFile=C:\Dev\DataButler\Resources\DataButler.ico
Compression=lzma
SolidCompression=yes
Expand Down
22 changes: 0 additions & 22 deletions src/DataButler/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using System.IO;
using System.Linq;
using System.Windows.Forms;
using System.Xml.Linq;
using Microsoft.Win32;

namespace DataButler
Expand All @@ -16,7 +15,6 @@ static class Program
[STAThread]
static void Main()
{
UpdateCheck();
SetupRegistry();
if (DontRun()) return;

Expand All @@ -25,26 +23,6 @@ static void Main()
Application.Run(new Restore(Environment.GetCommandLineArgs()[1]));
}

static void UpdateCheck()
{
try
{
var latestVersionString = XDocument.Load("http://i1047/DataButler/DataButler.application").Descendants().ToArray()[1].Attribute("version").Value;
var latestVersion = Convert.ToInt16(latestVersionString.Replace(".", ""));
var installedVersion = Convert.ToInt16(Application.ProductVersion.Replace(".", ""));
var updateString = string.Format("An update to DataButler is ready. Update?{0}{0}Latest version: {1}{0}Installed version:{2}", Environment.NewLine, latestVersionString, Application.ProductVersion);
if (latestVersion > installedVersion && MessageBox.Show(updateString, "Updates", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
Process.Start("http://i1047/DataButler/publish.htm");
Application.Exit();
}
}
catch (Exception)
{
//Let them pass
}
}

static bool DontRun()
{
if (Environment.GetCommandLineArgs().Count() != 2) return true;
Expand Down
4 changes: 2 additions & 2 deletions src/DataButler/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.30")]
[assembly: AssemblyFileVersion("1.0.0.30")]
[assembly: AssemblyVersion("1.0.0.31")]
[assembly: AssemblyFileVersion("1.0.0.31")]
19 changes: 2 additions & 17 deletions src/DataButler/Restore.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 1 addition & 7 deletions src/DataButler/Restore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,11 @@ private void RestoreClicked(object sender, EventArgs e)
txtLog.Visible = true;
Cursor = Cursors.WaitCursor;
btnRestore.Enabled =
btnCancel.Enabled =
txtName.Enabled = false;
WaitImage.Visible = true;
_backgroundWorker.RunWorkerAsync(txtName.Text);
}

private void CancelClicked(object sender, EventArgs e)
{
Close();
}
private void BackgroundWorkerOnDoWork(object sender, DoWorkEventArgs doWorkEventArgs)
{
var restoreAs = doWorkEventArgs.Argument.ToString();
Expand All @@ -77,8 +72,7 @@ private void BackgroundWorkerOnRunWorkerCompleted(object sender, RunWorkerComple
txtLog.ForeColor = success ? Color.Black : Color.Yellow;
var message = success ? "Restore SUCCESSFULLY COMPLETE." : "Restore FAILED!";
LogMessage(message);
btnCancel.Enabled =
btnRestore.Enabled = true;
btnRestore.Enabled = true;
}

private void VersionLinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
Expand Down

0 comments on commit 4b242c1

Please sign in to comment.