diff --git a/src/DeviceSettingsForm.Designer.cs b/src/DeviceSettingsForm.Designer.cs
index b000ae9..385e3cc 100644
--- a/src/DeviceSettingsForm.Designer.cs
+++ b/src/DeviceSettingsForm.Designer.cs
@@ -38,6 +38,7 @@
this.exp_KeyboardHookCheckBox = new System.Windows.Forms.CheckBox();
this.exp_KeyboardHookPriorityCheckBox = new System.Windows.Forms.CheckBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
+ this.checkForUpdatedCheckBox = new System.Windows.Forms.CheckBox();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.SuspendLayout();
@@ -45,6 +46,7 @@
// groupBox1
//
resources.ApplyResources(this.groupBox1, "groupBox1");
+ this.groupBox1.Controls.Add(this.checkForUpdatedCheckBox);
this.groupBox1.Controls.Add(this.systemTrayCheckBox);
this.groupBox1.Controls.Add(this.doubleClickComboBox);
this.groupBox1.Controls.Add(this.label1);
@@ -113,6 +115,12 @@
this.groupBox2.Name = "groupBox2";
this.groupBox2.TabStop = false;
//
+ // checkForUpdatedCheckBox
+ //
+ resources.ApplyResources(this.checkForUpdatedCheckBox, "checkForUpdatedCheckBox");
+ this.checkForUpdatedCheckBox.Name = "checkForUpdatedCheckBox";
+ this.checkForUpdatedCheckBox.UseVisualStyleBackColor = true;
+ //
// DeviceSettingsForm
//
this.AcceptButton = this.okButton;
@@ -146,5 +154,6 @@
private System.Windows.Forms.CheckBox exp_KeyboardHookCheckBox;
private System.Windows.Forms.CheckBox exp_KeyboardHookPriorityCheckBox;
private System.Windows.Forms.GroupBox groupBox2;
+ private System.Windows.Forms.CheckBox checkForUpdatedCheckBox;
}
}
\ No newline at end of file
diff --git a/src/DeviceSettingsForm.cs b/src/DeviceSettingsForm.cs
index 0d0f8ab..5bb67d6 100644
--- a/src/DeviceSettingsForm.cs
+++ b/src/DeviceSettingsForm.cs
@@ -40,6 +40,12 @@ namespace MeshCentralRouter
set { systemTrayCheckBox.Checked = value; }
}
+ public bool CheckForUpdates
+ {
+ get { return checkForUpdatedCheckBox.Checked; }
+ set { checkForUpdatedCheckBox.Checked = value; }
+ }
+
public bool Exp_KeyboardHook
{
get { return exp_KeyboardHookCheckBox.Checked; }
diff --git a/src/DeviceSettingsForm.resx b/src/DeviceSettingsForm.resx
index e7a5d88..79f1449 100644
--- a/src/DeviceSettingsForm.resx
+++ b/src/DeviceSettingsForm.resx
@@ -122,13 +122,43 @@
Top, Left, Right
+
+ True
+
+
+ NoControl
+
+
+
+ 14, 93
+
+
+ 113, 17
+
+
+ 3
+
+
+ Check for updates
+
+
+ checkForUpdatedCheckBox
+
+
+ System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ groupBox1
+
+
+ 0
+
True
NoControl
-
14, 70
@@ -151,7 +181,7 @@
groupBox1
- 0
+ 1
Add Map...
@@ -196,7 +226,7 @@
groupBox1
- 1
+ 2
True
@@ -223,13 +253,13 @@
groupBox1
- 2
+ 3
12, 12
- 294, 97
+ 294, 117
5
@@ -256,7 +286,7 @@
NoControl
- 150, 193
+ 150, 211
75, 23
@@ -286,7 +316,7 @@
NoControl
- 231, 193
+ 231, 211
75, 23
@@ -373,10 +403,10 @@
Top, Bottom, Left, Right
- 12, 115
+ 12, 135
- 294, 72
+ 294, 70
6
@@ -403,7 +433,7 @@
6, 13
- 318, 228
+ 318, 246
diff --git a/src/MainForm.cs b/src/MainForm.cs
index 8b3ce4c..3864878 100644
--- a/src/MainForm.cs
+++ b/src/MainForm.cs
@@ -49,7 +49,7 @@ namespace MeshCentralRouter
public bool forceExit = false;
public bool sendEmailToken = false;
public bool sendSMSToken = false;
- public bool allowUpdates = true;
+ public bool allowUpdates = Settings.GetRegValue("CheckForUpdates", true);
public Uri authLoginUrl = null;
public Process installProcess = null;
public string acceptableCertHash = null;
@@ -1566,10 +1566,14 @@ namespace MeshCentralRouter
SettingsForm f = new SettingsForm();
f.BindAllInterfaces = inaddrany;
f.ShowSystemTray = (notifyIcon.Visible == true);
+ f.CheckForUpdates = Settings.GetRegValue("CheckForUpdates", true);
if (f.ShowDialog(this) == DialogResult.OK)
{
inaddrany = f.BindAllInterfaces;
+ Settings.SetRegValue("CheckForUpdates", f.CheckForUpdates);
+ allowUpdates = f.CheckForUpdates;
+
if (f.ShowSystemTray)
{
notifyIcon.Visible = true;
@@ -2158,9 +2162,12 @@ namespace MeshCentralRouter
f.ShowSystemTray = (notifyIcon.Visible == true);
f.Exp_KeyboardHookPriority = Settings.GetRegValue("Exp_KeyboardHookPriority", false);
f.Exp_KeyboardHook = Settings.GetRegValue("Exp_KeyboardHook", false);
+ f.CheckForUpdates = Settings.GetRegValue("CheckForUpdates", true);
if (f.ShowDialog(this) == DialogResult.OK)
{
+ Settings.SetRegValue("CheckForUpdates", f.CheckForUpdates);
+ allowUpdates = f.CheckForUpdates;
deviceDoubleClickAction = f.deviceDoubleClickAction;
Settings.SetRegValue("DevDoubleClickClickAction", deviceDoubleClickAction.ToString());
Settings.SetRegValue("Exp_KeyboardHook", f.Exp_KeyboardHook.ToString().ToLower());
diff --git a/src/SettingsForm.Designer.cs b/src/SettingsForm.Designer.cs
index b99db08..2c61996 100644
--- a/src/SettingsForm.Designer.cs
+++ b/src/SettingsForm.Designer.cs
@@ -34,6 +34,7 @@
this.allInterfacesCheckBox = new System.Windows.Forms.CheckBox();
this.systemTrayCheckBox = new System.Windows.Forms.CheckBox();
this.groupBox1 = new System.Windows.Forms.GroupBox();
+ this.checkForUpdatedCheckBox = new System.Windows.Forms.CheckBox();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
@@ -67,11 +68,18 @@
// groupBox1
//
resources.ApplyResources(this.groupBox1, "groupBox1");
+ this.groupBox1.Controls.Add(this.checkForUpdatedCheckBox);
this.groupBox1.Controls.Add(this.systemTrayCheckBox);
this.groupBox1.Controls.Add(this.allInterfacesCheckBox);
this.groupBox1.Name = "groupBox1";
this.groupBox1.TabStop = false;
//
+ // checkForUpdatedCheckBox
+ //
+ resources.ApplyResources(this.checkForUpdatedCheckBox, "checkForUpdatedCheckBox");
+ this.checkForUpdatedCheckBox.Name = "checkForUpdatedCheckBox";
+ this.checkForUpdatedCheckBox.UseVisualStyleBackColor = true;
+ //
// SettingsForm
//
this.AcceptButton = this.okButton;
@@ -98,5 +106,6 @@
private System.Windows.Forms.CheckBox allInterfacesCheckBox;
private System.Windows.Forms.CheckBox systemTrayCheckBox;
private System.Windows.Forms.GroupBox groupBox1;
+ private System.Windows.Forms.CheckBox checkForUpdatedCheckBox;
}
}
\ No newline at end of file
diff --git a/src/SettingsForm.cs b/src/SettingsForm.cs
index f010b53..8446f04 100644
--- a/src/SettingsForm.cs
+++ b/src/SettingsForm.cs
@@ -38,6 +38,12 @@ namespace MeshCentralRouter
set { systemTrayCheckBox.Checked = value; }
}
+ public bool CheckForUpdates
+ {
+ get { return checkForUpdatedCheckBox.Checked; }
+ set { checkForUpdatedCheckBox.Checked = value; }
+ }
+
private void okButton_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.OK;
diff --git a/src/SettingsForm.resx b/src/SettingsForm.resx
index 10eef6e..ed2da3f 100644
--- a/src/SettingsForm.resx
+++ b/src/SettingsForm.resx
@@ -123,7 +123,7 @@
- 231, 92
+ 231, 113
75, 23
@@ -151,7 +151,7 @@
Bottom, Right
- 150, 92
+ 150, 113
75, 23
@@ -202,7 +202,7 @@
groupBox1
- 1
+ 2
True
@@ -232,16 +232,46 @@
groupBox1
- 0
+ 1
Top, Bottom, Left, Right
+
+ True
+
+
+ NoControl
+
+
+ 13, 68
+
+
+ 113, 17
+
+
+ 4
+
+
+ Check for updates
+
+
+ checkForUpdatedCheckBox
+
+
+ System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ groupBox1
+
+
+ 0
+
12, 12
- 294, 74
+ 294, 95
2
@@ -268,7 +298,7 @@
6, 13
- 318, 127
+ 318, 148
diff --git a/src/UpdateForm.Designer.cs b/src/UpdateForm.Designer.cs
index 9120e58..b63da9d 100644
--- a/src/UpdateForm.Designer.cs
+++ b/src/UpdateForm.Designer.cs
@@ -35,6 +35,7 @@
this.updateProgressBar = new System.Windows.Forms.ProgressBar();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.mainLabel = new System.Windows.Forms.Label();
+ this.checkForUpdatedCheckBox = new System.Windows.Forms.CheckBox();
this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
@@ -45,6 +46,7 @@
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.cancelButton.Name = "cancelButton";
this.cancelButton.UseVisualStyleBackColor = true;
+ this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
//
// okButton
//
@@ -79,12 +81,19 @@
resources.ApplyResources(this.mainLabel, "mainLabel");
this.mainLabel.Name = "mainLabel";
//
+ // checkForUpdatedCheckBox
+ //
+ resources.ApplyResources(this.checkForUpdatedCheckBox, "checkForUpdatedCheckBox");
+ this.checkForUpdatedCheckBox.Name = "checkForUpdatedCheckBox";
+ this.checkForUpdatedCheckBox.UseVisualStyleBackColor = true;
+ //
// UpdateForm
//
this.AcceptButton = this.okButton;
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.cancelButton;
+ this.Controls.Add(this.checkForUpdatedCheckBox);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.okButton);
this.Controls.Add(this.cancelButton);
@@ -95,6 +104,7 @@
this.groupBox1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false);
+ this.PerformLayout();
}
@@ -106,5 +116,6 @@
private System.Windows.Forms.Label mainLabel;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.ProgressBar updateProgressBar;
+ private System.Windows.Forms.CheckBox checkForUpdatedCheckBox;
}
}
\ No newline at end of file
diff --git a/src/UpdateForm.cs b/src/UpdateForm.cs
index cbfa04b..5629b8c 100644
--- a/src/UpdateForm.cs
+++ b/src/UpdateForm.cs
@@ -53,10 +53,13 @@ namespace MeshCentralRouter
if (lines[5] != "") { mainLabel.Text = lines[5]; }
}
catch (Exception) { }
+
+ checkForUpdatedCheckBox.Checked = Settings.GetRegValue("CheckForUpdates", true);
}
private void okButton_Click(object sender, EventArgs e)
{
+ Settings.SetRegValue("CheckForUpdates", checkForUpdatedCheckBox.Checked);
DownloadUpdate();
}
@@ -165,5 +168,9 @@ namespace MeshCentralRouter
return Result.ToString();
}
+ private void cancelButton_Click(object sender, EventArgs e)
+ {
+ Settings.SetRegValue("CheckForUpdates", checkForUpdatedCheckBox.Checked);
+ }
}
}
diff --git a/src/UpdateForm.resx b/src/UpdateForm.resx
index a09beee..802703f 100644
--- a/src/UpdateForm.resx
+++ b/src/UpdateForm.resx
@@ -145,7 +145,7 @@
$this
- 2
+ 3
Bottom, Right
@@ -172,7 +172,7 @@
$this
- 1
+ 2
Top, Bottom, Left, Right
@@ -283,6 +283,39 @@
$this
+ 1
+
+
+ Bottom, Left
+
+
+ True
+
+
+ NoControl
+
+
+ 12, 161
+
+
+ 171, 17
+
+
+ 4
+
+
+ Continue checking for updates
+
+
+ checkForUpdatedCheckBox
+
+
+ System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ $this
+
+
0