From e6dfddb98cd198df6d77c882a9bd6449bfcc2c1f Mon Sep 17 00:00:00 2001 From: Frezzle Date: Tue, 26 Jul 2016 11:31:00 +0100 Subject: [PATCH] [CP-16936] Implement GUI for viewing the PVS farms and PVS servers (read-only) Added event handlers for changes made to PVS server; it may end up calling Rebuild() twice but that's not a problem. Signed-off-by: Frezzle --- XenAdmin/Dialogs/PvsFarmDialog.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/XenAdmin/Dialogs/PvsFarmDialog.cs b/XenAdmin/Dialogs/PvsFarmDialog.cs index 482a93c96..9c6dea83f 100644 --- a/XenAdmin/Dialogs/PvsFarmDialog.cs +++ b/XenAdmin/Dialogs/PvsFarmDialog.cs @@ -64,11 +64,13 @@ namespace XenAdmin.Dialogs { UnregisterEventHandlers(); connection.Cache.RegisterBatchCollectionChanged(PvsFarmBatchCollectionChanged); + connection.Cache.RegisterBatchCollectionChanged(PvsServerBatchCollectionChanged); } private void UnregisterEventHandlers() { connection.Cache.DeregisterBatchCollectionChanged(PvsFarmBatchCollectionChanged); + connection.Cache.DeregisterBatchCollectionChanged(PvsServerBatchCollectionChanged); } private void PvsFarmBatchCollectionChanged(object sender, EventArgs e) @@ -76,6 +78,11 @@ namespace XenAdmin.Dialogs Program.Invoke(this, Rebuild); } + private void PvsServerBatchCollectionChanged(object sender, EventArgs e) + { + Program.Invoke(this, Rebuild); + } + protected override void OnClosing(CancelEventArgs e) { UnregisterEventHandlers();