CP-13083: Add user setting and checkbox to the Health Check overview dialog saying "Show this when connecting to servers that are not enrolled into Health Check"

Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
This commit is contained in:
Mihaela Stoica 2015-07-24 14:12:46 +01:00
parent 9835f5a83f
commit c1dac478b1
8 changed files with 131 additions and 35 deletions

View File

@ -30,6 +30,7 @@ namespace XenAdmin.Dialogs.CallHome
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CallHomeOverviewDialog));
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.poolsDataGridView = new XenAdmin.Controls.DataGridViewEx.DataGridViewEx();
@ -61,6 +62,8 @@ namespace XenAdmin.Dialogs.CallHome
this.policyStatementLabel = new System.Windows.Forms.Label();
this.PolicyStatementLinkLabel = new System.Windows.Forms.LinkLabel();
this.rubricLabel = new System.Windows.Forms.Label();
this.showAgainCheckBox = new System.Windows.Forms.CheckBox();
this.toolTip = new System.Windows.Forms.ToolTip(this.components);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
@ -271,8 +274,8 @@ namespace XenAdmin.Dialogs.CallHome
//
resources.ApplyResources(this.tableLayoutPanel1, "tableLayoutPanel1");
this.tableLayoutPanel1.Controls.Add(this.flowLayoutPanel2, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.rubricLabel, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.splitContainer1, 0, 2);
this.tableLayoutPanel1.Controls.Add(this.rubricLabel, 0, 0);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
//
// flowLayoutPanel2
@ -298,12 +301,21 @@ namespace XenAdmin.Dialogs.CallHome
resources.ApplyResources(this.rubricLabel, "rubricLabel");
this.rubricLabel.Name = "rubricLabel";
//
// showAgainCheckBox
//
resources.ApplyResources(this.showAgainCheckBox, "showAgainCheckBox");
this.showAgainCheckBox.Name = "showAgainCheckBox";
this.toolTip.SetToolTip(this.showAgainCheckBox, resources.GetString("showAgainCheckBox.ToolTip"));
this.showAgainCheckBox.UseVisualStyleBackColor = true;
this.showAgainCheckBox.CheckedChanged += new System.EventHandler(this.showAgainCheckBox_CheckedChanged);
//
// CallHomeOverviewDialog
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.CancelButton = this.buttonCancel;
this.Controls.Add(this.tableLayoutPanel1);
this.Controls.Add(this.showAgainCheckBox);
this.Controls.Add(this.buttonCancel);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Sizable;
this.Name = "CallHomeOverviewDialog";
@ -329,6 +341,7 @@ namespace XenAdmin.Dialogs.CallHome
this.flowLayoutPanel2.ResumeLayout(false);
this.flowLayoutPanel2.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
@ -364,6 +377,8 @@ namespace XenAdmin.Dialogs.CallHome
private System.Windows.Forms.Label policyStatementLabel;
private System.Windows.Forms.LinkLabel PolicyStatementLinkLabel;
private System.Windows.Forms.LinkLabel uploadRequestLinkLabel;
private System.Windows.Forms.CheckBox showAgainCheckBox;
private System.Windows.Forms.ToolTip toolTip;
}
}

View File

@ -32,7 +32,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
using System.Windows.Forms;
using XenAdmin.Actions;
@ -243,6 +242,7 @@ namespace XenAdmin.Dialogs.CallHome
{
xenConnection.Cache.RegisterBatchCollectionChanged<Pool>(Pool_BatchCollectionChanged);
}
showAgainCheckBox.Checked = Properties.Settings.Default.ShowHealthCheckEnrollmentReminder;
}
private void dataGridView1_SelectionChanged(object sender, EventArgs e)
@ -317,5 +317,14 @@ namespace XenAdmin.Dialogs.CallHome
new SaveCallHomeSettingsAction(poolRow.Pool, callHomeSettings, token, user, password, false).RunAsync();
}
}
private void showAgainCheckBox_CheckedChanged(object sender, EventArgs e)
{
if (Properties.Settings.Default.ShowHealthCheckEnrollmentReminder != showAgainCheckBox.Checked)
{
Properties.Settings.Default.ShowHealthCheckEnrollmentReminder = showAgainCheckBox.Checked;
Settings.TrySaveSettings();
}
}
}
}

