Minor layout tweaks (margins, padding, alignment).

Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
This commit is contained in:
Konstantina Chremmou 2023-10-18 00:51:02 +01:00
parent 3be1d02a11
commit fcd9b195f6
4 changed files with 113 additions and 185 deletions

View File

@ -232,6 +232,8 @@ namespace XenAdmin.Controls
}
}
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public IXenConnection connection
{
set

View File

@ -36,11 +36,9 @@ namespace XenAdmin.Controls
this.newCDLabel = new System.Windows.Forms.Label();
this.comboBoxDrive = new System.Windows.Forms.ComboBox();
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.panel1 = new System.Windows.Forms.Panel();
this.cdChanger1 = new XenAdmin.Controls.CDChanger();
this.linkLabel1 = new System.Windows.Forms.LinkLabel();
this.linkLabelEject = new System.Windows.Forms.LinkLabel();
this.tableLayoutPanel1.SuspendLayout();
this.panel1.SuspendLayout();
this.SuspendLayout();
//
// labelSingleDvd
@ -51,6 +49,7 @@ namespace XenAdmin.Controls
// newCDLabel
//
resources.ApplyResources(this.newCDLabel, "newCDLabel");
this.tableLayoutPanel1.SetColumnSpan(this.newCDLabel, 4);
this.newCDLabel.Cursor = System.Windows.Forms.Cursors.Hand;
this.newCDLabel.ForeColor = System.Drawing.SystemColors.HotTrack;
this.newCDLabel.Name = "newCDLabel";
@ -69,20 +68,13 @@ namespace XenAdmin.Controls
resources.ApplyResources(this.tableLayoutPanel1, "tableLayoutPanel1");
this.tableLayoutPanel1.Controls.Add(this.labelSingleDvd, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.comboBoxDrive, 1, 0);
this.tableLayoutPanel1.Controls.Add(this.newCDLabel, 2, 1);
this.tableLayoutPanel1.Controls.Add(this.panel1, 2, 0);
this.tableLayoutPanel1.Controls.Add(this.cdChanger1, 2, 0);
this.tableLayoutPanel1.Controls.Add(this.linkLabelEject, 3, 0);
this.tableLayoutPanel1.Controls.Add(this.newCDLabel, 0, 1);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
//
// panel1
//
resources.ApplyResources(this.panel1, "panel1");
this.panel1.Controls.Add(this.cdChanger1);
this.panel1.Controls.Add(this.linkLabel1);
this.panel1.Name = "panel1";
//
// cdChanger1
//
this.cdChanger1.connection = null;
resources.ApplyResources(this.cdChanger1, "cdChanger1");
this.cdChanger1.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.cdChanger1.DropDownHeight = 500;
@ -90,12 +82,12 @@ namespace XenAdmin.Controls
this.cdChanger1.FormattingEnabled = true;
this.cdChanger1.Name = "cdChanger1";
//
// linkLabel1
// linkLabelEject
//
resources.ApplyResources(this.linkLabel1, "linkLabel1");
this.linkLabel1.Name = "linkLabel1";
this.linkLabel1.TabStop = true;
this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);
resources.ApplyResources(this.linkLabelEject, "linkLabelEject");
this.linkLabelEject.Name = "linkLabelEject";
this.linkLabelEject.TabStop = true;
this.linkLabelEject.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabelEject_LinkClicked);
//
// MultipleDvdIsoList
//
@ -105,8 +97,6 @@ namespace XenAdmin.Controls
this.Name = "MultipleDvdIsoList";
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.ResumeLayout(false);
}
@ -118,7 +108,6 @@ namespace XenAdmin.Controls
private System.Windows.Forms.ComboBox comboBoxDrive;
private System.Windows.Forms.Label newCDLabel;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.LinkLabel linkLabel1;
private System.Windows.Forms.LinkLabel linkLabelEject;
}
}

View File

@ -88,8 +88,8 @@ namespace XenAdmin.Controls
[Category("Appearance")]
public Color LinkLabelLinkColor
{
get => linkLabel1.LinkColor;
set => linkLabel1.LinkColor = value;
get => linkLabelEject.LinkColor;
set => linkLabelEject.LinkColor = value;
}
#endregion
@ -174,8 +174,7 @@ namespace XenAdmin.Controls
comboBoxDrive.Visible = false;
cdChanger1.Visible = false;
labelSingleDvd.Visible = false;
linkLabel1.Visible = false;
panel1.Visible = false;
linkLabelEject.Visible = false;
newCDLabel.Visible = VM != null && !VM.is_control_domain;
}
@ -187,17 +186,15 @@ namespace XenAdmin.Controls
labelSingleDvd.Visible = true;
tableLayoutPanel1.ColumnStyles[0].Width = labelSingleDvd.Width;
newCDLabel.Visible = false;
panel1.Visible = true;
linkLabel1.Visible = true;
linkLabelEject.Visible = true;
}
else
{
comboBoxDrive.Visible = true;
cdChanger1.Visible = true;
labelSingleDvd.Visible = false;
panel1.Visible = true;
newCDLabel.Visible = false;
linkLabel1.Visible = true;
linkLabelEject.Visible = true;
}
_inRefresh = false;
@ -279,7 +276,7 @@ namespace XenAdmin.Controls
});
}
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
private void linkLabelEject_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
if (cdChanger1.Drive != null)
cdChanger1.ChangeCD(null);

