mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-23 12:30:50 +01:00
CP-36392: Remove duplicate field in MultipleDvdIsoList.cs
Also remove `VM` from designer Signed-off-by: Danilo Del Busso <Danilo.Del.Busso@citrix.com>
This commit is contained in:
parent
157fe77f8f
commit
a61f61d66f
1
XenAdmin/ConsoleView/VNCTabView.Designer.cs
generated
1
XenAdmin/ConsoleView/VNCTabView.Designer.cs
generated
@ -207,7 +207,6 @@ namespace XenAdmin.ConsoleView
|
|||||||
this.multipleDvdIsoList1.LabelSingleDvdForeColor = System.Drawing.SystemColors.ControlText;
|
this.multipleDvdIsoList1.LabelSingleDvdForeColor = System.Drawing.SystemColors.ControlText;
|
||||||
this.multipleDvdIsoList1.LinkLabelLinkColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(255)))));
|
this.multipleDvdIsoList1.LinkLabelLinkColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(255)))));
|
||||||
this.multipleDvdIsoList1.Name = "multipleDvdIsoList1";
|
this.multipleDvdIsoList1.Name = "multipleDvdIsoList1";
|
||||||
this.multipleDvdIsoList1.VM = null;
|
|
||||||
//
|
//
|
||||||
// pictureBox1
|
// pictureBox1
|
||||||
//
|
//
|
||||||
|
@ -51,23 +51,20 @@ namespace XenAdmin.Controls
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
private VM vm;
|
[Browsable(false)]
|
||||||
|
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
||||||
public VM VM
|
public VM VM
|
||||||
{
|
{
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
DeregisterEvents();
|
DeregisterEvents();
|
||||||
cdChanger1.VM = value;
|
cdChanger1.VM = value;
|
||||||
vm = value;
|
if (value != null)
|
||||||
if (vm != null)
|
cdChanger1.VM.PropertyChanged += vm_PropertyChanged;
|
||||||
vm.PropertyChanged += vm_PropertyChanged;
|
|
||||||
refreshDrives();
|
refreshDrives();
|
||||||
}
|
}
|
||||||
get
|
get => cdChanger1.VM;
|
||||||
{
|
|
||||||
return cdChanger1.VM;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Designer browsable properties
|
#region Designer browsable properties
|
||||||
@ -100,17 +97,17 @@ namespace XenAdmin.Controls
|
|||||||
|
|
||||||
internal virtual void DeregisterEvents()
|
internal virtual void DeregisterEvents()
|
||||||
{
|
{
|
||||||
if (vm == null)
|
if (VM == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// remove VM listeners
|
// remove VM listeners
|
||||||
vm.PropertyChanged -= vm_PropertyChanged;
|
VM.PropertyChanged -= vm_PropertyChanged;
|
||||||
|
|
||||||
// remove cache listener
|
// remove cache listener
|
||||||
vm.Connection.CachePopulated -= CachePopulatedMethod;
|
VM.Connection.CachePopulated -= CachePopulatedMethod;
|
||||||
|
|
||||||
// remove VBD listeners
|
// remove VBD listeners
|
||||||
var vbds = vm.Connection.ResolveAll(VM.VBDs);
|
var vbds = VM.Connection.ResolveAll(VM.VBDs);
|
||||||
|
|
||||||
foreach (var vbd in vbds.Where(vbd => vbd.IsCDROM() || vbd.IsFloppyDrive()))
|
foreach (var vbd in vbds.Where(vbd => vbd.IsCDROM() || vbd.IsFloppyDrive()))
|
||||||
{
|
{
|
||||||
@ -178,7 +175,7 @@ namespace XenAdmin.Controls
|
|||||||
labelSingleDvd.Visible = false;
|
labelSingleDvd.Visible = false;
|
||||||
linkLabel1.Visible = false;
|
linkLabel1.Visible = false;
|
||||||
panel1.Visible = false;
|
panel1.Visible = false;
|
||||||
newCDLabel.Visible = vm != null && !vm.is_control_domain;
|
newCDLabel.Visible = VM != null && !VM.is_control_domain;
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (comboBoxDrive.Items.Count == 1)
|
else if (comboBoxDrive.Items.Count == 1)
|
||||||
|
1
XenAdmin/TabPages/VMStoragePage.Designer.cs
generated
1
XenAdmin/TabPages/VMStoragePage.Designer.cs
generated
@ -348,7 +348,6 @@ namespace XenAdmin.TabPages
|
|||||||
this.multipleDvdIsoList1.LabelSingleDvdForeColor = System.Drawing.SystemColors.ControlText;
|
this.multipleDvdIsoList1.LabelSingleDvdForeColor = System.Drawing.SystemColors.ControlText;
|
||||||
this.multipleDvdIsoList1.LinkLabelLinkColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(255)))));
|
this.multipleDvdIsoList1.LinkLabelLinkColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(255)))));
|
||||||
this.multipleDvdIsoList1.Name = "multipleDvdIsoList1";
|
this.multipleDvdIsoList1.Name = "multipleDvdIsoList1";
|
||||||
this.multipleDvdIsoList1.VM = null;
|
|
||||||
//
|
//
|
||||||
// dataGridViewTextBoxColumn1
|
// dataGridViewTextBoxColumn1
|
||||||
//
|
//
|
||||||
|
Loading…
Reference in New Issue
Block a user