View File

@ -154,7 +154,7 @@
<value>0, 0</value>
</data>
<data name="poolsDataGridView.Size" type="System.Drawing.Size, System.Drawing">
<value>488, 319</value>
<value>489, 327</value>
</data>
<data name="poolsDataGridView.TabIndex" type="System.Int32, mscorlib">
<value>11</value>
@ -211,7 +211,7 @@
<value>0, 2, 0, 4</value>
</data>
<data name="poolNameLabel.Size" type="System.Drawing.Size, System.Drawing">
<value>260, 21</value>
<value>262, 21</value>
</data>
<data name="poolNameLabel.TabIndex" type="System.Int32, mscorlib">
<value>15</value>
@ -304,7 +304,7 @@
<value>3, 3, 3, 3</value>
</data>
<data name="scheduleLabel.Size" type="System.Drawing.Size, System.Drawing">
<value>248, 15</value>
<value>250, 15</value>
</data>
<data name="scheduleLabel.TabIndex" type="System.Int32, mscorlib">
<value>18</value>
@ -379,7 +379,7 @@
<value>3, 3, 3, 3</value>
</data>
<data name="issuesLabel.Size" type="System.Drawing.Size, System.Drawing">
<value>248, 15</value>
<value>250, 15</value>
</data>
<data name="issuesLabel.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
@ -703,7 +703,7 @@
<value>2</value>
</data>
<data name="previousUploadPanel.Size" type="System.Drawing.Size, System.Drawing">
<value>248, 42</value>
<value>250, 42</value>
</data>
<data name="previousUploadPanel.TabIndex" type="System.Int32, mscorlib">
<value>17</value>
@ -739,7 +739,7 @@
<value>9</value>
</data>
<data name="healthCheckStatusPanel.Size" type="System.Drawing.Size, System.Drawing">
<value>254, 215</value>
<value>256, 235</value>
</data>
<data name="healthCheckStatusPanel.TabIndex" type="System.Int32, mscorlib">
<value>16</value>
@ -823,7 +823,7 @@
<value>3, 3, 3, 3</value>
</data>
<data name="label6.Size" type="System.Drawing.Size, System.Drawing">
<value>248, 15</value>
<value>250, 15</value>
</data>
<data name="label6.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
@ -850,13 +850,13 @@
<value>Segoe UI, 9pt</value>
</data>
<data name="notEnrolledPanel.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 224</value>
<value>3, 244</value>
</data>
<data name="notEnrolledPanel.RowCount" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="notEnrolledPanel.Size" type="System.Drawing.Size, System.Drawing">
<value>254, 62</value>
<value>256, 50</value>
</data>
<data name="notEnrolledPanel.TabIndex" type="System.Int32, mscorlib">
<value>19</value>
@ -889,7 +889,7 @@
<value>2</value>
</data>
<data name="poolDetailsPanel.Size" type="System.Drawing.Size, System.Drawing">
<value>260, 289</value>
<value>262, 297</value>
</data>
<data name="poolDetailsPanel.TabIndex" type="System.Int32, mscorlib">
<value>20</value>
@ -922,7 +922,7 @@
<value>2</value>
</data>
<data name="tableLayoutPanel2.Size" type="System.Drawing.Size, System.Drawing">
<value>268, 319</value>
<value>270, 327</value>
</data>
<data name="tableLayoutPanel2.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
@ -961,10 +961,10 @@
<value>220</value>
</data>
<data name="splitContainer1.Size" type="System.Drawing.Size, System.Drawing">
<value>760, 319</value>
<value>763, 327</value>
</data>
<data name="splitContainer1.SplitterDistance" type="System.Int32, mscorlib">
<value>488</value>
<value>489</value>
</data>
<data name="splitContainer1.TabIndex" type="System.Int32, mscorlib">
<value>17</value>
@ -979,7 +979,7 @@
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;splitContainer1.ZOrder" xml:space="preserve">
<value>2</value>
<value>1</value>
</data>
<data name="buttonCancel.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Bottom, Right</value>
@ -991,13 +991,13 @@
<value>NoControl</value>
</data>
<data name="buttonCancel.Location" type="System.Drawing.Point, System.Drawing">
<value>703, 399</value>
<value>703, 407</value>
</data>
<data name="buttonCancel.Size" type="System.Drawing.Size, System.Drawing">
<value>75, 23</value>
</data>
<data name="buttonCancel.TabIndex" type="System.Int32, mscorlib">
<value>8</value>
<value>2</value>
</data>
<data name="buttonCancel.Text" xml:space="preserve">
<value>Close</value>
@ -1012,7 +1012,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;buttonCancel.ZOrder" xml:space="preserve">
<value>1</value>
<value>2</value>
</data>
<data name="tableLayoutPanel1.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Bottom, Left, Right</value>
@ -1108,10 +1108,10 @@
<value>0, 0, 0, 4</value>
</data>
<data name="flowLayoutPanel2.Size" type="System.Drawing.Size, System.Drawing">
<value>766, 18</value>
<value>769, 18</value>
</data>
<data name="flowLayoutPanel2.TabIndex" type="System.Int32, mscorlib">
<value>18</value>
<value>13</value>
</data>
<data name="&gt;&gt;flowLayoutPanel2.Name" xml:space="preserve">
<value>flowLayoutPanel2</value>
@ -1147,7 +1147,7 @@
<value>0, 0, 0, 4</value>
</data>
<data name="rubricLabel.Size" type="System.Drawing.Size, System.Drawing">
<value>763, 34</value>
<value>766, 34</value>
</data>
<data name="rubricLabel.TabIndex" type="System.Int32, mscorlib">
<value>12</value>
@ -1165,7 +1165,7 @@
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;rubricLabel.ZOrder" xml:space="preserve">
<value>1</value>
<value>2</value>
</data>
<data name="tableLayoutPanel1.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 9pt</value>
@ -1173,14 +1173,17 @@
<data name="tableLayoutPanel1.Location" type="System.Drawing.Point, System.Drawing">
<value>9, 12</value>
</data>
<data name="tableLayoutPanel1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 0, 3</value>
</data>
<data name="tableLayoutPanel1.RowCount" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="tableLayoutPanel1.Size" type="System.Drawing.Size, System.Drawing">
<value>766, 381</value>
<value>769, 389</value>
</data>
<data name="tableLayoutPanel1.TabIndex" type="System.Int32, mscorlib">
<value>68</value>
<value>1</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.Name" xml:space="preserve">
<value>tableLayoutPanel1</value>
@ -1195,7 +1198,46 @@
<value>0</value>
</data>
<data name="tableLayoutPanel1.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="flowLayoutPanel2" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="rubricLabel" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="splitContainer1" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="Percent,100" /&gt;&lt;Rows Styles="AutoSize,0,AutoSize,0,Percent,100" /&gt;&lt;/TableLayoutSettings&gt;</value>
<value>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;TableLayoutSettings&gt;&lt;Controls&gt;&lt;Control Name="flowLayoutPanel2" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="splitContainer1" Row="2" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="rubricLabel" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="Percent,100" /&gt;&lt;Rows Styles="AutoSize,0,AutoSize,0,Percent,100" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="showAgainCheckBox.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Bottom, Left</value>
</data>
<data name="showAgainCheckBox.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="showAgainCheckBox.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 9pt</value>
</data>
<data name="showAgainCheckBox.Location" type="System.Drawing.Point, System.Drawing">
<value>9, 410</value>
</data>
<data name="showAgainCheckBox.Size" type="System.Drawing.Size, System.Drawing">
<value>433, 19</value>
</data>
<data name="showAgainCheckBox.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="showAgainCheckBox.Text" xml:space="preserve">
<value>&amp;Show this when connecting to servers that are not enrolled into Health Check</value>
</data>
<metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<data name="showAgainCheckBox.ToolTip" xml:space="preserve">
<value>Show this dialog when connecting to servers that are not enrolled into Health Check</value>
</data>
<data name="&gt;&gt;showAgainCheckBox.Name" xml:space="preserve">
<value>showAgainCheckBox</value>
</data>
<data name="&gt;&gt;showAgainCheckBox.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;showAgainCheckBox.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;showAgainCheckBox.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
@ -1652,6 +1694,12 @@
<data name="&gt;&gt;StatusColumn.Type" xml:space="preserve">
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;toolTip.Name" xml:space="preserve">
<value>toolTip</value>
</data>
<data name="&gt;&gt;toolTip.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolTip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>CallHomeOverviewDialog</value>
</data>

