CP-40157: Move Description column to second place

Signed-off-by: Danilo Del Busso <danilo.delbusso@cloud.com>
This commit is contained in:
Danilo Del Busso 2023-02-08 09:19:49 +00:00
parent b8e1376d52
commit 0a14ece670
No known key found for this signature in database
GPG Key ID: 55F556F9A25CB037
3 changed files with 28 additions and 27 deletions

View File

@ -53,9 +53,9 @@
this.buttonEnable = new System.Windows.Forms.Button(); this.buttonEnable = new System.Windows.Forms.Button();
this.ColumnDisplayOnGraph = new System.Windows.Forms.DataGridViewCheckBoxColumn(); this.ColumnDisplayOnGraph = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.ColumnName = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.ColumnName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Description = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ColumnType = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.ColumnType = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ColumnEnabled = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.ColumnEnabled = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Description = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ColumnColour = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.ColumnColour = new System.Windows.Forms.DataGridViewTextBoxColumn();
((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView)).BeginInit();
this.tableLayoutPanel1.SuspendLayout(); this.tableLayoutPanel1.SuspendLayout();
@ -106,9 +106,9 @@
this.dataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.ColumnDisplayOnGraph, this.ColumnDisplayOnGraph,
this.ColumnName, this.ColumnName,
this.Description,
this.ColumnType, this.ColumnType,
this.ColumnEnabled, this.ColumnEnabled,
this.Description,
this.ColumnColour}); this.ColumnColour});
resources.ApplyResources(this.dataGridView, "dataGridView"); resources.ApplyResources(this.dataGridView, "dataGridView");
this.dataGridView.MultiSelect = false; this.dataGridView.MultiSelect = false;
@ -255,6 +255,13 @@
this.ColumnName.Name = "ColumnName"; this.ColumnName.Name = "ColumnName";
this.ColumnName.ReadOnly = true; this.ColumnName.ReadOnly = true;
// //
// Description
//
this.Description.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
resources.ApplyResources(this.Description, "Description");
this.Description.Name = "Description";
this.Description.ReadOnly = true;
//
// ColumnType // ColumnType
// //
this.ColumnType.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells; this.ColumnType.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells;
@ -268,12 +275,6 @@
this.ColumnEnabled.Name = "ColumnEnabled"; this.ColumnEnabled.Name = "ColumnEnabled";
this.ColumnEnabled.ReadOnly = true; this.ColumnEnabled.ReadOnly = true;
// //
// Description
//
resources.ApplyResources(this.Description, "Description");
this.Description.Name = "Description";
this.Description.ReadOnly = true;
//
// ColumnColour // ColumnColour
// //
this.ColumnColour.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None; this.ColumnColour.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
@ -331,9 +332,9 @@
private System.Windows.Forms.Button buttonClearAll; private System.Windows.Forms.Button buttonClearAll;
private System.Windows.Forms.DataGridViewCheckBoxColumn ColumnDisplayOnGraph; private System.Windows.Forms.DataGridViewCheckBoxColumn ColumnDisplayOnGraph;
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnName; private System.Windows.Forms.DataGridViewTextBoxColumn ColumnName;
private System.Windows.Forms.DataGridViewTextBoxColumn Description;
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnType; private System.Windows.Forms.DataGridViewTextBoxColumn ColumnType;
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnEnabled; private System.Windows.Forms.DataGridViewTextBoxColumn ColumnEnabled;
private System.Windows.Forms.DataGridViewTextBoxColumn Description;
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnColour; private System.Windows.Forms.DataGridViewTextBoxColumn ColumnColour;
} }
} }

View File

