mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 20:54:55 +00:00
revisiting inheritance
This commit is contained in:
@@ -449,7 +449,7 @@ namespace PepperDash.Essentials
|
|||||||
var room = EssentialsRoomConfigHelper.GetRoomObject(roomConfig) as EssentialsRoomBase;
|
var room = EssentialsRoomConfigHelper.GetRoomObject(roomConfig) as EssentialsRoomBase;
|
||||||
if (room == null)
|
if (room == null)
|
||||||
{
|
{
|
||||||
Debug.Console(0, Debug.ErrorLogLevel.Notice, "WARNING: Cannot create room from config, key '{0}'", roomConfig.Key);'
|
Debug.Console(0, Debug.ErrorLogLevel.Notice, "WARNING: Cannot create room from config, key '{0}'", roomConfig.Key);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -155,6 +155,7 @@
|
|||||||
<Compile Include="UIDrivers\Environment Drivers\EssentialsShadeDriver.cs" />
|
<Compile Include="UIDrivers\Environment Drivers\EssentialsShadeDriver.cs" />
|
||||||
<Compile Include="UIDrivers\EssentialsDualDisplay\EssentialsDualDisplayPanelAvFunctionsDriver.cs" />
|
<Compile Include="UIDrivers\EssentialsDualDisplay\EssentialsDualDisplayPanelAvFunctionsDriver.cs" />
|
||||||
<Compile Include="UIDrivers\Essentials\EssentialsHeaderDriver.cs" />
|
<Compile Include="UIDrivers\Essentials\EssentialsHeaderDriver.cs" />
|
||||||
|
<Compile Include="UIDrivers\IHasCalendarButton.cs" />
|
||||||
<Compile Include="UIDrivers\JoinedSigInterlock.cs" />
|
<Compile Include="UIDrivers\JoinedSigInterlock.cs" />
|
||||||
<Compile Include="UIDrivers\SigInterlock.cs" />
|
<Compile Include="UIDrivers\SigInterlock.cs" />
|
||||||
<Compile Include="UIDrivers\EssentialsHuddle\EssentialsHuddleTechPageDriver.cs" />
|
<Compile Include="UIDrivers\EssentialsHuddle\EssentialsHuddleTechPageDriver.cs" />
|
||||||
|
|||||||
@@ -231,8 +231,10 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
// AV Driver
|
// AV Driver
|
||||||
Debug.Console(0, panelController, "Adding huddle space AV driver");
|
Debug.Console(0, panelController, "Adding huddle space AV driver");
|
||||||
var avDriver = new EssentialsHuddlePanelAvFunctionsDriver(mainDriver, props);
|
var avDriver = new EssentialsHuddlePanelAvFunctionsDriver(mainDriver, props)
|
||||||
avDriver.DefaultRoomKey = props.DefaultRoomKey;
|
{
|
||||||
|
DefaultRoomKey = props.DefaultRoomKey
|
||||||
|
};
|
||||||
mainDriver.AvDriver = avDriver;
|
mainDriver.AvDriver = avDriver;
|
||||||
avDriver.CurrentRoom = room as EssentialsHuddleSpaceRoom;
|
avDriver.CurrentRoom = room as EssentialsHuddleSpaceRoom;
|
||||||
|
|
||||||
@@ -249,24 +251,25 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
panelController.LoadAndShowDriver(mainDriver); // This is a little convoluted.
|
panelController.LoadAndShowDriver(mainDriver); // This is a little convoluted.
|
||||||
|
|
||||||
if (panelController.Panel is TswFt5ButtonSystem)
|
if (!(panelController.Panel is TswFt5ButtonSystem))
|
||||||
{
|
{
|
||||||
var tsw = panelController.Panel as TswFt5ButtonSystem;
|
return;
|
||||||
// Wire up hard keys
|
|
||||||
tsw.Power.UserObject = new Action<bool>(b => { if (!b) avDriver.PowerButtonPressed(); });
|
|
||||||
//tsw.Home.UserObject = new Action<bool>(b => { if (!b) HomePressed(); });
|
|
||||||
if (mainDriver.EnvironmentDriver != null)
|
|
||||||
tsw.Lights.UserObject = new Action<bool>(b =>
|
|
||||||
{
|
|
||||||
if (!b)
|
|
||||||
{
|
|
||||||
//mainDriver.AvDriver.PopupInterlock.ShowInterlockedWithToggle(mainDriver.EnvironmentDriver.BackgroundSubpageJoin);
|
|
||||||
mainDriver.EnvironmentDriver.Toggle();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
tsw.Up.UserObject = new Action<bool>(avDriver.VolumeUpPress);
|
|
||||||
tsw.Down.UserObject = new Action<bool>(avDriver.VolumeDownPress);
|
|
||||||
}
|
}
|
||||||
|
var tsw = panelController.Panel as TswFt5ButtonSystem;
|
||||||
|
// Wire up hard keys
|
||||||
|
tsw.Power.UserObject = new Action<bool>(b => { if (!b) avDriver.PowerButtonPressed(); });
|
||||||
|
//tsw.Home.UserObject = new Action<bool>(b => { if (!b) HomePressed(); });
|
||||||
|
if (mainDriver.EnvironmentDriver != null)
|
||||||
|
tsw.Lights.UserObject = new Action<bool>(b =>
|
||||||
|
{
|
||||||
|
if (!b)
|
||||||
|
{
|
||||||
|
//mainDriver.AvDriver.PopupInterlock.ShowInterlockedWithToggle(mainDriver.EnvironmentDriver.BackgroundSubpageJoin);
|
||||||
|
mainDriver.EnvironmentDriver.Toggle();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
tsw.Up.UserObject = new Action<bool>(avDriver.VolumeUpPress);
|
||||||
|
tsw.Down.UserObject = new Action<bool>(avDriver.VolumeDownPress);
|
||||||
}
|
}
|
||||||
else if (room is EssentialsHuddleVtc1Room)
|
else if (room is EssentialsHuddleVtc1Room)
|
||||||
{
|
{
|
||||||
@@ -278,7 +281,7 @@ namespace PepperDash.Essentials
|
|||||||
// AV Driver
|
// AV Driver
|
||||||
var avDriver = new EssentialsHuddleVtc1PanelAvFunctionsDriver(mainDriver, props);
|
var avDriver = new EssentialsHuddleVtc1PanelAvFunctionsDriver(mainDriver, props);
|
||||||
|
|
||||||
var codecDriver = new PepperDash.Essentials.UIDrivers.VC.EssentialsVideoCodecUiDriver(panelController.Panel, avDriver,
|
var codecDriver = new UIDrivers.VC.EssentialsVideoCodecUiDriver(panelController.Panel, avDriver,
|
||||||
(room as EssentialsHuddleVtc1Room).VideoCodec, mainDriver.HeaderDriver);
|
(room as EssentialsHuddleVtc1Room).VideoCodec, mainDriver.HeaderDriver);
|
||||||
avDriver.SetVideoCodecDriver(codecDriver);
|
avDriver.SetVideoCodecDriver(codecDriver);
|
||||||
avDriver.DefaultRoomKey = props.DefaultRoomKey;
|
avDriver.DefaultRoomKey = props.DefaultRoomKey;
|
||||||
@@ -298,24 +301,25 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
panelController.LoadAndShowDriver(mainDriver); // This is a little convoluted.
|
panelController.LoadAndShowDriver(mainDriver); // This is a little convoluted.
|
||||||
|
|
||||||
if (panelController.Panel is TswFt5ButtonSystem)
|
if (!(panelController.Panel is TswFt5ButtonSystem))
|
||||||
{
|
{
|
||||||
var tsw = panelController.Panel as TswFt5ButtonSystem;
|
return;
|
||||||
// Wire up hard keys
|
|
||||||
tsw.Power.UserObject = new Action<bool>(b => { if (!b) avDriver.EndMeetingPress(); });
|
|
||||||
//tsw.Home.UserObject = new Action<bool>(b => { if (!b) HomePressed(); });
|
|
||||||
if (mainDriver.EnvironmentDriver != null)
|
|
||||||
tsw.Lights.UserObject = new Action<bool>(b =>
|
|
||||||
{
|
|
||||||
if (!b)
|
|
||||||
{
|
|
||||||
//mainDriver.AvDriver.PopupInterlock.ShowInterlockedWithToggle(mainDriver.EnvironmentDriver.BackgroundSubpageJoin);
|
|
||||||
mainDriver.EnvironmentDriver.Toggle();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
tsw.Up.UserObject = new Action<bool>(avDriver.VolumeUpPress);
|
|
||||||
tsw.Down.UserObject = new Action<bool>(avDriver.VolumeDownPress);
|
|
||||||
}
|
}
|
||||||
|
var tsw = panelController.Panel as TswFt5ButtonSystem;
|
||||||
|
// Wire up hard keys
|
||||||
|
tsw.Power.UserObject = new Action<bool>(b => { if (!b) avDriver.EndMeetingPress(); });
|
||||||
|
//tsw.Home.UserObject = new Action<bool>(b => { if (!b) HomePressed(); });
|
||||||
|
if (mainDriver.EnvironmentDriver != null)
|
||||||
|
tsw.Lights.UserObject = new Action<bool>(b =>
|
||||||
|
{
|
||||||
|
if (!b)
|
||||||
|
{
|
||||||
|
//mainDriver.AvDriver.PopupInterlock.ShowInterlockedWithToggle(mainDriver.EnvironmentDriver.BackgroundSubpageJoin);
|
||||||
|
mainDriver.EnvironmentDriver.Toggle();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
tsw.Up.UserObject = new Action<bool>(avDriver.VolumeUpPress);
|
||||||
|
tsw.Down.UserObject = new Action<bool>(avDriver.VolumeDownPress);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ using PepperDash.Essentials.Core.PageManagers;
|
|||||||
using PepperDash.Essentials.Core.Rooms.Config;
|
using PepperDash.Essentials.Core.Rooms.Config;
|
||||||
using PepperDash.Essentials.Core.Devices.Codec;
|
using PepperDash.Essentials.Core.Devices.Codec;
|
||||||
using PepperDash.Essentials.Devices.Common.VideoCodec;
|
using PepperDash.Essentials.Devices.Common.VideoCodec;
|
||||||
|
using PepperDashEssentials.UIDrivers.EssentialsDualDisplay;
|
||||||
|
|
||||||
|
|
||||||
namespace PepperDash.Essentials
|
namespace PepperDash.Essentials
|
||||||
@@ -136,37 +137,39 @@ namespace PepperDash.Essentials
|
|||||||
return nextJoin;
|
return nextJoin;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint SetUpCalendarButton(EssentialsHuddleVtc1PanelAvFunctionsDriver avDriver, uint nextJoin)
|
uint SetUpCalendarButton(IHasCalendarButton avDriver, uint nextJoin)
|
||||||
{
|
{
|
||||||
// Calendar button
|
// Calendar button
|
||||||
if (avDriver.CurrentRoom.ScheduleSource != null)
|
var room = avDriver.CurrentRoom as EssentialsHuddleVtc1Room;
|
||||||
|
if (room != null && room.ScheduleSource == null)
|
||||||
{
|
{
|
||||||
var tempJoin = nextJoin;
|
|
||||||
TriList.SetString(tempJoin, "Calendar");
|
|
||||||
CalendarCaretVisible = tempJoin + 10;
|
|
||||||
TriList.SetSigFalseAction(tempJoin, () =>
|
|
||||||
{
|
|
||||||
avDriver.CalendarPress();
|
|
||||||
CaretInterlock.ShowInterlocked(CalendarCaretVisible);
|
|
||||||
});
|
|
||||||
|
|
||||||
nextJoin--;
|
|
||||||
return nextJoin;
|
return nextJoin;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
return nextJoin;
|
var tempJoin = nextJoin;
|
||||||
|
TriList.SetString(tempJoin, "Calendar");
|
||||||
|
CalendarCaretVisible = tempJoin + 10;
|
||||||
|
TriList.SetSigFalseAction(tempJoin, () =>
|
||||||
|
{
|
||||||
|
avDriver.CalendarPress();
|
||||||
|
CaretInterlock.ShowInterlocked(CalendarCaretVisible);
|
||||||
|
});
|
||||||
|
|
||||||
|
nextJoin--;
|
||||||
|
return nextJoin;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint SetUpCallButton(EssentialsHuddleVtc1PanelAvFunctionsDriver avDriver, uint nextJoin)
|
uint SetUpCallButton(IHasCallButton avDriver, uint nextJoin)
|
||||||
{
|
{
|
||||||
// Call button
|
// Call button
|
||||||
|
var room = avDriver.CurrentRoom as EssentialsHuddleVtc1Room;
|
||||||
var tempJoin = nextJoin;
|
var tempJoin = nextJoin;
|
||||||
TriList.SetString(tempJoin, "DND");
|
TriList.SetString(tempJoin, "DND");
|
||||||
CallCaretVisible = tempJoin + 10;
|
CallCaretVisible = tempJoin + 10;
|
||||||
TriList.SetSigFalseAction(tempJoin, () =>
|
TriList.SetSigFalseAction(tempJoin, () =>
|
||||||
{
|
{
|
||||||
avDriver.ShowActiveCallsList();
|
avDriver.ShowActiveCallsList();
|
||||||
if(avDriver.CurrentRoom.InCallFeedback.BoolValue)
|
if(room != null && room.InCallFeedback.BoolValue)
|
||||||
CaretInterlock.ShowInterlocked(CallCaretVisible);
|
CaretInterlock.ShowInterlocked(CallCaretVisible);
|
||||||
});
|
});
|
||||||
HeaderCallButtonIconSig = TriList.StringInput[tempJoin];
|
HeaderCallButtonIconSig = TriList.StringInput[tempJoin];
|
||||||
@@ -225,6 +228,7 @@ namespace PepperDash.Essentials
|
|||||||
public void SetupHeaderButtons(EssentialsHuddleVtc1PanelAvFunctionsDriver avDriver, EssentialsHuddleVtc1Room currentRoom)
|
public void SetupHeaderButtons(EssentialsHuddleVtc1PanelAvFunctionsDriver avDriver, EssentialsHuddleVtc1Room currentRoom)
|
||||||
{
|
{
|
||||||
HeaderButtonsAreSetUp = false;
|
HeaderButtonsAreSetUp = false;
|
||||||
|
var room = avDriver.CurrentRoom as EssentialsHuddleVtc1Room;
|
||||||
|
|
||||||
TriList.SetBool(UIBoolJoin.TopBarHabaneroDynamicVisible, true);
|
TriList.SetBool(UIBoolJoin.TopBarHabaneroDynamicVisible, true);
|
||||||
|
|
||||||
@@ -257,7 +261,67 @@ namespace PepperDash.Essentials
|
|||||||
() =>
|
() =>
|
||||||
{
|
{
|
||||||
avDriver.ShowActiveCallsList();
|
avDriver.ShowActiveCallsList();
|
||||||
if (avDriver.CurrentRoom.InCallFeedback.BoolValue)
|
if (room != null && room.InCallFeedback.BoolValue)
|
||||||
|
CaretInterlock.ShowInterlocked(CallCaretVisible);
|
||||||
|
});
|
||||||
|
|
||||||
|
// Set Call Status Subpage Position
|
||||||
|
|
||||||
|
if (nextJoin == 3951)
|
||||||
|
{
|
||||||
|
// Set to right position
|
||||||
|
TriList.SetBool(UIBoolJoin.HeaderCallStatusLeftPositionVisible, false);
|
||||||
|
TriList.SetBool(UIBoolJoin.HeaderCallStatusRightPositionVisible, true);
|
||||||
|
}
|
||||||
|
else if (nextJoin == 3950)
|
||||||
|
{
|
||||||
|
// Set to left position
|
||||||
|
TriList.SetBool(UIBoolJoin.HeaderCallStatusLeftPositionVisible, true);
|
||||||
|
TriList.SetBool(UIBoolJoin.HeaderCallStatusRightPositionVisible, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
HeaderButtonsAreSetUp = true;
|
||||||
|
|
||||||
|
ComputeHeaderCallStatus(currentRoom.VideoCodec);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetupHeaderButtons(EssentialsDualDisplayPanelAvFunctionsDriver avDriver, EssentialsHuddleVtc1Room currentRoom)
|
||||||
|
{
|
||||||
|
HeaderButtonsAreSetUp = false;
|
||||||
|
var room = avDriver.CurrentRoom as EssentialsHuddleVtc1Room;
|
||||||
|
|
||||||
|
TriList.SetBool(UIBoolJoin.TopBarHabaneroDynamicVisible, true);
|
||||||
|
|
||||||
|
var roomConf = currentRoom.PropertiesConfig;
|
||||||
|
|
||||||
|
// Register for the PopupInterlock IsShowsFeedback event to tie the header carets subpage visiblity to it
|
||||||
|
Parent.AvDriver.PopupInterlock.StatusChanged -= PopupInterlock_StatusChanged;
|
||||||
|
Parent.AvDriver.PopupInterlock.StatusChanged += PopupInterlock_StatusChanged;
|
||||||
|
|
||||||
|
SetUpGear(avDriver, currentRoom);
|
||||||
|
|
||||||
|
SetUpHelpButton(roomConf);
|
||||||
|
|
||||||
|
uint nextJoin = 3953;
|
||||||
|
|
||||||
|
nextJoin = SetUpEnvironmentButton(Parent.EnvironmentDriver, nextJoin);
|
||||||
|
|
||||||
|
nextJoin = SetUpCalendarButton(avDriver, nextJoin);
|
||||||
|
|
||||||
|
nextJoin = SetUpCallButton(avDriver, nextJoin);
|
||||||
|
|
||||||
|
// blank any that remain
|
||||||
|
for (var i = nextJoin; i > 3950; i--)
|
||||||
|
{
|
||||||
|
TriList.SetString(i, "Blank");
|
||||||
|
TriList.SetSigFalseAction(i, () => { });
|
||||||
|
}
|
||||||
|
|
||||||
|
TriList.SetSigFalseAction(UIBoolJoin.HeaderCallStatusLabelPress,
|
||||||
|
() =>
|
||||||
|
{
|
||||||
|
avDriver.ShowActiveCallsList();
|
||||||
|
if (room != null && room.InCallFeedback.BoolValue)
|
||||||
CaretInterlock.ShowInterlocked(CallCaretVisible);
|
CaretInterlock.ShowInterlocked(CallCaretVisible);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ using PepperDash.Essentials;
|
|||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Core.Config;
|
using PepperDash.Essentials.Core.Config;
|
||||||
using PepperDash.Essentials.Core.Devices.Codec;
|
using PepperDash.Essentials.Core.Devices.Codec;
|
||||||
|
using PepperDash.Essentials.Core.Devices.VideoCodec;
|
||||||
using PepperDash.Essentials.Core.PageManagers;
|
using PepperDash.Essentials.Core.PageManagers;
|
||||||
using PepperDash.Essentials.Core.Touchpanels.Keyboards;
|
using PepperDash.Essentials.Core.Touchpanels.Keyboards;
|
||||||
using PepperDash.Essentials.UIDrivers;
|
using PepperDash.Essentials.UIDrivers;
|
||||||
@@ -15,7 +16,7 @@ using PepperDash.Essentials.UIDrivers.VC;
|
|||||||
|
|
||||||
namespace PepperDashEssentials.UIDrivers.EssentialsDualDisplay
|
namespace PepperDashEssentials.UIDrivers.EssentialsDualDisplay
|
||||||
{
|
{
|
||||||
public class EssentialsDualDisplayPanelAvFunctionsDriver : PanelDriverBase, IAVWithVCDriver
|
public class EssentialsDualDisplayPanelAvFunctionsDriver : PanelDriverBase, IAVWithVCDriver, IHasCalendarButton, IHasCallButton
|
||||||
{
|
{
|
||||||
#region UiDisplayMode enum
|
#region UiDisplayMode enum
|
||||||
|
|
||||||
@@ -86,6 +87,28 @@ namespace PepperDashEssentials.UIDrivers.EssentialsDualDisplay
|
|||||||
set { SetCurrentRoom(value as EssentialsDualDisplayRoom); }
|
set { SetCurrentRoom(value as EssentialsDualDisplayRoom); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void ShowActiveCallsList()
|
||||||
|
{
|
||||||
|
TriList.SetBool(UIBoolJoin.CallEndAllConfirmVisible, true);
|
||||||
|
if (PopupInterlock.CurrentJoin == UIBoolJoin.HeaderActiveCallsListVisible)
|
||||||
|
{
|
||||||
|
PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.HeaderActiveCallsListVisible);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var videoCodecBase = _currentRoom.ScheduleSource as VideoCodecBase;
|
||||||
|
if (videoCodecBase != null && videoCodecBase.IsInCall)
|
||||||
|
{
|
||||||
|
PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.HeaderActiveCallsListVisible);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void CalendarPress()
|
||||||
|
{
|
||||||
|
PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.MeetingsOrContacMethodsListVisible);
|
||||||
|
}
|
||||||
|
|
||||||
public SubpageReferenceList MeetingOrContactMethodModalSrl { get; set; }
|
public SubpageReferenceList MeetingOrContactMethodModalSrl { get; set; }
|
||||||
public JoinedSigInterlock PopupInterlock { get; private set; }
|
public JoinedSigInterlock PopupInterlock { get; private set; }
|
||||||
|
|
||||||
@@ -109,30 +132,6 @@ namespace PepperDashEssentials.UIDrivers.EssentialsDualDisplay
|
|||||||
}, timeout);
|
}, timeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SetupActivityFooterWhenRoomOff()
|
|
||||||
{
|
|
||||||
_activityFooterSrl.Clear();
|
|
||||||
_activityFooterSrl.AddItem(new SubpageReferenceListActivityItem(1, _activityFooterSrl, 0,
|
|
||||||
b =>
|
|
||||||
{
|
|
||||||
if (!b)
|
|
||||||
{
|
|
||||||
ActivityShareButtonPressed();
|
|
||||||
}
|
|
||||||
}));
|
|
||||||
_activityFooterSrl.AddItem(new SubpageReferenceListActivityItem(2, _activityFooterSrl, 3,
|
|
||||||
b =>
|
|
||||||
{
|
|
||||||
if (!b)
|
|
||||||
{
|
|
||||||
ActivityCallButtonPressed();
|
|
||||||
}
|
|
||||||
}));
|
|
||||||
_activityFooterSrl.Count = 2;
|
|
||||||
TriList.SetUshort(UIUshortJoin.PresentationStagingCaretMode, 1); // right one slot
|
|
||||||
TriList.SetUshort(UIUshortJoin.CallStagingCaretMode, 5); // left one slot
|
|
||||||
}
|
|
||||||
|
|
||||||
public void HideNotificationRibbon()
|
public void HideNotificationRibbon()
|
||||||
{
|
{
|
||||||
TriList.SetBool(UIBoolJoin.NotificationRibbonVisible, false);
|
TriList.SetBool(UIBoolJoin.NotificationRibbonVisible, false);
|
||||||
@@ -184,6 +183,30 @@ namespace PepperDashEssentials.UIDrivers.EssentialsDualDisplay
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
private void SetupActivityFooterWhenRoomOff()
|
||||||
|
{
|
||||||
|
_activityFooterSrl.Clear();
|
||||||
|
_activityFooterSrl.AddItem(new SubpageReferenceListActivityItem(1, _activityFooterSrl, 0,
|
||||||
|
b =>
|
||||||
|
{
|
||||||
|
if (!b)
|
||||||
|
{
|
||||||
|
ActivityShareButtonPressed();
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
_activityFooterSrl.AddItem(new SubpageReferenceListActivityItem(2, _activityFooterSrl, 3,
|
||||||
|
b =>
|
||||||
|
{
|
||||||
|
if (!b)
|
||||||
|
{
|
||||||
|
ActivityCallButtonPressed();
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
_activityFooterSrl.Count = 2;
|
||||||
|
TriList.SetUshort(UIUshortJoin.PresentationStagingCaretMode, 1); // right one slot
|
||||||
|
TriList.SetUshort(UIUshortJoin.CallStagingCaretMode, 5); // left one slot
|
||||||
|
}
|
||||||
|
|
||||||
private void HideLogo()
|
private void HideLogo()
|
||||||
{
|
{
|
||||||
TriList.SetBool(UIBoolJoin.LogoDefaultVisible, false);
|
TriList.SetBool(UIBoolJoin.LogoDefaultVisible, false);
|
||||||
@@ -211,7 +234,7 @@ namespace PepperDashEssentials.UIDrivers.EssentialsDualDisplay
|
|||||||
&& CurrentRoom.ShutdownType == eShutdownType.None;
|
&& CurrentRoom.ShutdownType == eShutdownType.None;
|
||||||
_endMeetingButtonSig.BoolValue = CurrentRoom.ShutdownType != eShutdownType.None;
|
_endMeetingButtonSig.BoolValue = CurrentRoom.ShutdownType != eShutdownType.None;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UiSelectSource(string key)
|
private void UiSelectSource(string key)
|
||||||
{
|
{
|
||||||
// Run the route and when it calls back, show the source
|
// Run the route and when it calls back, show the source
|
||||||
@@ -361,6 +384,7 @@ namespace PepperDashEssentials.UIDrivers.EssentialsDualDisplay
|
|||||||
{
|
{
|
||||||
RefreshCurrentRoom(_currentRoom);
|
RefreshCurrentRoom(_currentRoom);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CurrentRoom_CurrentAudioDeviceChange(object sender, VolumeDeviceChangeEventArgs args)
|
private void CurrentRoom_CurrentAudioDeviceChange(object sender, VolumeDeviceChangeEventArgs args)
|
||||||
{
|
{
|
||||||
if (args.Type == ChangeType.WillChange)
|
if (args.Type == ChangeType.WillChange)
|
||||||
@@ -372,6 +396,7 @@ namespace PepperDashEssentials.UIDrivers.EssentialsDualDisplay
|
|||||||
RefreshAudioDeviceConnections();
|
RefreshAudioDeviceConnections();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void VolumeUpPress(bool state)
|
public void VolumeUpPress(bool state)
|
||||||
{
|
{
|
||||||
if (CurrentRoom.CurrentVolumeControls != null)
|
if (CurrentRoom.CurrentVolumeControls != null)
|
||||||
@@ -524,7 +549,7 @@ namespace PepperDashEssentials.UIDrivers.EssentialsDualDisplay
|
|||||||
{
|
{
|
||||||
pm = _pageManagers[uiDev];
|
pm = _pageManagers[uiDev];
|
||||||
}
|
}
|
||||||
// Otherwise make an apporiate one
|
// Otherwise make an apporiate one
|
||||||
else if (uiDev is ISetTopBoxControls)
|
else if (uiDev is ISetTopBoxControls)
|
||||||
{
|
{
|
||||||
pm = new SetTopBoxThreePanelPageManager(uiDev as ISetTopBoxControls, TriList);
|
pm = new SetTopBoxThreePanelPageManager(uiDev as ISetTopBoxControls, TriList);
|
||||||
@@ -629,10 +654,125 @@ namespace PepperDashEssentials.UIDrivers.EssentialsDualDisplay
|
|||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var value = (ushort)(intFeedback.UShortValue * 65535 / 100);
|
var value = (ushort) (intFeedback.UShortValue*65535/100);
|
||||||
TriList.UShortInput[ModalDialog.TimerGaugeJoin].UShortValue = value;
|
TriList.UShortInput[ModalDialog.TimerGaugeJoin].UShortValue = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void ShutdownPromptTimer_HasStarted(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
// Do we need to check where the UI is? No?
|
||||||
|
var timer = CurrentRoom.ShutdownPromptTimer;
|
||||||
|
SetActivityFooterFeedbacks();
|
||||||
|
|
||||||
|
if (CurrentRoom.ShutdownType == eShutdownType.Manual || CurrentRoom.ShutdownType == eShutdownType.Vacancy)
|
||||||
|
{
|
||||||
|
_powerDownModal = new ModalDialog(TriList);
|
||||||
|
var message = string.Format("Meeting will end in {0} seconds", CurrentRoom.ShutdownPromptSeconds);
|
||||||
|
|
||||||
|
// Attach timer things to modal
|
||||||
|
CurrentRoom.ShutdownPromptTimer.TimeRemainingFeedback.OutputChange +=
|
||||||
|
ShutdownPromptTimer_TimeRemainingFeedback_OutputChange;
|
||||||
|
CurrentRoom.ShutdownPromptTimer.PercentFeedback.OutputChange +=
|
||||||
|
ShutdownPromptTimer_PercentFeedback_OutputChange;
|
||||||
|
|
||||||
|
// respond to offs by cancelling dialog
|
||||||
|
var onFb = CurrentRoom.OnFeedback;
|
||||||
|
EventHandler<FeedbackEventArgs> offHandler = null;
|
||||||
|
offHandler = (o, a) =>
|
||||||
|
{
|
||||||
|
if (!onFb.BoolValue)
|
||||||
|
{
|
||||||
|
_powerDownModal.HideDialog();
|
||||||
|
SetActivityFooterFeedbacks();
|
||||||
|
onFb.OutputChange -= offHandler;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
onFb.OutputChange += offHandler;
|
||||||
|
|
||||||
|
_powerDownModal.PresentModalDialog(2, "End Meeting", "Power", message, "Cancel", "End Meeting Now", true,
|
||||||
|
true,
|
||||||
|
but =>
|
||||||
|
{
|
||||||
|
if (but != 2) // any button except for End cancels
|
||||||
|
{
|
||||||
|
timer.Cancel();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
timer.Finish();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ShutdownPromptTimer_HasFinished(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
SetActivityFooterFeedbacks();
|
||||||
|
CurrentRoom.ShutdownPromptTimer.TimeRemainingFeedback.OutputChange -=
|
||||||
|
ShutdownPromptTimer_TimeRemainingFeedback_OutputChange;
|
||||||
|
CurrentRoom.ShutdownPromptTimer.PercentFeedback.OutputChange -=
|
||||||
|
ShutdownPromptTimer_PercentFeedback_OutputChange;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ShutdownPromptTimer_WasCancelled(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (_powerDownModal != null)
|
||||||
|
{
|
||||||
|
_powerDownModal.HideDialog();
|
||||||
|
}
|
||||||
|
SetActivityFooterFeedbacks();
|
||||||
|
|
||||||
|
CurrentRoom.ShutdownPromptTimer.TimeRemainingFeedback.OutputChange +=
|
||||||
|
ShutdownPromptTimer_TimeRemainingFeedback_OutputChange;
|
||||||
|
CurrentRoom.ShutdownPromptTimer.PercentFeedback.OutputChange -=
|
||||||
|
ShutdownPromptTimer_PercentFeedback_OutputChange;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CurrentRoom_IsWarmingFeedback_OutputChange(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (CurrentRoom.IsWarmingUpFeedback.BoolValue)
|
||||||
|
{
|
||||||
|
ShowNotificationRibbon("Room is powering on. Please wait...", 0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ShowNotificationRibbon("Room is powered on. Welcome.", 2000);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
private void CurrentRoom_IsCoolingDownFeedback_OutputChange(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (CurrentRoom.IsCoolingDownFeedback.BoolValue)
|
||||||
|
{
|
||||||
|
ShowNotificationRibbon("Room is powering off. Please wait.", 0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
HideNotificationRibbon();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CurrentRoom_InCallFeedback_OutputChange(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var inCall = _currentRoom.InCallFeedback.BoolValue;
|
||||||
|
if (inCall)
|
||||||
|
{
|
||||||
|
// Check if transitioning to in call - and non-sharable source is in use
|
||||||
|
if (CurrentRoom.CurrentSourceInfo != null && CurrentRoom.CurrentSourceInfo.DisableCodecSharing)
|
||||||
|
{
|
||||||
|
Debug.Console(1, CurrentRoom, "Transitioning to in-call, cancelling non-sharable source");
|
||||||
|
CurrentRoom.RunRouteAction("codecOsd", CurrentRoom.SourceListKey);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
SetupSourceList();
|
||||||
|
}
|
||||||
|
|
||||||
private void RefreshCurrentRoom(EssentialsDualDisplayRoom room)
|
private void RefreshCurrentRoom(EssentialsDualDisplayRoom room)
|
||||||
{
|
{
|
||||||
if (_currentRoom != null)
|
if (_currentRoom != null)
|
||||||
@@ -718,5 +858,172 @@ namespace PepperDashEssentials.UIDrivers.EssentialsDualDisplay
|
|||||||
TriList.StringInput[UIStringJoin.CurrentRoomName].StringValue = "Select a room";
|
TriList.StringInput[UIStringJoin.CurrentRoomName].StringValue = "Select a room";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void SharingContentIsOnFeedback_OutputChange(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
SetActiveCallListSharingContentStatus();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SetActiveCallListSharingContentStatus()
|
||||||
|
{
|
||||||
|
_callSharingInfoVisibleFeedback.FireUpdate();
|
||||||
|
|
||||||
|
string callListSharedSourceLabel;
|
||||||
|
|
||||||
|
if (_currentRoom.VideoCodec.SharingContentIsOnFeedback.BoolValue && _currentRoom.CurrentSourceInfo != null)
|
||||||
|
{
|
||||||
|
Debug.Console(0, "*#* CurrentRoom.CurrentSourceInfo = {0}",
|
||||||
|
_currentRoom.CurrentSourceInfo != null ? _currentRoom.CurrentSourceInfo.SourceKey : "Nada!");
|
||||||
|
callListSharedSourceLabel = _currentRoom.CurrentSourceInfo.PreferredName;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
callListSharedSourceLabel = "None";
|
||||||
|
}
|
||||||
|
|
||||||
|
TriList.StringInput[UIStringJoin.CallSharedSourceNameText].StringValue = callListSharedSourceLabel;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CurrentRoom_CurrentSingleSourceChange(SourceListItem info, ChangeType type)
|
||||||
|
{
|
||||||
|
if (_currentRoom.VideoCodec.SharingContentIsOnFeedback.BoolValue && _currentRoom.CurrentSourceInfo != null)
|
||||||
|
{
|
||||||
|
TriList.StringInput[UIStringJoin.CallSharedSourceNameText].StringValue =
|
||||||
|
_currentRoom.CurrentSourceInfo.PreferredName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CodecSchedule_MeetingsListHasChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
RefreshMeetingsList();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ShowLogo()
|
||||||
|
{
|
||||||
|
if (CurrentRoom.LogoUrl == null)
|
||||||
|
{
|
||||||
|
TriList.SetBool(UIBoolJoin.LogoDefaultVisible, true);
|
||||||
|
TriList.SetBool(UIBoolJoin.LogoUrlVisible, false);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
TriList.SetBool(UIBoolJoin.LogoDefaultVisible, false);
|
||||||
|
TriList.SetBool(UIBoolJoin.LogoUrlVisible, true);
|
||||||
|
TriList.SetString(UIStringJoin.LogoUrl, _currentRoom.LogoUrl);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void RefreshMeetingsList()
|
||||||
|
{
|
||||||
|
// See if this is helpful or if the callback response in the codec class maybe doesn't come it time?
|
||||||
|
// Let's build list from event
|
||||||
|
// CurrentRoom.ScheduleSource.GetSchedule();
|
||||||
|
|
||||||
|
TriList.SetString(UIStringJoin.MeetingsOrContactMethodListIcon, "Calendar");
|
||||||
|
TriList.SetString(UIStringJoin.MeetingsOrContactMethodListTitleText, "Today's Meetings");
|
||||||
|
|
||||||
|
ushort i = 0;
|
||||||
|
foreach (var m in _currentRoom.ScheduleSource.CodecSchedule.Meetings)
|
||||||
|
{
|
||||||
|
i++;
|
||||||
|
MeetingOrContactMethodModalSrl.StringInputSig(i, 1).StringValue = m.StartTime.ToShortTimeString();
|
||||||
|
MeetingOrContactMethodModalSrl.StringInputSig(i, 2).StringValue = m.EndTime.ToShortTimeString();
|
||||||
|
MeetingOrContactMethodModalSrl.StringInputSig(i, 3).StringValue = m.Title;
|
||||||
|
MeetingOrContactMethodModalSrl.StringInputSig(i, 4).StringValue = string.Format("<br>{0}", m.Organizer);
|
||||||
|
MeetingOrContactMethodModalSrl.StringInputSig(i, 5).StringValue = "Join";
|
||||||
|
MeetingOrContactMethodModalSrl.BoolInputSig(i, 2).BoolValue = m.Joinable;
|
||||||
|
var mm = m; // lambda scope
|
||||||
|
MeetingOrContactMethodModalSrl.GetBoolFeedbackSig(i, 1).SetSigFalseAction(() =>
|
||||||
|
{
|
||||||
|
PopupInterlock.Hide();
|
||||||
|
ActivityCallButtonPressed();
|
||||||
|
var d = _currentRoom.ScheduleSource as VideoCodecBase;
|
||||||
|
if (d != null)
|
||||||
|
{
|
||||||
|
RoomOnAndDialMeeting(mm);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
MeetingOrContactMethodModalSrl.Count = i;
|
||||||
|
|
||||||
|
if (i == 0) // Show item indicating no meetings are booked for rest of day
|
||||||
|
{
|
||||||
|
MeetingOrContactMethodModalSrl.Count = 1;
|
||||||
|
|
||||||
|
MeetingOrContactMethodModalSrl.StringInputSig(1, 1).StringValue = string.Empty;
|
||||||
|
MeetingOrContactMethodModalSrl.StringInputSig(1, 2).StringValue = string.Empty;
|
||||||
|
MeetingOrContactMethodModalSrl.StringInputSig(1, 3).StringValue =
|
||||||
|
"No Meetings are booked for the remainder of the day.";
|
||||||
|
MeetingOrContactMethodModalSrl.StringInputSig(1, 4).StringValue = string.Empty;
|
||||||
|
MeetingOrContactMethodModalSrl.StringInputSig(1, 5).StringValue = string.Empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CurrentRoom_OnFeedback_OutputChange(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
CurrentRoom_SyncOnFeedback();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void RoomOnAndDialMeeting(Meeting meeting)
|
||||||
|
{
|
||||||
|
Action dialAction = () =>
|
||||||
|
{
|
||||||
|
var d = _currentRoom.ScheduleSource as VideoCodecBase;
|
||||||
|
if (d != null)
|
||||||
|
{
|
||||||
|
d.Dial(meeting);
|
||||||
|
_lastMeetingDismissedId = meeting.Id; // To prevent prompts for already-joined call
|
||||||
|
}
|
||||||
|
};
|
||||||
|
if (CurrentRoom.OnFeedback.BoolValue)
|
||||||
|
{
|
||||||
|
dialAction();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Rig a one-time handler to catch when the room is warmed and then dial call
|
||||||
|
EventHandler<FeedbackEventArgs> oneTimeHandler = null;
|
||||||
|
oneTimeHandler = (o, a) =>
|
||||||
|
{
|
||||||
|
if (!CurrentRoom.IsWarmingUpFeedback.BoolValue)
|
||||||
|
{
|
||||||
|
CurrentRoom.IsWarmingUpFeedback.OutputChange -= oneTimeHandler;
|
||||||
|
dialAction();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
CurrentRoom.IsWarmingUpFeedback.OutputChange += oneTimeHandler;
|
||||||
|
ActivityCallButtonPressed();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CurrentRoom_SyncOnFeedback()
|
||||||
|
{
|
||||||
|
var value = _currentRoom.OnFeedback.BoolValue;
|
||||||
|
TriList.BooleanInput[UIBoolJoin.RoomIsOn].BoolValue = value;
|
||||||
|
|
||||||
|
TriList.BooleanInput[UIBoolJoin.StartPageVisible].BoolValue = !value;
|
||||||
|
|
||||||
|
if (value) //ON
|
||||||
|
{
|
||||||
|
SetupActivityFooterWhenRoomOn();
|
||||||
|
TriList.BooleanInput[UIBoolJoin.SelectASourceVisible].BoolValue = false;
|
||||||
|
TriList.BooleanInput[UIBoolJoin.VolumeDualMute1Visible].BoolValue = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_currentMode = UiDisplayMode.Start;
|
||||||
|
if (_vcDriver.IsVisible)
|
||||||
|
{
|
||||||
|
_vcDriver.Hide();
|
||||||
|
}
|
||||||
|
SetupActivityFooterWhenRoomOff();
|
||||||
|
ShowLogo();
|
||||||
|
SetActivityFooterFeedbacks();
|
||||||
|
TriList.BooleanInput[UIBoolJoin.VolumeDualMute1Visible].BoolValue = false;
|
||||||
|
TriList.BooleanInput[UIBoolJoin.SourceStagingBarVisible].BoolValue = false;
|
||||||
|
// Clear this so that the pesky meeting warning can resurface every minute when off
|
||||||
|
_lastMeetingDismissedId = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -10,9 +10,6 @@ using PepperDash.Essentials.UIDrivers;
|
|||||||
|
|
||||||
namespace PepperDash.Essentials
|
namespace PepperDash.Essentials
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
public class EssentialsHuddlePanelAvFunctionsDriver : PanelDriverBase, IAVDriver
|
public class EssentialsHuddlePanelAvFunctionsDriver : PanelDriverBase, IAVDriver
|
||||||
{
|
{
|
||||||
private readonly CrestronTouchpanelPropertiesConfig _config;
|
private readonly CrestronTouchpanelPropertiesConfig _config;
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ namespace PepperDash.Essentials
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class EssentialsHuddleVtc1PanelAvFunctionsDriver : PanelDriverBase, IAVWithVCDriver
|
public class EssentialsHuddleVtc1PanelAvFunctionsDriver : PanelDriverBase, IAVWithVCDriver,IHasCallButton, IHasCalendarButton
|
||||||
{
|
{
|
||||||
#region UiDisplayMode enum
|
#region UiDisplayMode enum
|
||||||
|
|
||||||
@@ -196,10 +196,10 @@ namespace PepperDash.Essentials
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public EssentialsRoomBase CurrentRoom
|
public EssentialsHuddleVtc1Room CurrentRoom
|
||||||
{
|
{
|
||||||
get { return _currentRoom; }
|
get { return _currentRoom; }
|
||||||
set { SetCurrentRoom(value as EssentialsHuddleVtc1Room); }
|
set { SetCurrentRoom(value); }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -1558,7 +1558,7 @@ namespace PepperDash.Essentials
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IAVWithVCDriver : IAVDriver
|
public interface IAVWithVCDriver : IAVDriver
|
||||||
{
|
{
|
||||||
EssentialsRoomBase CurrentRoom { get; }
|
EssentialsHuddleVtc1Room CurrentRoom { get; }
|
||||||
|
|
||||||
HabaneroKeyboardController Keyboard { get; }
|
HabaneroKeyboardController Keyboard { get; }
|
||||||
SubpageReferenceList MeetingOrContactMethodModalSrl { get; }
|
SubpageReferenceList MeetingOrContactMethodModalSrl { get; }
|
||||||
|
|||||||
16
PepperDashEssentials/UIDrivers/IHasCalendarButton.cs
Normal file
16
PepperDashEssentials/UIDrivers/IHasCalendarButton.cs
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
using PepperDash.Essentials.Core;
|
||||||
|
|
||||||
|
namespace PepperDash.Essentials
|
||||||
|
{
|
||||||
|
public interface IHasCalendarButton
|
||||||
|
{
|
||||||
|
EssentialsRoomBase CurrentRoom { get; }
|
||||||
|
void CalendarPress();
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface IHasCallButton
|
||||||
|
{
|
||||||
|
EssentialsRoomBase CurrentRoom { get; }
|
||||||
|
void ShowActiveCallsList();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,9 +1,5 @@
|
|||||||
using System.Collections.Generic;
|
using PepperDash.Core;
|
||||||
using PepperDash.Core;
|
|
||||||
using PepperDash.Essentials.Core;
|
|
||||||
|
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using PepperDash.Essentials.Core.Config;
|
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Core.Rooms.Config
|
namespace PepperDash.Essentials.Core.Rooms.Config
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -210,7 +210,6 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public event EventHandler<EventArgs> RoomOccupancyIsSet;
|
public event EventHandler<EventArgs> RoomOccupancyIsSet;
|
||||||
|
|
||||||
|
|
||||||
private void SetupRoomVacancyShutdown()
|
private void SetupRoomVacancyShutdown()
|
||||||
{
|
{
|
||||||
RoomVacancyShutdownTimer = new SecondsCountdownTimer(Key + "-vacancyOffTimer");
|
RoomVacancyShutdownTimer = new SecondsCountdownTimer(Key + "-vacancyOffTimer");
|
||||||
|
|||||||
@@ -4,27 +4,17 @@ using System.Linq;
|
|||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Core.Config;
|
using PepperDash.Essentials.Core.Config;
|
||||||
using PepperDash.Essentials.Core.Devices.AudioCodec;
|
|
||||||
using PepperDash.Essentials.Core.Devices.VideoCodec;
|
|
||||||
using PepperDash.Essentials.Core.Rooms;
|
|
||||||
using PepperDash.Essentials.Core.Rooms.Config;
|
using PepperDash.Essentials.Core.Rooms.Config;
|
||||||
using PepperDash_Essentials_Core.Devices;
|
using PepperDash_Essentials_Core.Devices;
|
||||||
|
|
||||||
namespace PepperDash.Essentials
|
namespace PepperDash.Essentials
|
||||||
{
|
{
|
||||||
public class EssentialsDualDisplayRoom : EssentialsRoomBase, IHasCurrentSourceInfoChange,
|
public class EssentialsDualDisplayRoom : EssentialsHuddleVtc1Room
|
||||||
IPrivacy, IHasCurrentVolumeControls, IRunRouteAction, IRunDefaultCallRoute, IHasVideoCodec, IHasAudioCodec,
|
|
||||||
IHasDefaultDisplay, IHasInCallFeedback
|
|
||||||
{
|
{
|
||||||
public const string DefaultDestinationListKey = "default";
|
public const string DefaultDestinationListKey = "default";
|
||||||
private const string LeftDestinationKey = "leftDisplay";
|
private const string LeftDestinationKey = "leftDisplay";
|
||||||
private const string RightDestinationKey = "rightDisplay";
|
private const string RightDestinationKey = "rightDisplay";
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// "codecOsd"
|
|
||||||
/// </summary>
|
|
||||||
public const string DefaultCodecRouteString = "codecOsd";
|
|
||||||
|
|
||||||
private readonly EssentialsDualDisplayRoomPropertiesConfig _config;
|
private readonly EssentialsDualDisplayRoomPropertiesConfig _config;
|
||||||
|
|
||||||
private string _destinationListKey;
|
private string _destinationListKey;
|
||||||
@@ -33,23 +23,6 @@ namespace PepperDash.Essentials
|
|||||||
{
|
{
|
||||||
_config = config.Properties.ToObject<EssentialsDualDisplayRoomPropertiesConfig>();
|
_config = config.Properties.ToObject<EssentialsDualDisplayRoomPropertiesConfig>();
|
||||||
|
|
||||||
DefaultDisplay = DeviceManager.GetDeviceForKey(_config.DefaultDisplayKey) as IRoutingSinkWithSwitching;
|
|
||||||
DefaultAudioDevice = DeviceManager.GetDeviceForKey(_config.DefaultAudioKey) as IRoutingSinkWithSwitching;
|
|
||||||
|
|
||||||
VideoCodec = DeviceManager.GetDeviceForKey(_config.VideoCodecKey) as VideoCodecBase;
|
|
||||||
|
|
||||||
if (VideoCodec == null)
|
|
||||||
{
|
|
||||||
throw new ArgumentNullException("codec cannot be null");
|
|
||||||
}
|
|
||||||
|
|
||||||
AudioCodec = DeviceManager.GetDeviceForKey(_config.AudioCodecKey) as AudioCodecBase;
|
|
||||||
|
|
||||||
if (AudioCodec == null)
|
|
||||||
{
|
|
||||||
Debug.Console(0, this, "No audio codec found");
|
|
||||||
}
|
|
||||||
|
|
||||||
Initialize();
|
Initialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -63,109 +36,15 @@ namespace PepperDash.Essentials
|
|||||||
public IRoutingSinkWithSwitching LeftDisplay { get; private set; }
|
public IRoutingSinkWithSwitching LeftDisplay { get; private set; }
|
||||||
public IRoutingSinkWithSwitching RightDisplay { get; private set; }
|
public IRoutingSinkWithSwitching RightDisplay { get; private set; }
|
||||||
|
|
||||||
#region IHasAudioCodec Members
|
|
||||||
|
|
||||||
public AudioCodecBase AudioCodec { get; private set; }
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region IHasVideoCodec Members
|
|
||||||
|
|
||||||
public BoolFeedback InCallFeedback { get; private set; }
|
|
||||||
|
|
||||||
public IntFeedback CallTypeFeedback { get; private set; }
|
|
||||||
|
|
||||||
public BoolFeedback IsSharingFeedback { get; private set; }
|
|
||||||
|
|
||||||
public VideoCodecBase VideoCodec { get; private set; }
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region IPrivacy Members
|
|
||||||
|
|
||||||
public BoolFeedback PrivacyModeIsOnFeedback { get; private set; }
|
|
||||||
|
|
||||||
public void PrivacyModeOff()
|
|
||||||
{
|
|
||||||
VideoCodec.PrivacyModeOff();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void PrivacyModeOn()
|
|
||||||
{
|
|
||||||
VideoCodec.PrivacyModeOn();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void PrivacyModeToggle()
|
|
||||||
{
|
|
||||||
VideoCodec.PrivacyModeToggle();
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region IRunDefaultCallRoute Members
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Sets up the room when started into call mode without presenting a source
|
|
||||||
/// </summary>
|
|
||||||
/// <returns></returns>
|
|
||||||
public bool RunDefaultCallRoute()
|
|
||||||
{
|
|
||||||
RunRouteAction(DefaultCodecRouteString);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
private void Initialize()
|
private void Initialize()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (DefaultAudioDevice is IBasicVolumeControls)
|
|
||||||
{
|
|
||||||
DefaultVolumeControls = DefaultAudioDevice as IBasicVolumeControls;
|
|
||||||
}
|
|
||||||
else if (DefaultAudioDevice is IHasVolumeDevice)
|
|
||||||
{
|
|
||||||
DefaultVolumeControls = (DefaultAudioDevice as IHasVolumeDevice).VolumeDevice;
|
|
||||||
}
|
|
||||||
|
|
||||||
CurrentVolumeControls = DefaultVolumeControls;
|
|
||||||
|
|
||||||
_destinationListKey = String.IsNullOrEmpty(_config.DestinationListKey)
|
_destinationListKey = String.IsNullOrEmpty(_config.DestinationListKey)
|
||||||
? DefaultDestinationListKey
|
? DefaultDestinationListKey
|
||||||
: _config.DestinationListKey;
|
: _config.DestinationListKey;
|
||||||
|
|
||||||
SourceListKey = String.IsNullOrEmpty(_config.SourceListKey)
|
|
||||||
? DefaultSourceListKey
|
|
||||||
: _config.SourceListKey;
|
|
||||||
|
|
||||||
InitializeDestinations();
|
InitializeDestinations();
|
||||||
|
|
||||||
InCallFeedback = new BoolFeedback(() =>
|
|
||||||
{
|
|
||||||
var inAudioCall = AudioCodec != null && AudioCodec.IsInCall;
|
|
||||||
var inVideoCall = VideoCodec != null && VideoCodec.IsInCall;
|
|
||||||
|
|
||||||
return inAudioCall || inVideoCall;
|
|
||||||
});
|
|
||||||
|
|
||||||
MicrophonePrivacy = EssentialsRoomConfigHelper.GetMicrophonePrivacy(_config, this);
|
|
||||||
Emergency = EssentialsRoomConfigHelper.GetEmergency(_config, this);
|
|
||||||
|
|
||||||
VideoCodec.CallStatusChange += (o, a) => InCallFeedback.FireUpdate();
|
|
||||||
|
|
||||||
if (AudioCodec != null)
|
|
||||||
{
|
|
||||||
AudioCodec.CallStatusChange += (o, a) => InCallFeedback.FireUpdate();
|
|
||||||
}
|
|
||||||
|
|
||||||
IsSharingFeedback = new BoolFeedback(() => VideoCodec.SharingContentIsOnFeedback.BoolValue);
|
|
||||||
VideoCodec.SharingContentIsOnFeedback.OutputChange += (o, a) => IsSharingFeedback.FireUpdate();
|
|
||||||
|
|
||||||
PrivacyModeIsOnFeedback = new BoolFeedback(() => VideoCodec.PrivacyModeIsOnFeedback.BoolValue);
|
|
||||||
VideoCodec.PrivacyModeIsOnFeedback.OutputChange += (o, a) => PrivacyModeIsOnFeedback.FireUpdate();
|
|
||||||
|
|
||||||
CallTypeFeedback = new IntFeedback(() => 0);
|
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -21,15 +21,14 @@ namespace PepperDash.Essentials
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public const string DefaultCodecRouteString = "codecOsd";
|
public const string DefaultCodecRouteString = "codecOsd";
|
||||||
|
|
||||||
public EssentialsHuddleVtc1PropertiesConfig PropertiesConfig { get; private set; }
|
public EssentialsHuddleVtc1PropertiesConfig PropertiesConfig { get; protected set; }
|
||||||
|
|
||||||
public EssentialsHuddleVtc1Room(DeviceConfig config)
|
public EssentialsHuddleVtc1Room(DeviceConfig config)
|
||||||
: base(config)
|
: base(config)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
PropertiesConfig = JsonConvert.DeserializeObject<EssentialsHuddleVtc1PropertiesConfig>
|
PropertiesConfig = config.Properties.ToObject<EssentialsHuddleVtc1PropertiesConfig>();
|
||||||
(config.Properties.ToString());
|
|
||||||
DefaultDisplay =
|
DefaultDisplay =
|
||||||
DeviceManager.GetDeviceForKey(PropertiesConfig.DefaultDisplayKey) as IRoutingSinkWithSwitching;
|
DeviceManager.GetDeviceForKey(PropertiesConfig.DefaultDisplayKey) as IRoutingSinkWithSwitching;
|
||||||
|
|
||||||
@@ -68,28 +67,28 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
#region IHasAudioCodec Members
|
#region IHasAudioCodec Members
|
||||||
|
|
||||||
public AudioCodecBase AudioCodec { get; private set; }
|
public AudioCodecBase AudioCodec { get; protected set; }
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region IHasVideoCodec Members
|
#region IHasVideoCodec Members
|
||||||
|
|
||||||
public BoolFeedback InCallFeedback { get; private set; }
|
public BoolFeedback InCallFeedback { get; protected set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// States: 0 for on hook, 1 for video, 2 for audio, 3 for telekenesis
|
/// States: 0 for on hook, 1 for video, 2 for audio, 3 for telekenesis
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public IntFeedback CallTypeFeedback { get; private set; }
|
public IntFeedback CallTypeFeedback { get; protected set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// When something in the room is sharing with the far end or through other means
|
/// When something in the room is sharing with the far end or through other means
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public BoolFeedback IsSharingFeedback { get; private set; }
|
public BoolFeedback IsSharingFeedback { get; protected set; }
|
||||||
|
|
||||||
//************************
|
//************************
|
||||||
|
|
||||||
public VideoCodecBase VideoCodec { get; private set; }
|
public VideoCodecBase VideoCodec { get; protected set; }
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@@ -98,7 +97,7 @@ namespace PepperDash.Essentials
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public BoolFeedback PrivacyModeIsOnFeedback { get; private set; }
|
public BoolFeedback PrivacyModeIsOnFeedback { get; protected set; }
|
||||||
|
|
||||||
public void PrivacyModeOff()
|
public void PrivacyModeOff()
|
||||||
{
|
{
|
||||||
@@ -149,18 +148,8 @@ namespace PepperDash.Essentials
|
|||||||
// Combines call feedback from both codecs if available
|
// Combines call feedback from both codecs if available
|
||||||
InCallFeedback = new BoolFeedback(() =>
|
InCallFeedback = new BoolFeedback(() =>
|
||||||
{
|
{
|
||||||
var inAudioCall = false;
|
var inAudioCall = AudioCodec != null && AudioCodec.IsInCall;
|
||||||
var inVideoCall = false;
|
var inVideoCall = VideoCodec != null && VideoCodec.IsInCall;
|
||||||
|
|
||||||
if (AudioCodec != null)
|
|
||||||
{
|
|
||||||
inAudioCall = AudioCodec.IsInCall;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (VideoCodec != null)
|
|
||||||
{
|
|
||||||
inVideoCall = VideoCodec.IsInCall;
|
|
||||||
}
|
|
||||||
|
|
||||||
return inAudioCall || inVideoCall;
|
return inAudioCall || inVideoCall;
|
||||||
});
|
});
|
||||||
@@ -192,7 +181,9 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
CallTypeFeedback = new IntFeedback(() => 0);
|
CallTypeFeedback = new IntFeedback(() => 0);
|
||||||
|
|
||||||
SourceListKey = "default";
|
SourceListKey = String.IsNullOrEmpty(PropertiesConfig.SourceListKey)
|
||||||
|
? DefaultSourceListKey
|
||||||
|
: PropertiesConfig.SourceListKey;
|
||||||
EnablePowerOnToLastSource = true;
|
EnablePowerOnToLastSource = true;
|
||||||
|
|
||||||
var disp = DefaultDisplay as DisplayBase;
|
var disp = DefaultDisplay as DisplayBase;
|
||||||
|
|||||||
Reference in New Issue
Block a user