mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-25 06:16:37 +01:00
[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 <frederico.mazzone@citrix.com>
This commit is contained in:
parent
6c7df810f3
commit
e6dfddb98c
@ -64,11 +64,13 @@ namespace XenAdmin.Dialogs
|
|||||||
{
|
{
|
||||||
UnregisterEventHandlers();
|
UnregisterEventHandlers();
|
||||||
connection.Cache.RegisterBatchCollectionChanged<PVS_farm>(PvsFarmBatchCollectionChanged);
|
connection.Cache.RegisterBatchCollectionChanged<PVS_farm>(PvsFarmBatchCollectionChanged);
|
||||||
|
connection.Cache.RegisterBatchCollectionChanged<PVS_server>(PvsServerBatchCollectionChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UnregisterEventHandlers()
|
private void UnregisterEventHandlers()
|
||||||
{
|
{
|
||||||
connection.Cache.DeregisterBatchCollectionChanged<PVS_farm>(PvsFarmBatchCollectionChanged);
|
connection.Cache.DeregisterBatchCollectionChanged<PVS_farm>(PvsFarmBatchCollectionChanged);
|
||||||
|
connection.Cache.DeregisterBatchCollectionChanged<PVS_server>(PvsServerBatchCollectionChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void PvsFarmBatchCollectionChanged(object sender, EventArgs e)
|
private void PvsFarmBatchCollectionChanged(object sender, EventArgs e)
|
||||||
@ -76,6 +78,11 @@ namespace XenAdmin.Dialogs
|
|||||||
Program.Invoke(this, Rebuild);
|
Program.Invoke(this, Rebuild);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void PvsServerBatchCollectionChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Program.Invoke(this, Rebuild);
|
||||||
|
}
|
||||||
|
|
||||||
protected override void OnClosing(CancelEventArgs e)
|
protected override void OnClosing(CancelEventArgs e)
|
||||||
{
|
{
|
||||||
UnregisterEventHandlers();
|
UnregisterEventHandlers();
|
||||||
|
Loading…
Reference in New Issue
Block a user