mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2025-01-20 07:19:18 +01:00
CP-17502: No directly related to this ticket, but I found myself in the ISO SR neighbourhood and did some minor refactoring.
This commit is contained in:
parent
0f908a674e
commit
bdbd9e1f55
@ -48,9 +48,6 @@ namespace XenAdmin.Controls
|
||||
protected bool refreshOnClose = false;
|
||||
protected bool changing = false;
|
||||
private IXenConnection _connection;
|
||||
protected bool physicalOnly = false;
|
||||
protected bool isoOnly = false;
|
||||
protected bool empty = false;
|
||||
private bool noTools = false;
|
||||
|
||||
private VDI selectedCD;
|
||||
@ -109,10 +106,10 @@ namespace XenAdmin.Controls
|
||||
if (sr.content_type != SR.Content_Type_ISO)
|
||||
continue;
|
||||
|
||||
if (physicalOnly && !sr.Physical)
|
||||
if (DisplayPhysical && !sr.Physical)
|
||||
continue;
|
||||
|
||||
if (isoOnly && (sr.Physical || (noTools && sr.IsToolsSR)))
|
||||
if (DisplayISO && (sr.Physical || (noTools && sr.IsToolsSR)))
|
||||
continue;
|
||||
|
||||
if (vm == null && sr.IsBroken())
|
||||
@ -186,45 +183,13 @@ namespace XenAdmin.Controls
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: this means only physical. refactor to mean display physical
|
||||
public bool Physical
|
||||
{
|
||||
get
|
||||
{
|
||||
return physicalOnly;
|
||||
}
|
||||
set
|
||||
{
|
||||
physicalOnly = value;
|
||||
}
|
||||
}
|
||||
public bool DisplayPhysical { get; set; }
|
||||
|
||||
// TODO: this means only iso. refactor to mean display iso
|
||||
public bool ISO
|
||||
{
|
||||
get
|
||||
{
|
||||
return isoOnly;
|
||||
}
|
||||
set
|
||||
{
|
||||
isoOnly = value;
|
||||
}
|
||||
}
|
||||
public bool DisplayISO { get; set; }
|
||||
|
||||
public bool Empty
|
||||
{
|
||||
get
|
||||
{
|
||||
return empty;
|
||||
}
|
||||
set
|
||||
{
|
||||
empty = value;
|
||||
}
|
||||
}
|
||||
public bool Empty { get; set; }
|
||||
|
||||
protected void AddSR(ToStringWrapper<SR> srWrapper)
|
||||
private void AddSR(ToStringWrapper<SR> srWrapper)
|
||||
{
|
||||
Items.Add(srWrapper);
|
||||
|
||||
|
4
XenAdmin/Controls/MultipleDvdIsoList.Designer.cs
generated
4
XenAdmin/Controls/MultipleDvdIsoList.Designer.cs
generated
@ -92,9 +92,9 @@ namespace XenAdmin.Controls
|
||||
this.cdChanger1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cdChanger1.Empty = true;
|
||||
this.cdChanger1.FormattingEnabled = true;
|
||||
this.cdChanger1.ISO = false;
|
||||
this.cdChanger1.DisplayISO = false;
|
||||
this.cdChanger1.Name = "cdChanger1";
|
||||
this.cdChanger1.Physical = false;
|
||||
this.cdChanger1.DisplayPhysical = false;
|
||||
this.cdChanger1.SelectedCD = null;
|
||||
this.cdChanger1.TheVM = null;
|
||||
//
|
||||
|
@ -101,9 +101,9 @@ namespace XenAdmin.Wizards.NewVMWizard
|
||||
this.CdDropDownBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.CdDropDownBox.Empty = false;
|
||||
this.CdDropDownBox.FormattingEnabled = true;
|
||||
this.CdDropDownBox.ISO = false;
|
||||
this.CdDropDownBox.DisplayISO = false;
|
||||
this.CdDropDownBox.Name = "CdDropDownBox";
|
||||
this.CdDropDownBox.Physical = false;
|
||||
this.CdDropDownBox.DisplayPhysical = false;
|
||||
this.CdDropDownBox.SelectedCD = null;
|
||||
//
|
||||
// UrlTextBox
|
||||
|
Loading…
Reference in New Issue
Block a user