mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-23 20:36:33 +01:00
CP-15825: Show About dialog at startup detailing company names that the connected hosts have been licensed to
Signed-off-by: Mihaela Stoica <Mihaela.Stoica@citrix.com>
This commit is contained in:
parent
2689f0bd9e
commit
fb64d19853
99
XenAdmin/Dialogs/AboutDialog.Designer.cs
generated
99
XenAdmin/Dialogs/AboutDialog.Designer.cs
generated
@ -29,35 +29,19 @@ namespace XenAdmin.Dialogs
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AboutDialog));
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
this.VersionLabel = new System.Windows.Forms.Label();
|
||||
this.OkButton = new System.Windows.Forms.Button();
|
||||
this.linkLabel1 = new System.Windows.Forms.LinkLabel();
|
||||
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||
this.LicenseDetailsTextBox = new System.Windows.Forms.TextBox();
|
||||
this.linkLabel1 = new System.Windows.Forms.LinkLabel();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.licenseDetailsLabel = new System.Windows.Forms.Label();
|
||||
this.VersionLabel = new System.Windows.Forms.Label();
|
||||
this.showAgainCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
this.tableLayoutPanel1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label2
|
||||
//
|
||||
resources.ApplyResources(this.label2, "label2");
|
||||
this.label2.BackColor = System.Drawing.Color.Transparent;
|
||||
this.label2.Name = "label2";
|
||||
//
|
||||
// pictureBox1
|
||||
//
|
||||
resources.ApplyResources(this.pictureBox1, "pictureBox1");
|
||||
this.pictureBox1.Image = global::XenAdmin.Properties.Resources.about_box_graphic_423x79;
|
||||
this.pictureBox1.Name = "pictureBox1";
|
||||
this.pictureBox1.TabStop = false;
|
||||
//
|
||||
// VersionLabel
|
||||
//
|
||||
resources.ApplyResources(this.VersionLabel, "VersionLabel");
|
||||
this.VersionLabel.BackColor = System.Drawing.Color.Transparent;
|
||||
this.VersionLabel.Name = "VersionLabel";
|
||||
//
|
||||
// OkButton
|
||||
//
|
||||
resources.ApplyResources(this.OkButton, "OkButton");
|
||||
@ -67,6 +51,28 @@ namespace XenAdmin.Dialogs
|
||||
this.OkButton.UseVisualStyleBackColor = true;
|
||||
this.OkButton.Click += new System.EventHandler(this.OkButton_Click);
|
||||
//
|
||||
// tableLayoutPanel1
|
||||
//
|
||||
resources.ApplyResources(this.tableLayoutPanel1, "tableLayoutPanel1");
|
||||
this.tableLayoutPanel1.BackColor = System.Drawing.Color.White;
|
||||
this.tableLayoutPanel1.Controls.Add(this.LicenseDetailsTextBox, 0, 5);
|
||||
this.tableLayoutPanel1.Controls.Add(this.OkButton, 1, 6);
|
||||
this.tableLayoutPanel1.Controls.Add(this.linkLabel1, 0, 3);
|
||||
this.tableLayoutPanel1.Controls.Add(this.label2, 0, 1);
|
||||
this.tableLayoutPanel1.Controls.Add(this.licenseDetailsLabel, 0, 4);
|
||||
this.tableLayoutPanel1.Controls.Add(this.VersionLabel, 0, 0);
|
||||
this.tableLayoutPanel1.Controls.Add(this.showAgainCheckBox, 0, 6);
|
||||
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||
//
|
||||
// LicenseDetailsTextBox
|
||||
//
|
||||
this.LicenseDetailsTextBox.BackColor = System.Drawing.SystemColors.Window;
|
||||
this.tableLayoutPanel1.SetColumnSpan(this.LicenseDetailsTextBox, 2);
|
||||
this.LicenseDetailsTextBox.Cursor = System.Windows.Forms.Cursors.Default;
|
||||
resources.ApplyResources(this.LicenseDetailsTextBox, "LicenseDetailsTextBox");
|
||||
this.LicenseDetailsTextBox.Name = "LicenseDetailsTextBox";
|
||||
this.LicenseDetailsTextBox.ReadOnly = true;
|
||||
//
|
||||
// linkLabel1
|
||||
//
|
||||
resources.ApplyResources(this.linkLabel1, "linkLabel1");
|
||||
@ -74,14 +80,40 @@ namespace XenAdmin.Dialogs
|
||||
this.linkLabel1.TabStop = true;
|
||||
this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);
|
||||
//
|
||||
// tableLayoutPanel1
|
||||
// label2
|
||||
//
|
||||
resources.ApplyResources(this.tableLayoutPanel1, "tableLayoutPanel1");
|
||||
this.tableLayoutPanel1.Controls.Add(this.VersionLabel, 0, 0);
|
||||
this.tableLayoutPanel1.Controls.Add(this.OkButton, 0, 4);
|
||||
this.tableLayoutPanel1.Controls.Add(this.linkLabel1, 0, 3);
|
||||
this.tableLayoutPanel1.Controls.Add(this.label2, 0, 1);
|
||||
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||
resources.ApplyResources(this.label2, "label2");
|
||||
this.label2.BackColor = System.Drawing.Color.Transparent;
|
||||
this.tableLayoutPanel1.SetColumnSpan(this.label2, 2);
|
||||
this.label2.Name = "label2";
|
||||
//
|
||||
// licenseDetailsLabel
|
||||
//
|
||||
resources.ApplyResources(this.licenseDetailsLabel, "licenseDetailsLabel");
|
||||
this.licenseDetailsLabel.BackColor = System.Drawing.Color.Transparent;
|
||||
this.tableLayoutPanel1.SetColumnSpan(this.licenseDetailsLabel, 2);
|
||||
this.licenseDetailsLabel.Name = "licenseDetailsLabel";
|
||||
//
|
||||
// VersionLabel
|
||||
//
|
||||
resources.ApplyResources(this.VersionLabel, "VersionLabel");
|
||||
this.VersionLabel.BackColor = System.Drawing.Color.Transparent;
|
||||
this.tableLayoutPanel1.SetColumnSpan(this.VersionLabel, 2);
|
||||
this.VersionLabel.Name = "VersionLabel";
|
||||
//
|
||||
// showAgainCheckBox
|
||||
//
|
||||
resources.ApplyResources(this.showAgainCheckBox, "showAgainCheckBox");
|
||||
this.showAgainCheckBox.Name = "showAgainCheckBox";
|
||||
this.showAgainCheckBox.UseVisualStyleBackColor = true;
|
||||
this.showAgainCheckBox.CheckedChanged += new System.EventHandler(this.showAgainCheckBox_CheckedChanged);
|
||||
//
|
||||
// pictureBox1
|
||||
//
|
||||
resources.ApplyResources(this.pictureBox1, "pictureBox1");
|
||||
this.pictureBox1.Image = global::XenAdmin.Properties.Resources.about_box_graphic_423x79;
|
||||
this.pictureBox1.Name = "pictureBox1";
|
||||
this.pictureBox1.TabStop = false;
|
||||
//
|
||||
// AboutDialog
|
||||
//
|
||||
@ -94,9 +126,9 @@ namespace XenAdmin.Dialogs
|
||||
this.Controls.Add(this.pictureBox1);
|
||||
this.HelpButton = false;
|
||||
this.Name = "AboutDialog";
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||
this.tableLayoutPanel1.ResumeLayout(false);
|
||||
this.tableLayoutPanel1.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
@ -110,5 +142,8 @@ namespace XenAdmin.Dialogs
|
||||
private System.Windows.Forms.Button OkButton;
|
||||
private System.Windows.Forms.LinkLabel linkLabel1;
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||
private System.Windows.Forms.Label licenseDetailsLabel;
|
||||
private System.Windows.Forms.TextBox LicenseDetailsTextBox;
|
||||
private System.Windows.Forms.CheckBox showAgainCheckBox;
|
||||
}
|
||||
}
|
||||
|
@ -35,6 +35,7 @@ using System.ComponentModel;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using XenAdmin.Core;
|
||||
using System.Linq;
|
||||
|
||||
|
||||
namespace XenAdmin.Dialogs
|
||||
@ -55,6 +56,12 @@ namespace XenAdmin.Dialogs
|
||||
Branding.XENCENTER_VERSION, buildText, IntPtr.Size * 8);
|
||||
label2.Text = string.Format(Messages.COPYRIGHT, Branding.COMPANY_NAME_LEGAL);
|
||||
label2.Visible = !HiddenFeatures.CopyrightHidden;
|
||||
|
||||
showAgainCheckBox.Checked = Properties.Settings.Default.ShowAboutDialog;
|
||||
var showLicenseNag = !HiddenFeatures.LicenseNagHidden;
|
||||
LicenseDetailsTextBox.Text = showLicenseNag ? GetLicenseDetails() : "";
|
||||
licenseDetailsLabel.Visible = LicenseDetailsTextBox.Visible = showLicenseNag;
|
||||
showAgainCheckBox.Visible = showLicenseNag;
|
||||
}
|
||||
|
||||
private void OkButton_Click(object sender, EventArgs e)
|
||||
@ -76,5 +83,30 @@ namespace XenAdmin.Dialogs
|
||||
TheLegalDialog.Focus();
|
||||
}
|
||||
}
|
||||
|
||||
private string GetLicenseDetails()
|
||||
{
|
||||
List<string> companies = new List<string>();
|
||||
foreach (var xenConnection in ConnectionsManager.XenConnectionsCopy.Where(c => c.IsConnected))
|
||||
{
|
||||
foreach (var host in xenConnection.Cache.Hosts.Where(h => h.license_params != null && h.license_params.ContainsKey("company")))
|
||||
{
|
||||
if (!string.IsNullOrEmpty(host.license_params["company"]) && !companies.Contains(host.license_params["company"]))
|
||||
{
|
||||
companies.Add(host.license_params["company"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
return string.Join("\r\n", companies);
|
||||
}
|
||||
|
||||
private void showAgainCheckBox_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (Properties.Settings.Default.ShowAboutDialog != showAgainCheckBox.Checked)
|
||||
{
|
||||
Properties.Settings.Default.ShowAboutDialog = showAgainCheckBox.Checked;
|
||||
Settings.TrySaveSettings();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -117,18 +117,141 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="OkButton.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Bottom, Right</value>
|
||||
</data>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="OkButton.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
<data name="OkButton.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="OkButton.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>336, 207</value>
|
||||
</data>
|
||||
<data name="OkButton.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>0, 3, 12, 12</value>
|
||||
</data>
|
||||
<data name="OkButton.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>75, 23</value>
|
||||
</data>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="OkButton.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="OkButton.Text" xml:space="preserve">
|
||||
<value>OK</value>
|
||||
</data>
|
||||
<data name=">>OkButton.Name" xml:space="preserve">
|
||||
<value>OkButton</value>
|
||||
</data>
|
||||
<data name=">>OkButton.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>OkButton.Parent" xml:space="preserve">
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>OkButton.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Bottom, Left, Right</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.AutoSizeMode" type="System.Windows.Forms.AutoSizeMode, System.Windows.Forms">
|
||||
<value>GrowAndShrink</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.ColumnCount" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="LicenseDetailsTextBox.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
<data name="LicenseDetailsTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>15, 138</value>
|
||||
</data>
|
||||
<data name="LicenseDetailsTextBox.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>15, 3, 12, 6</value>
|
||||
</data>
|
||||
<data name="LicenseDetailsTextBox.Multiline" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="LicenseDetailsTextBox.ScrollBars" type="System.Windows.Forms.ScrollBars, System.Windows.Forms">
|
||||
<value>Both</value>
|
||||
</data>
|
||||
<data name="LicenseDetailsTextBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>396, 60</value>
|
||||
</data>
|
||||
<data name="LicenseDetailsTextBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>20</value>
|
||||
</data>
|
||||
<data name=">>LicenseDetailsTextBox.Name" xml:space="preserve">
|
||||
<value>LicenseDetailsTextBox</value>
|
||||
</data>
|
||||
<data name=">>LicenseDetailsTextBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>LicenseDetailsTextBox.Parent" xml:space="preserve">
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>LicenseDetailsTextBox.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="linkLabel1.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Bottom, Left</value>
|
||||
</data>
|
||||
<data name="linkLabel1.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="linkLabel1.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
<data name="linkLabel1.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="linkLabel1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>14, 77</value>
|
||||
</data>
|
||||
<data name="linkLabel1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>14, 11, 14, 0</value>
|
||||
</data>
|
||||
<data name="linkLabel1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>106, 15</value>
|
||||
</data>
|
||||
<data name="linkLabel1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>18</value>
|
||||
</data>
|
||||
<data name="linkLabel1.Text" xml:space="preserve">
|
||||
<value>View Legal Notices</value>
|
||||
</data>
|
||||
<data name=">>linkLabel1.Name" xml:space="preserve">
|
||||
<value>linkLabel1</value>
|
||||
</data>
|
||||
<data name=">>linkLabel1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.LinkLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>linkLabel1.Parent" xml:space="preserve">
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>linkLabel1.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="label2.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="label2.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
<data name="label2.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="label2.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>14, 46</value>
|
||||
</data>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="label2.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>14, 3, 14, 5</value>
|
||||
</data>
|
||||
@ -153,6 +276,147 @@
|
||||
<data name=">>label2.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="licenseDetailsLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="licenseDetailsLabel.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
<data name="licenseDetailsLabel.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="licenseDetailsLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>14, 115</value>
|
||||
</data>
|
||||
<data name="licenseDetailsLabel.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>14, 23, 14, 5</value>
|
||||
</data>
|
||||
<data name="licenseDetailsLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>254, 15</value>
|
||||
</data>
|
||||
<data name="licenseDetailsLabel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>19</value>
|
||||
</data>
|
||||
<data name="licenseDetailsLabel.Text" xml:space="preserve">
|
||||
<value>@BRANDING_PRODUCT_BRAND@ licensed to:</value>
|
||||
</data>
|
||||
<data name=">>licenseDetailsLabel.Name" xml:space="preserve">
|
||||
<value>licenseDetailsLabel</value>
|
||||
</data>
|
||||
<data name=">>licenseDetailsLabel.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>licenseDetailsLabel.Parent" xml:space="preserve">
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>licenseDetailsLabel.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="VersionLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="VersionLabel.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
<data name="VersionLabel.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="VersionLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>14, 23</value>
|
||||
</data>
|
||||
<data name="VersionLabel.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>14, 23, 14, 5</value>
|
||||
</data>
|
||||
<data name="VersionLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>323, 15</value>
|
||||
</data>
|
||||
<data name="VersionLabel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>15</value>
|
||||
</data>
|
||||
<data name="VersionLabel.Text" xml:space="preserve">
|
||||
<value>@BRANDING_BRAND_CONSOLE@ version 1.2.3 (build 4567)</value>
|
||||
</data>
|
||||
<data name=">>VersionLabel.Name" xml:space="preserve">
|
||||
<value>VersionLabel</value>
|
||||
</data>
|
||||
<data name=">>VersionLabel.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>VersionLabel.Parent" xml:space="preserve">
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>VersionLabel.ZOrder" xml:space="preserve">
|
||||
<value>5</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.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="showAgainCheckBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 210</value>
|
||||
</data>
|
||||
<data name="showAgainCheckBox.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>12, 6, 3, 3</value>
|
||||
</data>
|
||||
<data name="showAgainCheckBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>321, 19</value>
|
||||
</data>
|
||||
<data name="showAgainCheckBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>21</value>
|
||||
</data>
|
||||
<data name="showAgainCheckBox.Text" xml:space="preserve">
|
||||
<value>&Show this dialog when opening @BRANDING_BRAND_CONSOLE@</value>
|
||||
</data>
|
||||
<data name="showAgainCheckBox.Visible" type="System.Boolean, mscorlib">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name=">>showAgainCheckBox.Name" xml:space="preserve">
|
||||
<value>showAgainCheckBox</value>
|
||||
</data>
|
||||
<data name=">>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=">>showAgainCheckBox.Parent" xml:space="preserve">
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>showAgainCheckBox.ZOrder" xml:space="preserve">
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 79</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.RowCount" type="System.Int32, mscorlib">
|
||||
<value>7</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>423, 242</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>19</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanel1.Name" xml:space="preserve">
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanel1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanel1.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanel1.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
|
||||
<value><?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="LicenseDetailsTextBox" Row="5" RowSpan="1" Column="0" ColumnSpan="2" /><Control Name="OkButton" Row="6" RowSpan="1" Column="1" ColumnSpan="1" /><Control Name="linkLabel1" Row="3" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="label2" Row="1" RowSpan="1" Column="0" ColumnSpan="2" /><Control Name="licenseDetailsLabel" Row="4" RowSpan="1" Column="0" ColumnSpan="2" /><Control Name="VersionLabel" Row="0" RowSpan="1" Column="0" ColumnSpan="2" /><Control Name="showAgainCheckBox" Row="6" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="Percent,100,AutoSize,20" /><Rows Styles="AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,20,AutoSize,20,AutoSize,0" /></TableLayoutSettings></value>
|
||||
</data>
|
||||
<data name="pictureBox1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Top</value>
|
||||
</data>
|
||||
@ -186,156 +450,6 @@
|
||||
<data name=">>pictureBox1.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="VersionLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="VersionLabel.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
<data name="VersionLabel.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="VersionLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>14, 23</value>
|
||||
</data>
|
||||
<data name="VersionLabel.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>14, 23, 14, 5</value>
|
||||
</data>
|
||||
<data name="VersionLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>195, 15</value>
|
||||
</data>
|
||||
<data name="VersionLabel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>15</value>
|
||||
</data>
|
||||
<data name="VersionLabel.Text" xml:space="preserve">
|
||||
<value>@BRANDING_BRAND_CONSOLE@ version 1.2.3 (build 4567)</value>
|
||||
</data>
|
||||
<data name=">>VersionLabel.Name" xml:space="preserve">
|
||||
<value>VersionLabel</value>
|
||||
</data>
|
||||
<data name=">>VersionLabel.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>VersionLabel.Parent" xml:space="preserve">
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>VersionLabel.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="OkButton.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Bottom, Right</value>
|
||||
</data>
|
||||
<data name="OkButton.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
<data name="OkButton.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="OkButton.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>336, 95</value>
|
||||
</data>
|
||||
<data name="OkButton.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>0, 3, 12, 12</value>
|
||||
</data>
|
||||
<data name="OkButton.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>75, 23</value>
|
||||
</data>
|
||||
<data name="OkButton.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="OkButton.Text" xml:space="preserve">
|
||||
<value>OK</value>
|
||||
</data>
|
||||
<data name=">>OkButton.Name" xml:space="preserve">
|
||||
<value>OkButton</value>
|
||||
</data>
|
||||
<data name=">>OkButton.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>OkButton.Parent" xml:space="preserve">
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>OkButton.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="linkLabel1.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Bottom, Left</value>
|
||||
</data>
|
||||
<data name="linkLabel1.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="linkLabel1.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
<data name="linkLabel1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>14, 77</value>
|
||||
</data>
|
||||
<data name="linkLabel1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
|
||||
<value>14, 11, 14, 0</value>
|
||||
</data>
|
||||
<data name="linkLabel1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>106, 15</value>
|
||||
</data>
|
||||
<data name="linkLabel1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>18</value>
|
||||
</data>
|
||||
<data name="linkLabel1.Text" xml:space="preserve">
|
||||
<value>View Legal Notices</value>
|
||||
</data>
|
||||
<data name=">>linkLabel1.Name" xml:space="preserve">
|
||||
<value>linkLabel1</value>
|
||||
</data>
|
||||
<data name=">>linkLabel1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.LinkLabel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>linkLabel1.Parent" xml:space="preserve">
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>linkLabel1.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Bottom, Left, Right</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.AutoSizeMode" type="System.Windows.Forms.AutoSizeMode, System.Windows.Forms">
|
||||
<value>GrowAndShrink</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.ColumnCount" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Segoe UI, 9pt</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 79</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.RowCount" type="System.Int32, mscorlib">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>423, 130</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>19</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanel1.Name" xml:space="preserve">
|
||||
<value>tableLayoutPanel1</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanel1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TableLayoutPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanel1.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>tableLayoutPanel1.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="tableLayoutPanel1.LayoutSettings" type="System.Windows.Forms.TableLayoutSettings, System.Windows.Forms">
|
||||
<value><?xml version="1.0" encoding="utf-16"?><TableLayoutSettings><Controls><Control Name="VersionLabel" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="OkButton" Row="4" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="linkLabel1" Row="3" RowSpan="1" Column="0" ColumnSpan="1" /><Control Name="label2" Row="1" RowSpan="1" Column="0" ColumnSpan="1" /></Controls><Columns Styles="Percent,100" /><Rows Styles="AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0,AutoSize,0" /></TableLayoutSettings></value>
|
||||
</data>
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
@ -349,7 +463,7 @@
|
||||
<value>GrowAndShrink</value>
|
||||
</data>
|
||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>423, 208</value>
|
||||
<value>423, 321</value>
|
||||
</data>
|
||||
<data name="$this.Font" type="System.Drawing.Font, System.Drawing">
|
||||
<value>Tahoma, 8pt</value>
|
||||
|
@ -129,6 +129,9 @@ namespace XenAdmin
|
||||
|
||||
private Dictionary<ToolStripMenuItem, int> pluginMenuItemStartIndexes = new Dictionary<ToolStripMenuItem, int>();
|
||||
|
||||
private bool expandTreeNodesOnStartup;
|
||||
private int connectionsInProgressOnStartup;
|
||||
|
||||
public MainWindow(ArgType argType, string[] args)
|
||||
{
|
||||
Program.MainWindow = this;
|
||||
@ -521,18 +524,19 @@ namespace XenAdmin
|
||||
RequestRefreshTreeView();
|
||||
UpdateToolbars();
|
||||
|
||||
// if there are fewer than 30 connections, then expand the tree nodes.
|
||||
expandTreeNodesOnStartup = ConnectionsManager.XenConnectionsCopy.Count < 30;
|
||||
|
||||
connectionsInProgressOnStartup = 0;
|
||||
// kick-off connections for all the loaded server list
|
||||
foreach (IXenConnection connection in ConnectionsManager.XenConnectionsCopy)
|
||||
{
|
||||
if (!connection.SaveDisconnected)
|
||||
{
|
||||
connectionsInProgressOnStartup++;
|
||||
connection.ConnectionStateChanged += Connection_ConnectionStateChangedOnStartup;
|
||||
connection.CachePopulated += connection_CachePopulatedOnStartup;
|
||||
XenConnectionUI.BeginConnect(connection, true, this, true);
|
||||
|
||||
// if there are fewer than 30 connections, then expand the tree nodes.
|
||||
if (ConnectionsManager.XenConnectionsCopy.Count < 30)
|
||||
{
|
||||
connection.CachePopulated += connection_CachePopulatedOnStartup;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -601,7 +605,37 @@ namespace XenAdmin
|
||||
{
|
||||
IXenConnection c = (IXenConnection)sender;
|
||||
c.CachePopulated -= connection_CachePopulatedOnStartup;
|
||||
TrySelectNewNode(c, false, true, false);
|
||||
if (expandTreeNodesOnStartup)
|
||||
TrySelectNewNode(c, false, true, false);
|
||||
|
||||
Program.Invoke(this, ShowAboutDialogOnStartup);
|
||||
}
|
||||
|
||||
private void Connection_ConnectionStateChangedOnStartup(object sender, EventArgs e)
|
||||
{
|
||||
IXenConnection c = (IXenConnection)sender;
|
||||
c.CachePopulated -= Connection_ConnectionStateChangedOnStartup;
|
||||
|
||||
Program.Invoke(Program.MainWindow, delegate
|
||||
{
|
||||
connectionsInProgressOnStartup--;
|
||||
// show the About dialog if this was the last connection in progress and the connection failed
|
||||
if (!c.IsConnected)
|
||||
ShowAboutDialogOnStartup();
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Show the About dialog after all conncections kicked-off on startup have finished the connection phase (cache populated)
|
||||
/// Must be called on the event thread.
|
||||
/// </summary>
|
||||
private void ShowAboutDialogOnStartup()
|
||||
{
|
||||
Program.AssertOnEventThread();
|
||||
if (connectionsInProgressOnStartup > 0)
|
||||
return;
|
||||
if (Properties.Settings.Default.ShowAboutDialog && !HiddenFeatures.LicenseNagHidden)
|
||||
ShowForm(typeof(AboutDialog));
|
||||
}
|
||||
|
||||
private bool Launched = false;
|
||||
|
14
XenAdmin/Properties/Settings.Designer.cs
generated
14
XenAdmin/Properties/Settings.Designer.cs
generated
@ -1,7 +1,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.34209
|
||||
// Runtime Version:4.0.30319.18444
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@ -695,5 +695,17 @@ namespace XenAdmin.Properties {
|
||||
this["ShowJustHostInSearch"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("True")]
|
||||
public bool ShowAboutDialog {
|
||||
get {
|
||||
return ((bool)(this["ShowAboutDialog"]));
|
||||
}
|
||||
set {
|
||||
this["ShowAboutDialog"] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -161,5 +161,8 @@
|
||||
<Setting Name="ShowJustHostInSearch" Roaming="true" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
<Setting Name="ShowAboutDialog" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">True</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
@ -152,10 +152,13 @@
|
||||
</setting>
|
||||
<setting name="ShowHealthCheckEnrollmentReminder" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
</setting>
|
||||
<setting name="ShowJustHostInSearch" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="ShowAboutDialog" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
</XenAdmin.Properties.Settings>
|
||||
</userSettings>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user