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.LinkLabelLinkColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(255)))));
|
||||
this.multipleDvdIsoList1.Name = "multipleDvdIsoList1";
|
||||
this.multipleDvdIsoList1.VM = null;
|
||||
//
|
||||
// pictureBox1
|
||||
//
|
||||
|
@ -52,22 +52,19 @@ namespace XenAdmin.Controls
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private VM vm;
|
||||
[Browsable(false)]
|
||||
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
|
||||
public VM VM
|
||||
{
|
||||
set
|
||||
{
|
||||
DeregisterEvents();
|
||||
cdChanger1.VM = value;
|
||||
vm = value;
|
||||
if (vm != null)
|
||||
vm.PropertyChanged += vm_PropertyChanged;
|
||||
if (value != null)
|
||||
cdChanger1.VM.PropertyChanged += vm_PropertyChanged;
|
||||
refreshDrives();
|
||||
}
|
||||
get
|
||||
{
|
||||
return cdChanger1.VM;
|
||||
}
|
||||
get => cdChanger1.VM;
|
||||
}
|
||||
|
||||
#region Designer browsable properties
|
||||
@ -100,17 +97,17 @@ namespace XenAdmin.Controls
|
||||
|
||||
internal virtual void DeregisterEvents()
|
||||
{
|
||||
if (vm == null)
|
||||
if (VM == null)
|
||||
return;
|
||||
|
||||
// remove VM listeners
|
||||
vm.PropertyChanged -= vm_PropertyChanged;
|
||||
VM.PropertyChanged -= vm_PropertyChanged;
|
||||
|
||||
// remove cache listener
|
||||
vm.Connection.CachePopulated -= CachePopulatedMethod;
|
||||
VM.Connection.CachePopulated -= CachePopulatedMethod;
|
||||
|
||||
// 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()))
|
||||
{
|
||||
@ -178,7 +175,7 @@ namespace XenAdmin.Controls
|
||||
labelSingleDvd.Visible = false;
|
||||
linkLabel1.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)
|
||||
|
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.LinkLabelLinkColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(255)))));
|
||||
this.multipleDvdIsoList1.Name = "multipleDvdIsoList1";
|
||||
this.multipleDvdIsoList1.VM = null;
|
||||
//
|
||||
// dataGridViewTextBoxColumn1
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user