View File

@ -117,39 +117,30 @@
<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="labelSingleDvd.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Left</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="labelSingleDvd.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="labelSingleDvd.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="labelSingleDvd.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="labelSingleDvd.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 8</value>
</data>
<data name="labelSingleDvd.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 8, 3, 5</value>
</data>
<data name="labelSingleDvd.MaximumSize" type="System.Drawing.Size, System.Drawing">
<value>100, 23</value>
<value>3, 7</value>
</data>
<data name="labelSingleDvd.Size" type="System.Drawing.Size, System.Drawing">
<value>61, 15</value>
<value>61, 13</value>
</data>
<data name="labelSingleDvd.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
<value>0</value>
</data>
<data name="labelSingleDvd.Text" xml:space="preserve">
<value>DVD Dr&amp;ive:</value>
</data>
<data name="labelSingleDvd.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>TopRight</value>
</data>
<data name="&gt;&gt;labelSingleDvd.Name" xml:space="preserve">
<value>labelSingleDvd</value>
</data>
@ -162,65 +153,23 @@
<data name="&gt;&gt;labelSingleDvd.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="newCDLabel.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Left, Right</value>
</data>
<data name="newCDLabel.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="newCDLabel.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="newCDLabel.Font" type="System.Drawing.Font, System.Drawing">
<value>Microsoft Sans Serif, 8.25pt, style=Bold, Underline</value>
</data>
<data name="newCDLabel.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="newCDLabel.Location" type="System.Drawing.Point, System.Drawing">
<value>173, 30</value>
</data>
<data name="newCDLabel.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 2, 2, 0</value>
</data>
<data name="newCDLabel.Size" type="System.Drawing.Size, System.Drawing">
<value>942, 47</value>
</data>
<data name="newCDLabel.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="newCDLabel.Text" xml:space="preserve">
<value>Click here to create a DVD drive</value>
</data>
<data name="newCDLabel.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>MiddleLeft</value>
</data>
<data name="newCDLabel.Visible" type="System.Boolean, mscorlib">
<value>False</value>
</data>
<data name="&gt;&gt;newCDLabel.Name" xml:space="preserve">
<value>newCDLabel</value>
</data>
<data name="&gt;&gt;newCDLabel.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="&gt;&gt;newCDLabel.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;newCDLabel.ZOrder" xml:space="preserve">
<value>2</value>
<data name="tableLayoutPanel1.ColumnCount" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="comboBoxDrive.Location" type="System.Drawing.Point, System.Drawing">
<value>70, 4</value>
</data>
<data name="comboBoxDrive.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 4, 3, 3</value>
</data>
<data name="comboBoxDrive.MaximumSize" type="System.Drawing.Size, System.Drawing">
<value>120, 0</value>
<value>70, 3</value>
</data>
<data name="comboBoxDrive.Size" type="System.Drawing.Size, System.Drawing">
<value>100, 21</value>
</data>
<data name="comboBoxDrive.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
<value>1</value>
</data>
<data name="comboBoxDrive.Visible" type="System.Boolean, mscorlib">
<value>False</value>
@ -237,17 +186,8 @@
<data name="&gt;&gt;comboBoxDrive.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="tableLayoutPanel1.ColumnCount" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="panel1.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="panel1.AutoSizeMode" type="System.Windows.Forms.AutoSizeMode, System.Windows.Forms">
<value>GrowAndShrink</value>
</data>
<data name="cdChanger1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
<data name="cdChanger1.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Left, Right</value>
</data>
<data name="cdChanger1.IntegralHeight" type="System.Boolean, mscorlib">
<value>False</value>
@ -256,93 +196,57 @@
<value>15</value>
</data>
<data name="cdChanger1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 5</value>
<value>176, 3</value>
</data>
<data name="cdChanger1.Size" type="System.Drawing.Size, System.Drawing">
<value>907, 21</value>
<value>456, 21</value>
</data>
<data name="cdChanger1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
<value>2</value>
</data>
<data name="&gt;&gt;cdChanger1.Name" xml:space="preserve">
<value>cdChanger1</value>
</data>
<data name="&gt;&gt;cdChanger1.Type" xml:space="preserve">
<value>XenAdmin.Controls.CDChanger, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
<value>XenAdmin.Controls.CDChanger, [XenCenter], Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;cdChanger1.Parent" xml:space="preserve">
<value>panel1</value>
</data>
<data name="&gt;&gt;cdChanger1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="linkLabel1.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="linkLabel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Right</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>907, 5</value>
</data>
<data name="linkLabel1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 3, 3, 3</value>
</data>
<data name="linkLabel1.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>3, 5, 3, 3</value>
</data>
<data name="linkLabel1.Size" type="System.Drawing.Size, System.Drawing">
<value>37, 21</value>
</data>
<data name="linkLabel1.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="linkLabel1.Text" xml:space="preserve">
<value>Eject</value>
</data>
<data name="&gt;&gt;linkLabel1.Name" xml:space="preserve">
<value>linkLabel1</value>
</data>
<data name="&gt;&gt;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="&gt;&gt;linkLabel1.Parent" xml:space="preserve">
<value>panel1</value>
</data>
<data name="&gt;&gt;linkLabel1.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="panel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="panel1.Location" type="System.Drawing.Point, System.Drawing">
<value>173, 0</value>
</data>
<data name="panel1.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 0, 0</value>
</data>
<data name="panel1.Padding" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 5, 0, 5</value>
</data>
<data name="panel1.Size" type="System.Drawing.Size, System.Drawing">
<value>944, 28</value>
</data>
<data name="panel1.TabIndex" type="System.Int32, mscorlib">
<value>40</value>
</data>
<data name="&gt;&gt;panel1.Name" xml:space="preserve">
<value>panel1</value>
</data>
<data name="&gt;&gt;panel1.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;panel1.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;panel1.ZOrder" xml:space="preserve">
<data name="&gt;&gt;cdChanger1.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="linkLabelEject.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Left</value>
</data>
<data name="linkLabelEject.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="linkLabelEject.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="linkLabelEject.Location" type="System.Drawing.Point, System.Drawing">
<value>638, 7</value>
</data>
<data name="linkLabelEject.Size" type="System.Drawing.Size, System.Drawing">
<value>31, 13</value>
</data>
<data name="linkLabelEject.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="linkLabelEject.Text" xml:space="preserve">
<value>Eject</value>
</data>
<data name="&gt;&gt;linkLabelEject.Name" xml:space="preserve">
<value>linkLabelEject</value>
</data>
<data name="&gt;&gt;linkLabelEject.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="&gt;&gt;linkLabelEject.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;linkLabelEject.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="tableLayoutPanel1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
@ -355,10 +259,10 @@
<value>2</value>
</data>
<data name="tableLayoutPanel1.Size" type="System.Drawing.Size, System.Drawing">
<value>1117, 77</value>
<value>672, 77</value>
</data>
<data name="tableLayoutPanel1.TabIndex" type="System.Int32, mscorlib">
<value>40</value>
<value>0</value>
</data>
<data name="&gt;&gt;tableLayoutPanel1.Name" xml:space="preserve">
<value>tableLayoutPanel1</value>
@ -373,7 +277,43 @@
<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="labelSingleDvd" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="comboBoxDrive" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="newCDLabel" Row="1" RowSpan="1" Column="2" ColumnSpan="1" /&gt;&lt;Control Name="panel1" Row="0" RowSpan="1" Column="2" ColumnSpan="1" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,AutoSize,0,Percent,100,AutoSize,0" /&gt;&lt;Rows Styles="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="labelSingleDvd" Row="0" RowSpan="1" Column="0" ColumnSpan="1" /&gt;&lt;Control Name="comboBoxDrive" Row="0" RowSpan="1" Column="1" ColumnSpan="1" /&gt;&lt;Control Name="cdChanger1" Row="0" RowSpan="1" Column="2" ColumnSpan="1" /&gt;&lt;Control Name="linkLabelEject" Row="0" RowSpan="1" Column="3" ColumnSpan="1" /&gt;&lt;Control Name="newCDLabel" Row="1" RowSpan="1" Column="0" ColumnSpan="4" /&gt;&lt;/Controls&gt;&lt;Columns Styles="AutoSize,0,AutoSize,0,Percent,100,AutoSize,0" /&gt;&lt;Rows Styles="AutoSize,0,Percent,100" /&gt;&lt;/TableLayoutSettings&gt;</value>
</data>
<data name="newCDLabel.Font" type="System.Drawing.Font, System.Drawing">
<value>Microsoft Sans Serif, 8.25pt, style=Bold, Underline</value>
</data>
<data name="newCDLabel.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="newCDLabel.Location" type="System.Drawing.Point, System.Drawing">
<value>3, 45</value>
</data>
<data name="newCDLabel.Size" type="System.Drawing.Size, System.Drawing">
<value>666, 13</value>
</data>
<data name="newCDLabel.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="newCDLabel.Text" xml:space="preserve">
<value>Click here to create a DVD drive</value>
</data>
<data name="newCDLabel.TextAlign" type="System.Drawing.ContentAlignment, System.Drawing">
<value>TopCenter</value>
</data>
<data name="newCDLabel.Visible" type="System.Boolean, mscorlib">
<value>False</value>
</data>
<data name="&gt;&gt;newCDLabel.Name" xml:space="preserve">
<value>newCDLabel</value>
</data>
<data name="&gt;&gt;newCDLabel.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="&gt;&gt;newCDLabel.Parent" xml:space="preserve">
<value>tableLayoutPanel1</value>
</data>
<data name="&gt;&gt;newCDLabel.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
@ -382,7 +322,7 @@
<value>96, 96</value>
</data>
<data name="$this.Size" type="System.Drawing.Size, System.Drawing">
<value>1117, 77</value>
<value>672, 77</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>MultipleDvdIsoList</value>