@ -399,9 +399,9 @@ namespace XenAdmin.Dialogs
{ {
private readonly DataGridViewCheckBoxCell _checkBoxCell = new DataGridViewCheckBoxCell(); private readonly DataGridViewCheckBoxCell _checkBoxCell = new DataGridViewCheckBoxCell();
private readonly DataGridViewTextBoxCell _dataSourceCell = new DataGridViewTextBoxCell(); private readonly DataGridViewTextBoxCell _dataSourceCell = new DataGridViewTextBoxCell();
private readonly DataGridViewTextBoxCell _nameDescription = new DataGridViewTextBoxCell();
private readonly DataGridViewTextBoxCell _typeCell = new DataGridViewTextBoxCell(); private readonly DataGridViewTextBoxCell _typeCell = new DataGridViewTextBoxCell();
private readonly DataGridViewTextBoxCell _enabledCell = new DataGridViewTextBoxCell(); private readonly DataGridViewTextBoxCell _enabledCell = new DataGridViewTextBoxCell();
private readonly DataGridViewTextBoxCell _nameDescription = new DataGridViewTextBoxCell();
private readonly DataGridViewTextBoxCell _colorCell = new DataGridViewTextBoxCell(); private readonly DataGridViewTextBoxCell _colorCell = new DataGridViewTextBoxCell();
public DataSourceGridViewRow(DataSourceItem dataSourceItem, bool displayOnGraph) public DataSourceGridViewRow(DataSourceItem dataSourceItem, bool displayOnGraph)
@ -410,12 +410,12 @@ namespace XenAdmin.Dialogs
_checkBoxCell.Value = displayOnGraph; _checkBoxCell.Value = displayOnGraph;
_dataSourceCell.Value = Dsi.ToString(); _dataSourceCell.Value = Dsi.ToString();
_nameDescription.Value = Dsi.DataSource.name_description;
_typeCell.Value = Dsi.Category.ToStringI18N(); _typeCell.Value = Dsi.Category.ToStringI18N();
_enabledCell.Value = Dsi.Enabled.ToYesNoStringI18n(); _enabledCell.Value = Dsi.Enabled.ToYesNoStringI18n();
_nameDescription.Value = Dsi.DataSource.name_description;
_colorCell.Value = Dsi.Color; _colorCell.Value = Dsi.Color;
Cells.AddRange(_checkBoxCell, _dataSourceCell, _typeCell, _enabledCell, _nameDescription, _colorCell); Cells.AddRange(_checkBoxCell, _dataSourceCell, _nameDescription, _typeCell, _enabledCell, _colorCell);
if (Dsi.Hidden) if (Dsi.Hidden)
DefaultCellStyle = new DataGridViewCellStyle DefaultCellStyle = new DataGridViewCellStyle

View File

@ -282,6 +282,15 @@
<data name="ColumnName.MinimumWidth" type="System.Int32, mscorlib"> <data name="ColumnName.MinimumWidth" type="System.Int32, mscorlib">
<value>100</value> <value>100</value>
</data> </data>
<metadata name="Description.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="Description.HeaderText" xml:space="preserve">
<value>Description</value>
</data>
<data name="Description.MinimumWidth" type="System.Int32, mscorlib">
<value>100</value>
</data>
<metadata name="ColumnType.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="ColumnType.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
@ -303,15 +312,6 @@
<data name="ColumnEnabled.Width" type="System.Int32, mscorlib"> <data name="ColumnEnabled.Width" type="System.Int32, mscorlib">
<value>74</value> <value>74</value>
</data> </data>
<metadata name="Description.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="Description.HeaderText" xml:space="preserve">
<value>Description</value>
</data>
<data name="Description.Width" type="System.Int32, mscorlib">
<value>92</value>
</data>
<metadata name="ColumnColour.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="ColumnColour.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
@ -798,6 +798,12 @@
<data name="&gt;&gt;ColumnName.Type" xml:space="preserve"> <data name="&gt;&gt;ColumnName.Type" xml:space="preserve">
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="&gt;&gt;Description.Name" xml:space="preserve">
<value>Description</value>
</data>
<data name="&gt;&gt;Description.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;ColumnType.Name" xml:space="preserve"> <data name="&gt;&gt;ColumnType.Name" xml:space="preserve">
<value>ColumnType</value> <value>ColumnType</value>
</data> </data>
@ -810,12 +816,6 @@
<data name="&gt;&gt;ColumnEnabled.Type" xml:space="preserve"> <data name="&gt;&gt;ColumnEnabled.Type" xml:space="preserve">
<value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="&gt;&gt;Description.Name" xml:space="preserve">
<value>Description</value>
</data>
<data name="&gt;&gt;Description.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;ColumnColour.Name" xml:space="preserve"> <data name="&gt;&gt;ColumnColour.Name" xml:space="preserve">
<value>ColumnColour</value> <value>ColumnColour</value>
</data> </data>