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 refreshOnClose = false;
|
||||||
protected bool changing = false;
|
protected bool changing = false;
|
||||||
private IXenConnection _connection;
|
private IXenConnection _connection;
|
||||||
protected bool physicalOnly = false;
|
|
||||||
protected bool isoOnly = false;
|
|
||||||
protected bool empty = false;
|
|
||||||
private bool noTools = false;
|
private bool noTools = false;
|
||||||
|
|
||||||
private VDI selectedCD;
|
private VDI selectedCD;
|
||||||
@ -109,10 +106,10 @@ namespace XenAdmin.Controls
|
|||||||
if (sr.content_type != SR.Content_Type_ISO)
|
if (sr.content_type != SR.Content_Type_ISO)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (physicalOnly && !sr.Physical)
|
if (DisplayPhysical && !sr.Physical)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (isoOnly && (sr.Physical || (noTools && sr.IsToolsSR)))
|
if (DisplayISO && (sr.Physical || (noTools && sr.IsToolsSR)))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (vm == null && sr.IsBroken())
|
if (vm == null && sr.IsBroken())
|
||||||
@ -186,45 +183,13 @@ namespace XenAdmin.Controls
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: this means only physical. refactor to mean display physical
|
public bool DisplayPhysical { get; set; }
|
||||||
public bool Physical
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return physicalOnly;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
physicalOnly = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: this means only iso. refactor to mean display iso
|
public bool DisplayISO { get; set; }
|
||||||
public bool ISO
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return isoOnly;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
isoOnly = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool Empty
|
public bool Empty { get; set; }
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return empty;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
empty = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void AddSR(ToStringWrapper<SR> srWrapper)
|
private void AddSR(ToStringWrapper<SR> srWrapper)
|
||||||
{
|
{
|
||||||
Items.Add(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.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||||
this.cdChanger1.Empty = true;
|
this.cdChanger1.Empty = true;
|
||||||
this.cdChanger1.FormattingEnabled = true;
|
this.cdChanger1.FormattingEnabled = true;
|
||||||
this.cdChanger1.ISO = false;
|
this.cdChanger1.DisplayISO = false;
|
||||||
this.cdChanger1.Name = "cdChanger1";
|
this.cdChanger1.Name = "cdChanger1";
|
||||||
this.cdChanger1.Physical = false;
|
this.cdChanger1.DisplayPhysical = false;
|
||||||
this.cdChanger1.SelectedCD = null;
|
this.cdChanger1.SelectedCD = null;
|
||||||
this.cdChanger1.TheVM = null;
|
this.cdChanger1.TheVM = null;
|
||||||
//
|
//
|
||||||
|
@ -101,9 +101,9 @@ namespace XenAdmin.Wizards.NewVMWizard
|
|||||||
this.CdDropDownBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
this.CdDropDownBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||||
this.CdDropDownBox.Empty = false;
|
this.CdDropDownBox.Empty = false;
|
||||||
this.CdDropDownBox.FormattingEnabled = true;
|
this.CdDropDownBox.FormattingEnabled = true;
|
||||||
this.CdDropDownBox.ISO = false;
|
this.CdDropDownBox.DisplayISO = false;
|
||||||
this.CdDropDownBox.Name = "CdDropDownBox";
|
this.CdDropDownBox.Name = "CdDropDownBox";
|
||||||
this.CdDropDownBox.Physical = false;
|
this.CdDropDownBox.DisplayPhysical = false;
|
||||||
this.CdDropDownBox.SelectedCD = null;
|
this.CdDropDownBox.SelectedCD = null;
|
||||||
//
|
//
|
||||||
// UrlTextBox
|
// UrlTextBox
|
||||||
|
Loading…
Reference in New Issue
Block a user