summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorJosip Medved <jmedved@jmedved.com>2015-12-31 19:26:38 -0800
committerJosip Medved <jmedved@jmedved.com>2015-12-31 19:26:38 -0800
commitc1c7670029bc449edbf86c491ff5f0d7e257678b (patch)
treea0ee0e8dc1141fb725653c14d91d3279a91e9bb4 /Source
parent72839e83e0c9883fdeb8bb5b9b3afd89f9c832e5 (diff)
downloadWrtSettings-c1c7670029bc449edbf86c491ff5f0d7e257678b.zip
WrtSettings-c1c7670029bc449edbf86c491ff5f0d7e257678b.tar.gz
WrtSettings-c1c7670029bc449edbf86c491ff5f0d7e257678b.tar.bz2
Updated service URLs.
Diffstat (limited to 'Source')
-rw-r--r--Source/WrtSettings/(Medo)/Upgrade [004].cs (renamed from Source/WrtSettings/(Medo)/Upgrade [003].cs)19
-rw-r--r--Source/WrtSettings/App.cs4
-rw-r--r--Source/WrtSettings/MainForm.Designer.cs10
-rw-r--r--Source/WrtSettings/MainForm.cs10
-rw-r--r--Source/WrtSettings/WrtSettings.csproj2
5 files changed, 16 insertions, 29 deletions
diff --git a/Source/WrtSettings/(Medo)/Upgrade [003].cs b/Source/WrtSettings/(Medo)/Upgrade [004].cs
index ae4e573..998bf93 100644
--- a/Source/WrtSettings/(Medo)/Upgrade [003].cs
+++ b/Source/WrtSettings/(Medo)/Upgrade [004].cs
@@ -1,8 +1,9 @@
-//Copyright (c) 2012 Josip Medved <jmedved@jmedved.com>
+//Josip Medved <jmedved@jmedved.com> www.medo64.com
//2012-03-05: Initial version.
//2012-03-13: UI adjustments.
//2013-12-28: Message box adjustments.
+//2015-12-31: Allowing for 301 redirect.
using System;
@@ -27,7 +28,7 @@ namespace Medo.Services {
/// <summary>
/// Returns upgrade file if there is one or null if there is no upgrade.
/// </summary>
- /// <param name="serviceUri">Service URI (e.g. http://jmedved.com/upgrade/).</param>
+ /// <param name="serviceUri">Service URI (e.g. https://medo64.com/upgrade/).</param>
/// <exception cref="System.ArgumentNullException">Argument cannot be null (serviceUri).</exception>
/// <exception cref="System.InvalidOperationException">Unexpected answer from upgrade server. -or- Cannot contact upgrade server.</exception>
public static UpgradeFile GetUpgradeFile(Uri serviceUri) {
@@ -37,7 +38,7 @@ namespace Medo.Services {
/// <summary>
/// Returns upgrade file if there is one or null if there is no upgrade.
/// </summary>
- /// <param name="serviceUri">Service URI (e.g. http://jmedved.com/upgrade/).</param>
+ /// <param name="serviceUri">Service URI (e.g. https://medo64.com/upgrade/).</param>
/// <param name="assembly">Assembly.</param>
/// <exception cref="System.ArgumentNullException">Argument cannot be null (serviceUri).</exception>
/// <exception cref="System.InvalidOperationException">Unexpected answer from upgrade server. -or- Cannot contact upgrade server.</exception>
@@ -62,7 +63,7 @@ namespace Medo.Services {
/// Shows Upgrade dialog.
/// </summary>
/// <param name="owner">Shows the form as a modal dialog box with the specified owner.</param>
- /// <param name="serviceUri">Service URI (e.g. http://jmedved.com/upgrade/).</param>
+ /// <param name="serviceUri">Service URI (e.g. https://medo64.com/upgrade/).</param>
/// <exception cref="System.ArgumentNullException">Argument cannot be null (serviceUri).</exception>
public static DialogResult ShowDialog(IWin32Window owner, Uri serviceUri) {
return ShowDialog(owner, serviceUri, Assembly.GetEntryAssembly());
@@ -72,7 +73,7 @@ namespace Medo.Services {
/// Shows Upgrade dialog.
/// </summary>
/// <param name="owner">Shows the form as a modal dialog box with the specified owner.</param>
- /// <param name="serviceUri">Service URI (e.g. http://jmedved.com/upgrade/).</param>
+ /// <param name="serviceUri">Service URI (e.g. https://medo64.com/upgrade/).</param>
/// <param name="assembly">Assembly.</param>
/// <exception cref="System.ArgumentNullException">Argument cannot be null (serviceUri).</exception>
public static DialogResult ShowDialog(IWin32Window owner, Uri serviceUri, Assembly assembly) {
@@ -102,7 +103,7 @@ namespace Medo.Services {
using (var response = (HttpWebResponse)request.GetResponse()) {
switch (response.StatusCode) {
case HttpStatusCode.Gone: return null; //no upgrade
- case HttpStatusCode.Forbidden: return null; //no upgrade (old code)
+ case HttpStatusCode.MovedPermanently: return GetUpgradeFileFromURL(response.Headers["Location"]); //follow 301 redirect
case HttpStatusCode.SeeOther: return new UpgradeFile(new Uri(response.Headers["Location"])); //upgrade at Location
default: throw new InvalidOperationException("Unexpected answer from upgrade server (" + response.StatusCode.ToString() + " " + response.StatusDescription + ").");
}
@@ -358,9 +359,9 @@ namespace Medo.Services {
internal static string Close { get { return GetInCurrentLanguage("Close", "Zatvori"); } }
internal static string Upgrade { get { return GetInCurrentLanguage("Upgrade", "Nadogradi"); } }
internal static string Download { get { return GetInCurrentLanguage("Download", "Preuzmi"); } }
- internal static string ErrorCannotCheck { get { return GetInCurrentLanguage("Cannot check for upgrade.", "Nije moguæe provjeriti nadogradnju."); } }
- internal static string ErrorCannotUpgrade { get { return GetInCurrentLanguage("Cannot upgrade.", "Nadogradnja nije moguæa."); } }
- internal static string ErrorCannotDownload { get { return GetInCurrentLanguage("Cannot download upgrade.", "Nije moguæe preuzeti nadogradnju."); } }
+ internal static string ErrorCannotCheck { get { return GetInCurrentLanguage("Cannot check for upgrade.", "Nije moguće provjeriti nadogradnju."); } }
+ internal static string ErrorCannotUpgrade { get { return GetInCurrentLanguage("Cannot upgrade.", "Nadogradnja nije moguća."); } }
+ internal static string ErrorCannotDownload { get { return GetInCurrentLanguage("Cannot download upgrade.", "Nije moguće preuzeti nadogradnju."); } }
internal static string StatusChecking { get { return GetInCurrentLanguage("Checking for upgrade...", "Provjera nadogradnje u tijeku..."); } }
internal static string StatusCancelling { get { return GetInCurrentLanguage("Cancelling...", "Odustajanje u tijeku..."); } }
internal static string StatusDownloading { get { return GetInCurrentLanguage("Download in progress...", "Preuzimanje u tijeku..."); } }
diff --git a/Source/WrtSettings/App.cs b/Source/WrtSettings/App.cs
index 21442bd..ce485b6 100644
--- a/Source/WrtSettings/App.cs
+++ b/Source/WrtSettings/App.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using System.Collections.Generic;
using System.Security.AccessControl;
using System.Security.Principal;
@@ -29,7 +29,7 @@ namespace WrtSettings {
private static void UnhandledCatch_ThreadException(object sender, ThreadExceptionEventArgs e) {
#if !DEBUG
- Medo.Diagnostics.ErrorReport.ShowDialog(null, e.Exception, new Uri("http://jmedved.com/feedback/"));
+ Medo.Diagnostics.ErrorReport.ShowDialog(null, e.Exception, new Uri("https://medo64.com/feedback/"));
#else
throw e.Exception;
#endif
diff --git a/Source/WrtSettings/MainForm.Designer.cs b/Source/WrtSettings/MainForm.Designer.cs
index e0f305f..817720f 100644
--- a/Source/WrtSettings/MainForm.Designer.cs
+++ b/Source/WrtSettings/MainForm.Designer.cs
@@ -34,7 +34,6 @@ namespace WrtSettings {
this.mnuApp = new System.Windows.Forms.ToolStripDropDownButton();
this.mnuAppFeedback = new System.Windows.Forms.ToolStripMenuItem();
this.mnuAppUpgrade = new System.Windows.Forms.ToolStripMenuItem();
- this.mnuAppDonate = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripSeparator();
this.mnuAppAbout = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
@@ -127,7 +126,6 @@ namespace WrtSettings {
this.mnuApp.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.mnuAppFeedback,
this.mnuAppUpgrade,
- this.mnuAppDonate,
this.toolStripMenuItem2,
this.mnuAppAbout});
this.mnuApp.Image = global::WrtSettings.Properties.Resources.mnuApp_16;
@@ -150,13 +148,6 @@ namespace WrtSettings {
this.mnuAppUpgrade.Text = "Check for &upgrade";
this.mnuAppUpgrade.Click += new System.EventHandler(this.mnuAppUpgrade_Click);
//
- // mnuAppDonate
- //
- this.mnuAppDonate.Name = "mnuAppDonate";
- this.mnuAppDonate.Size = new System.Drawing.Size(206, 26);
- this.mnuAppDonate.Text = "&Donate";
- this.mnuAppDonate.Click += new System.EventHandler(this.mnuAppDonate_Click);
- //
// toolStripMenuItem2
//
this.toolStripMenuItem2.Name = "toolStripMenuItem2";
@@ -264,7 +255,6 @@ namespace WrtSettings {
private System.Windows.Forms.ToolStripMenuItem mnuSaveAs;
private System.Windows.Forms.ToolStripMenuItem mnuAppFeedback;
private System.Windows.Forms.ToolStripMenuItem mnuAppUpgrade;
- private System.Windows.Forms.ToolStripMenuItem mnuAppDonate;
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem2;
private System.Windows.Forms.ToolStripMenuItem mnuAppAbout;
private System.Windows.Forms.DataGridView grid;
diff --git a/Source/WrtSettings/MainForm.cs b/Source/WrtSettings/MainForm.cs
index 584f54a..9d200bf 100644
--- a/Source/WrtSettings/MainForm.cs
+++ b/Source/WrtSettings/MainForm.cs
@@ -426,19 +426,15 @@ namespace WrtSettings {
private void mnuAppFeedback_Click(object sender, EventArgs e) {
- Medo.Diagnostics.ErrorReport.ShowDialog(this, null, new Uri("http://jmedved.com/feedback/"));
+ Medo.Diagnostics.ErrorReport.ShowDialog(this, null, new Uri("https://medo64.com/feedback/"));
}
private void mnuAppUpgrade_Click(object sender, EventArgs e) {
- Medo.Services.Upgrade.ShowDialog(this, new Uri("http://jmedved.com/upgrade/"));
- }
-
- private void mnuAppDonate_Click(object sender, EventArgs e) {
- Process.Start("http://www.jmedved.com/donate/");
+ Medo.Services.Upgrade.ShowDialog(this, new Uri("https://medo64.com/upgrade/"));
}
private void mnuAppAbout_Click(object sender, EventArgs e) {
- Medo.Windows.Forms.AboutBox.ShowDialog(this, new Uri("http://www.jmedved.com/asuswrtsettings/"));
+ Medo.Windows.Forms.AboutBox.ShowDialog(this, new Uri("https://www.medo64.com/wrtsettings/"));
}
#endregion
diff --git a/Source/WrtSettings/WrtSettings.csproj b/Source/WrtSettings/WrtSettings.csproj
index dca2601..5493dda 100644
--- a/Source/WrtSettings/WrtSettings.csproj
+++ b/Source/WrtSettings/WrtSettings.csproj
@@ -67,7 +67,7 @@
<Compile Include="%28Medo%29\Settings [013].cs" />
<Compile Include="%28Medo%29\State [015].cs" />
<Compile Include="%28Medo%29\UnhandledCatch [008].cs" />
- <Compile Include="%28Medo%29\Upgrade [003].cs" />
+ <Compile Include="%28Medo%29\Upgrade [004].cs" />
<Compile Include="Helper.cs" />
<Compile Include="MainForm.cs">
<SubType>Form</SubType>