View File

@ -853,7 +853,8 @@ namespace XenAdmin
if(licenseTimer != null)
licenseTimer.CheckActiveServerLicense(connection, false);
ThreadPool.QueueUserWorkItem(CheckHealthCheckEnrollment, connection);
if (Properties.Settings.Default.ShowHealthCheckEnrollmentReminder)
ThreadPool.QueueUserWorkItem(CheckHealthCheckEnrollment, connection);
ThreadPool.QueueUserWorkItem(InformHealthCheckEnrollment, connection);
Updates.CheckServerPatches();

View File

@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.18052
// Runtime Version:4.0.30319.18444
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
@ -669,5 +669,18 @@ namespace XenAdmin.Properties {
this["PinConnectionBar"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
[global::System.Configuration.SettingsManageabilityAttribute(global::System.Configuration.SettingsManageability.Roaming)]
public bool ShowHealthCheckEnrollmentReminder {
get {
return ((bool)(this["ShowHealthCheckEnrollmentReminder"]));
}
set {
this["ShowHealthCheckEnrollmentReminder"] = value;
}
}
}
}

View File

@ -155,5 +155,8 @@
<Setting Name="PinConnectionBar" Roaming="true" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="ShowHealthCheckEnrollmentReminder" Roaming="true" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
</Settings>
</SettingsFile>

