mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-07-02 10:38:16 +00:00
Adds logic to only instantiate screensaver if mobile control is enabled on room
This commit is contained in:
parent
3d15227aa2
commit
1cf4039315
1 changed files with 15 additions and 8 deletions
|
|
@ -48,10 +48,8 @@ namespace PepperDash.Essentials
|
|||
// spin up different room drivers depending on room type
|
||||
var room = DeviceManager.GetDeviceForKey(roomKey);
|
||||
if (room is IEssentialsHuddleSpaceRoom)
|
||||
{
|
||||
// Screen Saver Driver
|
||||
|
||||
mainDriver.ScreenSaverController = new ScreenSaverController(mainDriver, _config);
|
||||
{
|
||||
SetupScreenSaver(room, mainDriver);
|
||||
|
||||
// Header Driver
|
||||
Debug.Console(0, this, "Adding header driver");
|
||||
|
|
@ -94,10 +92,9 @@ namespace PepperDash.Essentials
|
|||
}
|
||||
else if (room is IEssentialsHuddleVtc1Room)
|
||||
{
|
||||
Debug.Console(0, this, "Adding huddle space VTC AV driver");
|
||||
|
||||
// Screen Saver Driver
|
||||
mainDriver.ScreenSaverController = new ScreenSaverController(mainDriver, _config);
|
||||
Debug.Console(0, this, "Adding huddle space VTC AV driver");
|
||||
|
||||
SetupScreenSaver(room, mainDriver);
|
||||
|
||||
// Header Driver
|
||||
mainDriver.HeaderDriver = new EssentialsHeaderDriver(mainDriver, _config);
|
||||
|
|
@ -148,6 +145,16 @@ namespace PepperDash.Essentials
|
|||
Debug.Console(0, this, "ERROR: Cannot load AvFunctionsDriver for room '{0}'", roomKey);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void SetupScreenSaver(IKeyed room, EssentialsPanelMainInterfaceDriver mainDriver)
|
||||
{
|
||||
var huddleRoom = room as IEssentialsRoom;
|
||||
// Screen Saver Driver
|
||||
if (huddleRoom.IsMobileControlEnabled)
|
||||
{
|
||||
mainDriver.ScreenSaverController = new ScreenSaverController(mainDriver, _config);
|
||||
}
|
||||
}
|
||||
|
||||
public void LoadAndShowDriver(PanelDriverBase driver)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue