CA-148495: include recent changes.

This commit is contained in:
Peter Westlake 2014-10-13 13:25:50 +01:00
commit 2fe2cc709f
6 changed files with 14 additions and 14 deletions

View File

@ -286,12 +286,12 @@ namespace XenAdmin.Controls
private void connection_ConnectionStateChanged(object sender, EventArgs e) private void connection_ConnectionStateChanged(object sender, EventArgs e)
{ {
Program.Invoke(Parent, RefreshLists); Program.Invoke(Program.MainWindow, RefreshLists);
} }
private void connection_CachePopulated(object sender, EventArgs e) private void connection_CachePopulated(object sender, EventArgs e)
{ {
Program.Invoke(Parent, RefreshLists); Program.Invoke(Program.MainWindow, RefreshLists);
} }
private void XenConnections_CollectionChanged(object sender, CollectionChangeEventArgs e) private void XenConnections_CollectionChanged(object sender, CollectionChangeEventArgs e)

View File

@ -313,7 +313,7 @@ namespace XenAdmin.Controls.MainWindowControls
public void RequestRefreshTreeView() public void RequestRefreshTreeView()
{ {
Program.BeginInvoke(this, treeViewUpdateManager.RequestUpdate); Program.BeginInvoke(Program.MainWindow, treeViewUpdateManager.RequestUpdate);
} }
private void SuspendRefreshTreeView() private void SuspendRefreshTreeView()
@ -345,7 +345,7 @@ namespace XenAdmin.Controls.MainWindowControls
if (Disposing || IsDisposed || Program.Exiting) if (Disposing || IsDisposed || Program.Exiting)
return; return;
Program.Invoke(this, () => Program.Invoke(Program.MainWindow, () =>
{ {
if (ignoreRefreshTreeView > 0) if (ignoreRefreshTreeView > 0)
{ {

View File

@ -139,7 +139,7 @@ namespace XenAdmin.TabPages
// 4) Take the top n as set by the filters // 4) Take the top n as set by the filters
// 5) Add them to the control using the optimized AddRange() // 5) Add them to the control using the optimized AddRange()
Program.Invoke(this, SetFilterLabel); Program.Invoke(Program.MainWindow, SetFilterLabel);
List<Alert> alerts = Alert.NonDismissingAlerts; List<Alert> alerts = Alert.NonDismissingAlerts;
alerts.RemoveAll(FilterAlert); alerts.RemoveAll(FilterAlert);
@ -179,7 +179,7 @@ namespace XenAdmin.TabPages
alerts.RemoveRange(ALERT_CAP, alerts.Count - ALERT_CAP); alerts.RemoveRange(ALERT_CAP, alerts.Count - ALERT_CAP);
} }
Program.Invoke(this, delegate Program.Invoke(Program.MainWindow, delegate
{ {
List<DataGridViewRow> gridRows = new List<DataGridViewRow>(); List<DataGridViewRow> gridRows = new List<DataGridViewRow>();
log.Debug("Rebuilding alertList: Adding alert rows"); log.Debug("Rebuilding alertList: Adding alert rows");
@ -282,7 +282,7 @@ namespace XenAdmin.TabPages
private bool FilterAlert(Alert alert) private bool FilterAlert(Alert alert)
{ {
bool hide = false; bool hide = false;
Program.Invoke(this, () => Program.Invoke(Program.MainWindow, () =>
hide = toolStripDropDownButtonDateFilter.HideByDate(alert.Timestamp.ToLocalTime()) hide = toolStripDropDownButtonDateFilter.HideByDate(alert.Timestamp.ToLocalTime())
|| toolStripDropDownButtonServerFilter.HideByLocation(alert.HostUuid) || toolStripDropDownButtonServerFilter.HideByLocation(alert.HostUuid)
|| toolStripDropDownSeveritiesFilter.HideBySeverity(alert.Priority)); || toolStripDropDownSeveritiesFilter.HideBySeverity(alert.Priority));

View File

@ -121,7 +121,7 @@ namespace XenAdmin.TabPages
if (asyncAction != null) if (asyncAction != null)
asyncAction.RecomputeCanCancel(); asyncAction.RecomputeCanCancel();
Program.Invoke(this, () => Program.Invoke(Program.MainWindow, () =>
{ {
var row = FindRowFromAction(sender); var row = FindRowFromAction(sender);
if (row != null) if (row != null)
@ -203,7 +203,7 @@ namespace XenAdmin.TabPages
private bool FilterAction(ActionBase action) private bool FilterAction(ActionBase action)
{ {
bool hide = false; bool hide = false;
Program.Invoke(this, () => Program.Invoke(Program.MainWindow, () =>
hide = toolStripDdbFilterDates.HideByDate(action.Started) hide = toolStripDdbFilterDates.HideByDate(action.Started)
|| toolStripDdbFilterLocation.HideByLocation(action.GetApplicableHosts()) || toolStripDdbFilterLocation.HideByLocation(action.GetApplicableHosts())
|| toolStripDdbFilterStatus.HideByStatus(action)); || toolStripDdbFilterStatus.HideByStatus(action));

View File

@ -84,12 +84,12 @@ namespace XenAdmin.TabPages
private void UpdatesCollectionChanged(object sender, EventArgs e) private void UpdatesCollectionChanged(object sender, EventArgs e)
{ {
Program.Invoke(this, Rebuild); Program.Invoke(Program.MainWindow, Rebuild);
} }
private void CheckForUpdates_CheckForUpdatesStarted() private void CheckForUpdates_CheckForUpdatesStarted()
{ {
Program.Invoke(this, () => Program.Invoke(Program.MainWindow, () =>
{ {
checksQueue++; checksQueue++;
if (checksQueue > 1) if (checksQueue > 1)
@ -106,7 +106,7 @@ namespace XenAdmin.TabPages
private void CheckForUpdates_CheckForUpdatesCompleted(bool succeeded, string errorMessage) private void CheckForUpdates_CheckForUpdatesCompleted(bool succeeded, string errorMessage)
{ {
Program.Invoke(this, delegate Program.Invoke(Program.MainWindow, delegate
{ {
checksQueue--; checksQueue--;
toolStripButtonRefresh.Enabled = true; toolStripButtonRefresh.Enabled = true;
@ -258,7 +258,7 @@ namespace XenAdmin.TabPages
hosts = serverUpdate.DistinctHosts.Select(h => h.uuid).ToList(); hosts = serverUpdate.DistinctHosts.Select(h => h.uuid).ToList();
bool hide = false; bool hide = false;
Program.Invoke(this, () => Program.Invoke(Program.MainWindow, () =>
hide = toolStripDropDownButtonDateFilter.HideByDate(alert.Timestamp.ToLocalTime()) hide = toolStripDropDownButtonDateFilter.HideByDate(alert.Timestamp.ToLocalTime())
|| toolStripDropDownButtonServerFilter.HideByLocation(hosts)); || toolStripDropDownButtonServerFilter.HideByLocation(hosts));
return hide; return hide;

View File

@ -421,7 +421,7 @@ namespace XenAdmin.Wizards.RollingUpgradeWizard
foreach (DataGridViewRowUpgrade row in rowsForHost) foreach (DataGridViewRowUpgrade row in rowsForHost)
{ {
DataGridViewRowUpgrade closureRow = row; DataGridViewRowUpgrade closureRow = row;
Program.Invoke(this, () => closureRow.UpdateStatus(HostUpgradeState.Upgrading, plan.Status)); Program.Invoke(Program.MainWindow, () => closureRow.UpdateStatus(HostUpgradeState.Upgrading, plan.Status));
} }
} }