From 7708cef2be130baf8b05605db476d78665972542 Mon Sep 17 00:00:00 2001 From: larsbrubaker Date: Tue, 11 Feb 2014 12:07:51 -0800 Subject: [PATCH 1/2] pushing the redundant click function fix into master --- PrintLevelWizard.cs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/PrintLevelWizard.cs b/PrintLevelWizard.cs index e365350e7..18bf6924d 100644 --- a/PrintLevelWizard.cs +++ b/PrintLevelWizard.cs @@ -389,10 +389,6 @@ namespace MatterHackers.MatterControl { UiThread.RunOnIdle (DoDoneButton_Click); } - void DoDoneButton_Click(object state) - { - UiThread.RunOnIdle(DoDoneButton_Click); - } void DoDoneButton_Click(object state) { From a95c1c5b7ac1bb872f33c102124f25ff232e9947 Mon Sep 17 00:00:00 2001 From: Kevin Pope Date: Tue, 11 Feb 2014 17:27:50 -0800 Subject: [PATCH 2/2] Added initial HEAD request when downloading updates to determine download size. --- AboutPage.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/AboutPage.cs b/AboutPage.cs index 58d610968..927bf8747 100644 --- a/AboutPage.cs +++ b/AboutPage.cs @@ -227,6 +227,22 @@ namespace MatterHackers.MatterControl string downloadUri = string.Format("https://mattercontrol.appspot.com/downloads/development/{0}", ApplicationSettings.Instance.get("CurrentBuildToken")); string downloadToken = ApplicationSettings.Instance.get("CurrentBuildToken"); + //Make HEAD request to determine the size of the download (required by GAE) + System.Net.WebRequest request = System.Net.WebRequest.Create(downloadUri); + request.Method = "HEAD"; + + int downloadSize; + try + { + WebResponse response = request.GetResponse(); + downloadSize = (int)response.ContentLength; + } + catch + { + //Unknown download size + downloadSize = 0; + } + if (!System.IO.Directory.Exists(updateFileLocation)) { System.IO.Directory.CreateDirectory(updateFileLocation);