View File

@ -2348,6 +2348,7 @@
<SubType>Designer</SubType>
</EmbeddedResource>
<None Include="app.config">
<SubType>Designer</SubType>
</None>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>

View File

@ -17,7 +17,8 @@
</setting>
<setting name="ServerList" serializeAs="Xml">
<value>
<ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"/>
<ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
</value>
</setting>
<setting name="LocalSRsVisible" serializeAs="String">
@ -57,7 +58,7 @@
<value>0</value>
</setting>
<setting name="ProxyAddress" serializeAs="String">
<value/>
<value />
</setting>
<setting name="BypassProxyForLocal" serializeAs="String">
<value>False</value>
@ -102,7 +103,7 @@
<value>False</value>
</setting>
<setting name="LatestXenCenterSeen" serializeAs="String">
<value/>
<value />
</setting>
<setting name="SeenAllowUpdatesDialog" serializeAs="String">
<value>False</value>
@ -118,16 +119,18 @@
</setting>
<setting name="DisabledPlugins" serializeAs="Xml">
<value>
<ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"/>
<ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
</value>
</setting>
<setting name="IgnoreFirstRunWizards" serializeAs="Xml">
<value>
<ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"/>
<ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
</value>
</setting>
<setting name="ServerStatusPath" serializeAs="String">
<value/>
<value />
</setting>
<setting name="RollingUpgradeWizardShowFirstPage" serializeAs="String">
<value>False</value>
@ -136,7 +139,7 @@
<value>True</value>
</setting>
<setting name="ApplicationVersion" serializeAs="String">
<value/>
<value />
</setting>
<setting name="UncaptureShortcutKey" serializeAs="String">
<value>0</value>
@ -147,6 +150,9 @@
<setting name="PinConnectionBar" serializeAs="String">
<value>True</value>
</setting>
<setting name="ShowHealthCheckEnrollmentReminder" serializeAs="String">
<value>True</value>
</setting>
</XenAdmin.Properties.Settings>
</userSettings>