mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-04-13 20:47:04 +00:00
Updates from testing UI reconnecting to room after room properties update from Fusion
This commit is contained in:
parent
182326b3c5
commit
0406361d75
6 changed files with 43 additions and 7 deletions
|
|
@ -89,7 +89,9 @@ namespace PepperDash.Essentials.Fusion
|
||||||
if (!string.IsNullOrEmpty(roomInfo.Name))
|
if (!string.IsNullOrEmpty(roomInfo.Name))
|
||||||
{
|
{
|
||||||
Debug.Console(1, "Current Room Name: {0}. New Room Name: {1}", deviceConfig.Name, roomInfo.Name);
|
Debug.Console(1, "Current Room Name: {0}. New Room Name: {1}", deviceConfig.Name, roomInfo.Name);
|
||||||
|
// Set the name in config
|
||||||
deviceConfig.Name = roomInfo.Name;
|
deviceConfig.Name = roomInfo.Name;
|
||||||
|
|
||||||
Debug.Console(1, "Room Name Successfully Changed.");
|
Debug.Console(1, "Room Name Successfully Changed.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -722,6 +722,10 @@ namespace PepperDash.Essentials
|
||||||
CurrentRoom.CurrentVolumeControls.VolumeDown(state);
|
CurrentRoom.CurrentVolumeControls.VolumeDown(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Helper for property setter. Sets the panel to the given room, latching up all functionality
|
||||||
|
/// </summary>
|
||||||
public void RefreshCurrentRoom(EssentialsHuddleSpaceRoom room)
|
public void RefreshCurrentRoom(EssentialsHuddleSpaceRoom room)
|
||||||
{
|
{
|
||||||
if (_CurrentRoom != null)
|
if (_CurrentRoom != null)
|
||||||
|
|
@ -811,17 +815,27 @@ namespace PepperDash.Essentials
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Helper for property setter. Sets the panel to the given room, latching up all functionality
|
|
||||||
/// </summary>
|
|
||||||
void SetCurrentRoom(EssentialsHuddleSpaceRoom room)
|
void SetCurrentRoom(EssentialsHuddleSpaceRoom room)
|
||||||
{
|
{
|
||||||
if (_CurrentRoom == room) return;
|
if (_CurrentRoom == room) return;
|
||||||
// Disconnect current (probably never called)
|
// Disconnect current (probably never called)
|
||||||
|
|
||||||
|
room.ConfigChanged -= room_ConfigChanged;
|
||||||
|
room.ConfigChanged += room_ConfigChanged;
|
||||||
|
|
||||||
RefreshCurrentRoom(room);
|
RefreshCurrentRoom(room);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Fires when room config of current room has changed. Meant to refresh room values to propegate any updates to UI
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
void room_ConfigChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
RefreshCurrentRoom(_CurrentRoom);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// For room on/off changes
|
/// For room on/off changes
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
|
|
@ -877,10 +877,9 @@ namespace PepperDash.Essentials
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Helper for property setter. Sets the panel to the given room, latching up all functionality
|
/// Helper for property setter. Sets the panel to the given room, latching up all functionality
|
||||||
/// </summary>
|
/// </summary>
|
||||||
void SetCurrentRoom(EssentialsHuddleVtc1Room room)
|
void RefreshCurrentRoom(EssentialsHuddleVtc1Room room)
|
||||||
{
|
{
|
||||||
if (_CurrentRoom == room) return;
|
|
||||||
// Disconnect current (probably never called)
|
|
||||||
if (_CurrentRoom != null)
|
if (_CurrentRoom != null)
|
||||||
{
|
{
|
||||||
// Disconnect current room
|
// Disconnect current room
|
||||||
|
|
@ -950,6 +949,27 @@ namespace PepperDash.Essentials
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SetCurrentRoom(EssentialsHuddleVtc1Room room)
|
||||||
|
{
|
||||||
|
if (_CurrentRoom == room) return;
|
||||||
|
// Disconnect current (probably never called)
|
||||||
|
|
||||||
|
room.ConfigChanged -= room_ConfigChanged;
|
||||||
|
room.ConfigChanged += room_ConfigChanged;
|
||||||
|
|
||||||
|
RefreshCurrentRoom(room);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Fires when room config of current room has changed. Meant to refresh room values to propegate any updates to UI
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
void room_ConfigChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
RefreshCurrentRoom(_CurrentRoom);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
|
|
@ -1 +1 @@
|
||||||
Subproject commit 7422e08b5d09d7156a4f68848e9f24c3382b77db
|
Subproject commit 5f438394e02474347ed8c18c47e98b4e95bef3af
|
||||||
Loading…
Add table
Add a link
Reference in a new issue