mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2025-01-20 15:29:26 +01:00
Added option for three columns on the GeneralTabPage panels. Refactored methods adding entries.
Signed-off-by: Konstantina Chremmou <Konstantina.Chremmou@cloud.com>
This commit is contained in:
parent
1e89de1c7c
commit
f9198e477d
40
XenAdmin/Controls/PDSection.Designer.cs
generated
40
XenAdmin/Controls/PDSection.Designer.cs
generated
@ -30,10 +30,11 @@ namespace XenAdmin.Controls
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PDSection));
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
@ -43,6 +44,7 @@ namespace XenAdmin.Controls
|
||||
this.dataGridViewEx1 = new XenAdmin.Controls.DataGridViewEx.DataGridViewEx();
|
||||
this.KeyColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.ValueColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.ColumnNotes = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.panel1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.chevron)).BeginInit();
|
||||
this.contextMenuStrip1.SuspendLayout();
|
||||
@ -105,22 +107,23 @@ namespace XenAdmin.Controls
|
||||
this.dataGridViewEx1.ColumnHeadersVisible = false;
|
||||
this.dataGridViewEx1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||
this.KeyColumn,
|
||||
this.ValueColumn});
|
||||
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window;
|
||||
dataGridViewCellStyle3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||
dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Window;
|
||||
dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.ControlText;
|
||||
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
|
||||
this.dataGridViewEx1.DefaultCellStyle = dataGridViewCellStyle3;
|
||||
this.ValueColumn,
|
||||
this.ColumnNotes});
|
||||
dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||
dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Window;
|
||||
dataGridViewCellStyle4.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||
dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Window;
|
||||
dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.ControlText;
|
||||
dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
|
||||
this.dataGridViewEx1.DefaultCellStyle = dataGridViewCellStyle4;
|
||||
resources.ApplyResources(this.dataGridViewEx1, "dataGridViewEx1");
|
||||
this.dataGridViewEx1.GridColor = System.Drawing.SystemColors.Control;
|
||||
this.dataGridViewEx1.HideSelection = true;
|
||||
this.dataGridViewEx1.Name = "dataGridViewEx1";
|
||||
this.dataGridViewEx1.ReadOnly = true;
|
||||
dataGridViewCellStyle4.Padding = new System.Windows.Forms.Padding(5);
|
||||
this.dataGridViewEx1.RowsDefaultCellStyle = dataGridViewCellStyle4;
|
||||
dataGridViewCellStyle5.Padding = new System.Windows.Forms.Padding(5);
|
||||
this.dataGridViewEx1.RowsDefaultCellStyle = dataGridViewCellStyle5;
|
||||
this.dataGridViewEx1.ShowCellToolTips = false;
|
||||
this.dataGridViewEx1.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridViewEx1_CellContentClick);
|
||||
this.dataGridViewEx1.SelectionChanged += new System.EventHandler(this.dataGridViewEx1_SelectionChanged);
|
||||
@ -141,7 +144,6 @@ namespace XenAdmin.Controls
|
||||
//
|
||||
// ValueColumn
|
||||
//
|
||||
this.ValueColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
|
||||
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.TopLeft;
|
||||
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.ValueColumn.DefaultCellStyle = dataGridViewCellStyle2;
|
||||
@ -151,6 +153,17 @@ namespace XenAdmin.Controls
|
||||
this.ValueColumn.Resizable = System.Windows.Forms.DataGridViewTriState.False;
|
||||
this.ValueColumn.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
|
||||
//
|
||||
// ColumnNotes
|
||||
//
|
||||
this.ColumnNotes.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.DisplayedCellsExceptHeader;
|
||||
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.TopLeft;
|
||||
this.ColumnNotes.DefaultCellStyle = dataGridViewCellStyle3;
|
||||
resources.ApplyResources(this.ColumnNotes, "ColumnNotes");
|
||||
this.ColumnNotes.Name = "ColumnNotes";
|
||||
this.ColumnNotes.ReadOnly = true;
|
||||
this.ColumnNotes.Resizable = System.Windows.Forms.DataGridViewTriState.False;
|
||||
this.ColumnNotes.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
|
||||
//
|
||||
// PDSection
|
||||
//
|
||||
this.BackColor = System.Drawing.Color.Gainsboro;
|
||||
@ -179,5 +192,6 @@ namespace XenAdmin.Controls
|
||||
private System.Windows.Forms.ToolStripMenuItem copyToolStripMenuItem;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn KeyColumn;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn ValueColumn;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn ColumnNotes;
|
||||
}
|
||||
}
|
||||
|
@ -78,16 +78,19 @@ namespace XenAdmin.Controls
|
||||
public PDSection()
|
||||
{
|
||||
InitializeComponent();
|
||||
SetDefaultValues();
|
||||
Contract();
|
||||
|
||||
SectionTitle = Messages.PDSECTION_TITLE;
|
||||
IsExpanded = true;
|
||||
Collapse();
|
||||
MinimumSize = new Size(0, Height);
|
||||
|
||||
dataGridViewEx1.LostFocus += dataGridViewEx1_LostFocus;
|
||||
dataGridViewEx1.GotFocus += dataGridViewEx1_GotFocus;
|
||||
|
||||
if (!Application.RenderWithVisualStyles)
|
||||
{
|
||||
panel1.BackColor = SystemColors.Control;
|
||||
this.BackColor = SystemColors.ControlDark;
|
||||
BackColor = SystemColors.ControlDark;
|
||||
}
|
||||
}
|
||||
|
||||
@ -228,7 +231,7 @@ namespace XenAdmin.Controls
|
||||
private void panel1_MouseDoubleClick(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (IsExpanded)
|
||||
Contract();
|
||||
Collapse();
|
||||
else
|
||||
{
|
||||
Expand();
|
||||
@ -239,7 +242,7 @@ namespace XenAdmin.Controls
|
||||
private void chevron_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (IsExpanded)
|
||||
Contract();
|
||||
Collapse();
|
||||
else
|
||||
{
|
||||
Expand();
|
||||
@ -263,23 +266,14 @@ namespace XenAdmin.Controls
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private void SetDefaultValues()
|
||||
{
|
||||
SectionTitle = Messages.PDSECTION_TITLE;
|
||||
IsExpanded = true;
|
||||
}
|
||||
|
||||
private void RunCellCommandOrAction(DataGridViewCell cell)
|
||||
{
|
||||
if (cell == null)
|
||||
return;
|
||||
|
||||
var command = cell.Tag as Command;
|
||||
if (command != null)
|
||||
if (cell.Tag is Command command)
|
||||
command.Run();
|
||||
|
||||
var action = cell.Tag as Action;
|
||||
if (action != null)
|
||||
else if (cell.Tag is Action action)
|
||||
action.Invoke();
|
||||
}
|
||||
|
||||
@ -289,12 +283,12 @@ namespace XenAdmin.Controls
|
||||
{
|
||||
int newHeight = dataGridViewEx1.Rows.GetRowsHeight(DataGridViewElementStates.Visible);
|
||||
|
||||
int valueColWidth = dataGridViewEx1.Width - dataGridViewEx1.Columns[KeyColumn.Index].Width;
|
||||
int preferredValueColWidth =
|
||||
dataGridViewEx1.Columns[ValueColumn.Index].GetPreferredWidth(
|
||||
DataGridViewAutoSizeColumnMode.AllCells, true);
|
||||
int actualWidth = dataGridViewEx1.Width - KeyColumn.Width;
|
||||
|
||||
int horizontalScrollBarHeight = preferredValueColWidth - 1 >= valueColWidth
|
||||
int preferredWidth = ValueColumn.GetPreferredWidth(DataGridViewAutoSizeColumnMode.AllCells, true) +
|
||||
ColumnNotes.GetPreferredWidth(DataGridViewAutoSizeColumnMode.AllCells, true);
|
||||
|
||||
int horizontalScrollBarHeight = preferredWidth - 2 >= actualWidth
|
||||
? dataGridViewEx1.HorizontalScrollBarHeight
|
||||
: 0;
|
||||
|
||||
@ -321,15 +315,28 @@ namespace XenAdmin.Controls
|
||||
}
|
||||
}
|
||||
|
||||
private void AddRow(DataGridViewRow r)
|
||||
private void AddRow(DataGridViewCell keyCell, DataGridViewCell valueCell, DataGridViewCell noteCell, params ToolStripMenuItem[] contextMenuItems)
|
||||
{
|
||||
var r = new DataGridViewExRow();
|
||||
r.Cells.AddRange(keyCell, valueCell, noteCell ?? new DataGridViewTextBoxCell());
|
||||
r.Tag = contextMenuItems;
|
||||
|
||||
dataGridViewEx1.Rows.Add(r);
|
||||
|
||||
if (inLayout)
|
||||
return;
|
||||
|
||||
RefreshHeight();
|
||||
}
|
||||
|
||||
private static DataGridViewTextBoxCell CreateKeyCell(string key)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(key))
|
||||
key += Messages.GENERAL_PAGE_KVP_SEPARATOR;
|
||||
var cell = new DataGridViewTextBoxCell { Value = key };
|
||||
return cell;
|
||||
}
|
||||
|
||||
private void ToggleExpandedState(bool expand)
|
||||
{
|
||||
if (IsExpanded == expand)
|
||||
@ -346,113 +353,54 @@ namespace XenAdmin.Controls
|
||||
|
||||
#endregion
|
||||
|
||||
public void Contract()
|
||||
public void Collapse()
|
||||
{
|
||||
ToggleExpandedState(false);
|
||||
}
|
||||
|
||||
public void Expand()
|
||||
{
|
||||
ValueColumn.MinimumWidth = 5;
|
||||
HelpersGUI.ResizeGridViewColumnToAllCells(ValueColumn);
|
||||
ToggleExpandedState(true);
|
||||
}
|
||||
|
||||
private DataGridViewExRow CreateRow(string Key, string Value)
|
||||
public void AddEntry(string key, string value, params ToolStripMenuItem[] contextMenuItems)
|
||||
{
|
||||
if (!String.IsNullOrEmpty(Key))
|
||||
Key += Messages.GENERAL_PAGE_KVP_SEPARATOR;
|
||||
DataGridViewExRow r = new DataGridViewExRow();
|
||||
r.CreateCells(dataGridViewEx1);
|
||||
r.Cells[0].Value = Key;
|
||||
r.Cells[1].Value = Value;
|
||||
return r;
|
||||
var valueCell = new DataGridViewTextBoxCell { Value = value };
|
||||
AddRow(CreateKeyCell(key), valueCell, null, contextMenuItems);
|
||||
}
|
||||
|
||||
|
||||
public void AddEntry(string Key, string Value, params ToolStripMenuItem[] contextMenuItems)
|
||||
public void AddEntry(string key, string value, Color fontColor, params ToolStripMenuItem[] contextMenuItems)
|
||||
{
|
||||
var r = CreateRow(Key, Value);
|
||||
r.Tag = contextMenuItems;
|
||||
AddRow(r);
|
||||
var valueCell = new DataGridViewTextBoxCell { Value = value };
|
||||
AddRow(CreateKeyCell(key), valueCell, null, contextMenuItems);
|
||||
valueCell.Style.ForeColor = fontColor;
|
||||
}
|
||||
|
||||
public void AddEntry(string Key, string Value, string toolTipText, params ToolStripMenuItem[] contextMenuItems)
|
||||
public void AddEntry(string key, FolderListItem value, params ToolStripMenuItem[] contextMenuItems)
|
||||
{
|
||||
AddEntry(Key, Value, contextMenuItems);
|
||||
if (toolTipText != Key)
|
||||
dataGridViewEx1.Rows[dataGridViewEx1.RowCount - 1].Cells[0].ToolTipText = toolTipText;
|
||||
var valueCell = new FolderCell(value); // CA-33311
|
||||
AddRow(CreateKeyCell(key), valueCell, null, contextMenuItems);
|
||||
}
|
||||
|
||||
public void AddEntry(string Key, string Value, Color fontColor)
|
||||
internal void AddEntryLink(string key, string value, Command command, params ToolStripMenuItem[] contextMenuItems)
|
||||
{
|
||||
var r = CreateRow(Key, Value);
|
||||
r.Cells[1].Style.ForeColor = fontColor;
|
||||
AddRow(r);
|
||||
dataGridViewEx1.DefaultCellStyle = new DataGridViewCellStyle();
|
||||
var valueCell = new DataGridViewLinkCell { Value = value, Tag = command };
|
||||
AddRow(CreateKeyCell(key), valueCell, null, contextMenuItems);
|
||||
}
|
||||
|
||||
public void AddEntry(string Key, string Value, Color fontColor, params ToolStripMenuItem[] contextMenuItems)
|
||||
internal void AddEntryLink(string key, string value, Action action, params ToolStripMenuItem[] contextMenuItems)
|
||||
{
|
||||
var r = CreateRow(Key, Value);
|
||||
r.Cells[1].Style.ForeColor = fontColor;
|
||||
r.Tag = contextMenuItems;
|
||||
AddRow(r);
|
||||
dataGridViewEx1.DefaultCellStyle = new DataGridViewCellStyle();
|
||||
var valueCell = new DataGridViewLinkCell { Value = value, Tag = action };
|
||||
AddRow(CreateKeyCell(key), valueCell, null, contextMenuItems);
|
||||
}
|
||||
|
||||
public void AddEntry(string Key, FolderListItem Value, params ToolStripMenuItem[] contextMenuItems)
|
||||
internal void AddEntryWithNoteLink(string key, string value, string note, Action action, params ToolStripMenuItem[] contextMenuItems)
|
||||
{
|
||||
// Special case for folders: CA-33311
|
||||
|
||||
if (!String.IsNullOrEmpty(Key))
|
||||
Key += Messages.GENERAL_PAGE_KVP_SEPARATOR;
|
||||
DataGridViewExRow r = new DataGridViewExRow();
|
||||
r.Cells.Add(new DataGridViewTextBoxCell());
|
||||
r.Cells[0].Value = Key;
|
||||
r.Cells.Add(new FolderCell(Value));
|
||||
r.Tag = contextMenuItems;
|
||||
AddRow(r);
|
||||
var valueCell = new DataGridViewTextBoxCell { Value = value };
|
||||
var noteCell = new DataGridViewLinkCell { Value = note, Tag = action };
|
||||
AddRow(CreateKeyCell(key), valueCell, noteCell, contextMenuItems);
|
||||
}
|
||||
|
||||
public void AddEntry(string Key, string Value, bool visible, params ToolStripMenuItem[] contextMenuItems)
|
||||
{
|
||||
var r = CreateRow(Key, Value);
|
||||
r.Tag = contextMenuItems;
|
||||
r.Visible = visible;
|
||||
AddRow(r);
|
||||
}
|
||||
|
||||
|
||||
internal void AddEntryLink(string Key, string Value, Command command, params ToolStripMenuItem[] contextMenuItems)
|
||||
{
|
||||
if (!String.IsNullOrEmpty(Key))
|
||||
Key += Messages.GENERAL_PAGE_KVP_SEPARATOR;
|
||||
DataGridViewExRow r = new DataGridViewExRow();
|
||||
r.CreateCells(dataGridViewEx1);
|
||||
r.Cells[0].Value = Key;
|
||||
r.Cells[1] = new DataGridViewLinkCell();
|
||||
r.Cells[1].Value = Value;
|
||||
r.Cells[1].Tag = command;
|
||||
r.Tag = contextMenuItems;
|
||||
AddRow(r);
|
||||
}
|
||||
|
||||
internal void AddEntryLink(string Key, string Value, Action action, params ToolStripMenuItem[] contextMenuItems)
|
||||
{
|
||||
if (!String.IsNullOrEmpty(Key))
|
||||
Key += Messages.GENERAL_PAGE_KVP_SEPARATOR;
|
||||
DataGridViewExRow r = new DataGridViewExRow();
|
||||
r.CreateCells(dataGridViewEx1);
|
||||
r.Cells[0].Value = Key;
|
||||
r.Cells[1] = new DataGridViewLinkCell();
|
||||
r.Cells[1].Value = Value;
|
||||
r.Cells[1].Tag = action;
|
||||
r.Tag = contextMenuItems;
|
||||
AddRow(r);
|
||||
}
|
||||
|
||||
|
||||
public void UpdateEntryValueWithKey(string Key, string newValue, bool visible)
|
||||
{
|
||||
List<DataGridViewExRow> matchingRows = (from DataGridViewExRow row in dataGridViewEx1.Rows
|
||||
@ -471,7 +419,7 @@ namespace XenAdmin.Controls
|
||||
}
|
||||
}
|
||||
|
||||
internal void fixFirstColumnWidth(int width)
|
||||
internal void FixFirstColumnWidth(int width)
|
||||
{
|
||||
dataGridViewEx1.Columns[0].Width = width;
|
||||
}
|
||||
|
@ -273,6 +273,15 @@
|
||||
<data name="ValueColumn.HeaderText" xml:space="preserve">
|
||||
<value>Value</value>
|
||||
</data>
|
||||
<metadata name="ColumnNotes.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="ColumnNotes.HeaderText" xml:space="preserve">
|
||||
<value>Notes</value>
|
||||
</data>
|
||||
<data name="ColumnNotes.Width" type="System.Int32, mscorlib">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="dataGridViewEx1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
</data>
|
||||
@ -292,7 +301,7 @@
|
||||
<value>dataGridViewEx1</value>
|
||||
</data>
|
||||
<data name=">>dataGridViewEx1.Type" xml:space="preserve">
|
||||
<value>XenAdmin.Controls.DataGridViewEx.DataGridViewEx, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>XenAdmin.Controls.DataGridViewEx.DataGridViewEx, [XenCenter_No_Space], Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
<data name=">>dataGridViewEx1.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
@ -330,6 +339,12 @@
|
||||
<data name=">>ValueColumn.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=">>ColumnNotes.Name" xml:space="preserve">
|
||||
<value>ColumnNotes</value>
|
||||
</data>
|
||||
<data name=">>ColumnNotes.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=">>$this.Name" xml:space="preserve">
|
||||
<value>PDSection</value>
|
||||
</data>
|
||||
|
@ -538,9 +538,8 @@ namespace XenAdmin.TabPages
|
||||
}
|
||||
};
|
||||
|
||||
CustomFieldWrapper cfWrapper = new CustomFieldWrapper(xenObject, customField.Definition);
|
||||
|
||||
s.AddEntry(customField.Definition.Name.Ellipsise(30), cfWrapper.ToString(), customField.Definition.Name, editValue);
|
||||
var cfWrapper = new CustomFieldWrapper(xenObject, customField.Definition);
|
||||
s.AddEntry(customField.Definition.Name, cfWrapper.ToString(), editValue);
|
||||
}
|
||||
}
|
||||
|
||||
@ -754,10 +753,10 @@ namespace XenAdmin.TabPages
|
||||
continue;
|
||||
|
||||
if (repairable)
|
||||
s.AddEntry(" " + Helpers.GetName(host).Ellipsise(30),
|
||||
s.AddEntry(Helpers.GetName(host).Ellipsise(30),
|
||||
Messages.REPAIR_SR_DIALOG_CONNECTION_MISSING, Color.Red, repairItem);
|
||||
else
|
||||
s.AddEntry(" " + Helpers.GetName(host).Ellipsise(30),
|
||||
s.AddEntry(Helpers.GetName(host).Ellipsise(30),
|
||||
Messages.REPAIR_SR_DIALOG_CONNECTION_MISSING, Color.Red);
|
||||
|
||||
continue;
|
||||
@ -1017,9 +1016,10 @@ namespace XenAdmin.TabPages
|
||||
var ss = new GeneralTabLicenseStatusStringifier(licenseStatus);
|
||||
s.AddEntry(Messages.LICENSE_STATUS,
|
||||
licenseStatus.Updated ? ss.ExpiryStatus : Messages.GENERAL_LICENSE_QUERYING, editItem);
|
||||
|
||||
if (ss.ShowExpiryDate)
|
||||
s.AddEntry(FriendlyName("host.license_params-expiry"),
|
||||
licenseStatus.Updated ? ss.ExpiryDate : Messages.GENERAL_LICENSE_QUERYING,
|
||||
ss.ShowExpiryDate,
|
||||
editItem);
|
||||
}
|
||||
|
||||
@ -2110,7 +2110,7 @@ namespace XenAdmin.TabPages
|
||||
if (expand(s))
|
||||
s.Expand();
|
||||
else
|
||||
s.Contract();
|
||||
s.Collapse();
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
@ -84,7 +84,7 @@ namespace XenAdmin.TabPages
|
||||
InitializeComponent();
|
||||
|
||||
base.Text = Messages.WORKLOAD_BALANCING;
|
||||
pdSectionConfiguration.fixFirstColumnWidth(200);
|
||||
pdSectionConfiguration.FixFirstColumnWidth(200);
|
||||
|
||||
RefreshControls();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user