Removed overrides that were doing the same as the base class methods.

Signed-off-by: Konstantina Chremmou <konstantina.chremmou@citrix.com>
This commit is contained in:
Konstantina Chremmou 2021-05-19 11:59:05 +01:00
parent 04c42158f8
commit 26abbcd615
3 changed files with 22 additions and 53 deletions

View File

@ -54,7 +54,7 @@ namespace XenAdmin.Controls
if (cdrom != null)
cdrom.PropertyChanged += cdrom_PropertyChanged;
refreshAll();
RefreshAll();
}
}
@ -78,20 +78,6 @@ namespace XenAdmin.Controls
}
}
protected override void RefreshSRs()
{
BeginUpdate();
try
{
Items.Clear();
base.RefreshSRs();
}
finally
{
EndUpdate();
}
}
public override void SelectCD()
{
if (cdrom == null || cdrom.empty || cdrom.VDI == null)
@ -104,20 +90,6 @@ namespace XenAdmin.Controls
base.SelectCD();
}
public override void refreshAll()
{
if (!DroppedDown)
{
RefreshSRs();
SelectCD();
refreshOnClose = false;
}
else
{
refreshOnClose = true;
}
}
protected override void OnSelectionChangeCommitted(EventArgs e)
{
// let the base class take care of skipping the SR headings (CA-40779)

View File

@ -75,21 +75,7 @@ namespace XenAdmin.Controls
base.Dispose(disposing);
}
private void RefreshSRs_()
{
BeginUpdate();
try
{
Items.Clear();
RefreshSRs();
}
finally
{
EndUpdate();
}
}
protected virtual void RefreshSRs()
private void RefreshSRs()
{
Program.AssertOnEventThread();
@ -251,7 +237,7 @@ namespace XenAdmin.Controls
if (connection != null)
{
RegisterEvents();
refreshAll();
RefreshAll();
}
}
get
@ -320,14 +306,25 @@ namespace XenAdmin.Controls
sr.PropertyChanged += sr_PropertyChanged;
}
Program.Invoke(this, refreshAll);
Program.Invoke(this, RefreshAll);
}
public virtual void refreshAll()
public void RefreshAll()
{
if (!DroppedDown)
{
RefreshSRs_();
BeginUpdate();
try
{
Items.Clear();
RefreshSRs();
}
finally
{
EndUpdate();
}
SelectCD();
refreshOnClose = false;
}
@ -341,7 +338,7 @@ namespace XenAdmin.Controls
{
if (e.PropertyName == "VDIs" || e.PropertyName == "PBDs")
{
refreshAll();
RefreshAll();
}
}
@ -349,7 +346,7 @@ namespace XenAdmin.Controls
{
if (e.PropertyName == "currently_attached")
{
refreshAll();
RefreshAll();
}
}
@ -365,7 +362,7 @@ namespace XenAdmin.Controls
{
if (e.PropertyName == "VBDs" || e.PropertyName == "resident_on" || e.PropertyName == "affinity")
{
refreshAll();
RefreshAll();
}
}
@ -411,7 +408,7 @@ namespace XenAdmin.Controls
base.OnDropDownClosed(e);
if (refreshOnClose)
refreshAll();
RefreshAll();
}
protected override bool IsItemNonSelectable(object o)

View File

@ -173,7 +173,7 @@ namespace XenAdmin.Wizards.NewVMWizard
{
CdDropDownBox.vm = m_template;
CdDropDownBox.refreshAll();
CdDropDownBox.RefreshAll();
RegisterBespokeEventsAgainstCdDropDownBox();