mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-16 21:24:54 +00:00
Merge branch 'development' into bugfix/SystemMonitor-IndexOutOfRange
This commit is contained in:
2
.github/workflows/docker.yml
vendored
2
.github/workflows/docker.yml
vendored
@@ -58,7 +58,7 @@ jobs:
|
|||||||
- name: Build Solution
|
- name: Build Solution
|
||||||
shell: powershell
|
shell: powershell
|
||||||
run: |
|
run: |
|
||||||
Invoke-Expression "docker run --rm --mount type=bind,source=""$($Env:GITHUB_WORKSPACE)"",target=""c:/project"" pepperdash/sspbuilder c:\cihelpers\vsidebuild.exe -Solution ""c:\project\$($Env:SOLUTION_FILE).sln"" -BuildSolutionConfiguration $($ENV:BUILD_TYPE)"
|
Invoke-Expression "docker run --rm --mount type=bind,source=""$($Env:GITHUB_WORKSPACE)"",target=""c:/project"" pepperdash/sspbuilder:v1.4.1 c:\cihelpers\vsidebuild.exe -Solution ""c:\project\$($Env:SOLUTION_FILE).sln"" -BuildSolutionConfiguration $($ENV:BUILD_TYPE)"
|
||||||
# Zip up the output files as needed
|
# Zip up the output files as needed
|
||||||
- name: Zip Build Output
|
- name: Zip Build Output
|
||||||
shell: powershell
|
shell: powershell
|
||||||
|
|||||||
@@ -155,6 +155,7 @@
|
|||||||
<Compile Include="UIDrivers\Environment Drivers\EssentialsShadeDriver.cs" />
|
<Compile Include="UIDrivers\Environment Drivers\EssentialsShadeDriver.cs" />
|
||||||
<Compile Include="UIDrivers\Essentials\EssentialsHeaderDriver.cs" />
|
<Compile Include="UIDrivers\Essentials\EssentialsHeaderDriver.cs" />
|
||||||
<Compile Include="UIDrivers\JoinedSigInterlock.cs" />
|
<Compile Include="UIDrivers\JoinedSigInterlock.cs" />
|
||||||
|
<Compile Include="UIDrivers\ScreenSaverController.cs" />
|
||||||
<Compile Include="UIDrivers\SigInterlock.cs" />
|
<Compile Include="UIDrivers\SigInterlock.cs" />
|
||||||
<Compile Include="UIDrivers\EssentialsHuddleVTC\EssentialsHuddlePresentationUiDriver.cs" />
|
<Compile Include="UIDrivers\EssentialsHuddleVTC\EssentialsHuddlePresentationUiDriver.cs" />
|
||||||
<Compile Include="UIDrivers\EssentialsHuddle\EssentialsHuddleTechPageDriver.cs" />
|
<Compile Include="UIDrivers\EssentialsHuddle\EssentialsHuddleTechPageDriver.cs" />
|
||||||
|
|||||||
@@ -156,7 +156,10 @@ namespace PepperDash.Essentials.Room.Config
|
|||||||
public EssentialsEnvironmentPropertiesConfig Environment { get; set; }
|
public EssentialsEnvironmentPropertiesConfig Environment { get; set; }
|
||||||
|
|
||||||
[JsonProperty("logo")]
|
[JsonProperty("logo")]
|
||||||
public EssentialsLogoPropertiesConfig Logo { get; set; }
|
public EssentialsLogoPropertiesConfig LogoLight { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("logoDark")]
|
||||||
|
public EssentialsLogoPropertiesConfig LogoDark { get; set; }
|
||||||
|
|
||||||
[JsonProperty("microphonePrivacy")]
|
[JsonProperty("microphonePrivacy")]
|
||||||
public EssentialsRoomMicrophonePrivacyConfig MicrophonePrivacy { get; set; }
|
public EssentialsRoomMicrophonePrivacyConfig MicrophonePrivacy { get; set; }
|
||||||
@@ -181,6 +184,12 @@ namespace PepperDash.Essentials.Room.Config
|
|||||||
|
|
||||||
[JsonProperty("zeroVolumeWhenSwtichingVolumeDevices")]
|
[JsonProperty("zeroVolumeWhenSwtichingVolumeDevices")]
|
||||||
public bool ZeroVolumeWhenSwtichingVolumeDevices { get; set; }
|
public bool ZeroVolumeWhenSwtichingVolumeDevices { get; set; }
|
||||||
|
|
||||||
|
public EssentialsRoomPropertiesConfig()
|
||||||
|
{
|
||||||
|
LogoLight = new EssentialsLogoPropertiesConfig();
|
||||||
|
LogoDark = new EssentialsLogoPropertiesConfig();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class EssentialsAvRoomPropertiesConfig : EssentialsRoomPropertiesConfig
|
public class EssentialsAvRoomPropertiesConfig : EssentialsRoomPropertiesConfig
|
||||||
@@ -280,7 +289,7 @@ namespace PepperDash.Essentials.Room.Config
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets either the custom URL, a local-to-processor URL, or null if it's a default logo
|
/// Gets either the custom URL, a local-to-processor URL, or null if it's a default logo
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string GetUrl()
|
public string GetLogoUrlLight()
|
||||||
{
|
{
|
||||||
if (Type == "url")
|
if (Type == "url")
|
||||||
return Url;
|
return Url;
|
||||||
@@ -289,6 +298,16 @@ namespace PepperDash.Essentials.Room.Config
|
|||||||
CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, 0));
|
CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, 0));
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public string GetLogoUrlDark()
|
||||||
|
{
|
||||||
|
if (Type == "url")
|
||||||
|
return Url;
|
||||||
|
if (Type == "system")
|
||||||
|
return string.Format("http://{0}:8080/logo-dark.png",
|
||||||
|
CrestronEthernetHelper.GetEthernetParameter(CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_IP_ADDRESS, 0));
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -327,7 +327,8 @@ namespace PepperDash.Essentials
|
|||||||
this.SetRoomOccupancy(DeviceManager.GetDeviceForKey(PropertiesConfig.Occupancy.DeviceKey) as
|
this.SetRoomOccupancy(DeviceManager.GetDeviceForKey(PropertiesConfig.Occupancy.DeviceKey) as
|
||||||
IOccupancyStatusProvider, PropertiesConfig.Occupancy.TimeoutMinutes);
|
IOccupancyStatusProvider, PropertiesConfig.Occupancy.TimeoutMinutes);
|
||||||
|
|
||||||
this.LogoUrl = PropertiesConfig.Logo.GetUrl();
|
this.LogoUrlLightBkgnd = PropertiesConfig.LogoLight.GetLogoUrlLight();
|
||||||
|
this.LogoUrlDarkBkgnd = PropertiesConfig.LogoDark.GetLogoUrlDark();
|
||||||
this.SourceListKey = PropertiesConfig.SourceListKey;
|
this.SourceListKey = PropertiesConfig.SourceListKey;
|
||||||
this.DefaultSourceItem = PropertiesConfig.DefaultSourceItem;
|
this.DefaultSourceItem = PropertiesConfig.DefaultSourceItem;
|
||||||
this.DefaultVolume = (ushort)(PropertiesConfig.Volumes.Master.Level * 65535 / 100);
|
this.DefaultVolume = (ushort)(PropertiesConfig.Volumes.Master.Level * 65535 / 100);
|
||||||
|
|||||||
@@ -250,7 +250,8 @@ namespace PepperDash.Essentials
|
|||||||
this.SetRoomOccupancy(DeviceManager.GetDeviceForKey(PropertiesConfig.Occupancy.DeviceKey) as
|
this.SetRoomOccupancy(DeviceManager.GetDeviceForKey(PropertiesConfig.Occupancy.DeviceKey) as
|
||||||
IOccupancyStatusProvider, PropertiesConfig.Occupancy.TimeoutMinutes);
|
IOccupancyStatusProvider, PropertiesConfig.Occupancy.TimeoutMinutes);
|
||||||
|
|
||||||
this.LogoUrl = PropertiesConfig.Logo.GetUrl();
|
this.LogoUrlLightBkgnd = PropertiesConfig.LogoLight.GetLogoUrlLight();
|
||||||
|
this.LogoUrlDarkBkgnd = PropertiesConfig.LogoDark.GetLogoUrlDark();
|
||||||
this.SourceListKey = PropertiesConfig.SourceListKey;
|
this.SourceListKey = PropertiesConfig.SourceListKey;
|
||||||
this.DefaultSourceItem = PropertiesConfig.DefaultSourceItem;
|
this.DefaultSourceItem = PropertiesConfig.DefaultSourceItem;
|
||||||
this.DefaultVolume = (ushort)(PropertiesConfig.Volumes.Master.Level * 65535 / 100);
|
this.DefaultVolume = (ushort)(PropertiesConfig.Volumes.Master.Level * 65535 / 100);
|
||||||
|
|||||||
@@ -50,6 +50,19 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
//************************
|
//************************
|
||||||
|
|
||||||
|
public override string SourceListKey
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return _SourceListKey;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_SourceListKey = value;
|
||||||
|
SetCodecExternalSources();
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected override Func<bool> OnFeedbackFunc
|
protected override Func<bool> OnFeedbackFunc
|
||||||
{
|
{
|
||||||
@@ -206,6 +219,8 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
VideoCodec = DeviceManager.GetDeviceForKey(PropertiesConfig.VideoCodecKey) as
|
VideoCodec = DeviceManager.GetDeviceForKey(PropertiesConfig.VideoCodecKey) as
|
||||||
PepperDash.Essentials.Devices.Common.VideoCodec.VideoCodecBase;
|
PepperDash.Essentials.Devices.Common.VideoCodec.VideoCodecBase;
|
||||||
|
|
||||||
|
|
||||||
if (VideoCodec == null)
|
if (VideoCodec == null)
|
||||||
throw new ArgumentNullException("codec cannot be null");
|
throw new ArgumentNullException("codec cannot be null");
|
||||||
|
|
||||||
@@ -298,6 +313,7 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
|
|
||||||
VideoCodec.CallStatusChange += (o, a) => this.InCallFeedback.FireUpdate();
|
VideoCodec.CallStatusChange += (o, a) => this.InCallFeedback.FireUpdate();
|
||||||
|
VideoCodec.IsReadyChange += (o, a) => this.SetCodecExternalSources();
|
||||||
|
|
||||||
if (AudioCodec != null)
|
if (AudioCodec != null)
|
||||||
AudioCodec.CallStatusChange += (o, a) => this.InCallFeedback.FireUpdate();
|
AudioCodec.CallStatusChange += (o, a) => this.InCallFeedback.FireUpdate();
|
||||||
@@ -340,7 +356,9 @@ namespace PepperDash.Essentials
|
|||||||
IOccupancyStatusProvider, PropertiesConfig.Occupancy.TimeoutMinutes);
|
IOccupancyStatusProvider, PropertiesConfig.Occupancy.TimeoutMinutes);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.LogoUrl = PropertiesConfig.Logo.GetUrl();
|
this.LogoUrlLightBkgnd = PropertiesConfig.LogoLight.GetLogoUrlLight();
|
||||||
|
this.LogoUrlDarkBkgnd = PropertiesConfig.LogoDark.GetLogoUrlDark();
|
||||||
|
|
||||||
this.SourceListKey = PropertiesConfig.SourceListKey;
|
this.SourceListKey = PropertiesConfig.SourceListKey;
|
||||||
this.DefaultSourceItem = PropertiesConfig.DefaultSourceItem;
|
this.DefaultSourceItem = PropertiesConfig.DefaultSourceItem;
|
||||||
this.DefaultVolume = (ushort)(PropertiesConfig.Volumes.Master.Level * 65535 / 100);
|
this.DefaultVolume = (ushort)(PropertiesConfig.Volumes.Master.Level * 65535 / 100);
|
||||||
@@ -348,7 +366,6 @@ namespace PepperDash.Essentials
|
|||||||
return base.CustomActivate();
|
return base.CustomActivate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -670,6 +687,42 @@ namespace PepperDash.Essentials
|
|||||||
(room as EssentialsHuddleSpaceRoom).RunRouteAction("roomOff");
|
(room as EssentialsHuddleSpaceRoom).RunRouteAction("roomOff");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Setup the external sources for the Cisco Touch 10 devices that support IHasExternalSourceSwitch
|
||||||
|
/// </summary>
|
||||||
|
private void SetCodecExternalSources()
|
||||||
|
{
|
||||||
|
var videoCodecWithExternalSwitching = VideoCodec as IHasExternalSourceSwitching;
|
||||||
|
|
||||||
|
if (videoCodecWithExternalSwitching == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
string codecTieLine = "";
|
||||||
|
codecTieLine = ConfigReader.ConfigObject.TieLines.SingleOrDefault(x => x.DestinationKey == VideoCodec.Key).DestinationPort;
|
||||||
|
videoCodecWithExternalSwitching.ClearExternalSources();
|
||||||
|
videoCodecWithExternalSwitching.RunRouteAction = RunRouteAction;
|
||||||
|
var srcList = ConfigReader.ConfigObject.SourceLists.SingleOrDefault(x => x.Key == SourceListKey).Value.OrderBy(kv => kv.Value.Order); ;
|
||||||
|
|
||||||
|
foreach (var kvp in srcList)
|
||||||
|
{
|
||||||
|
var srcConfig = kvp.Value;
|
||||||
|
|
||||||
|
if (kvp.Key != DefaultCodecRouteString && kvp.Key != "roomOff")
|
||||||
|
{
|
||||||
|
|
||||||
|
videoCodecWithExternalSwitching.AddExternalSource(codecTieLine, kvp.Key, srcConfig.PreferredName, PepperDash.Essentials.Devices.Common.VideoCodec.Cisco.eExternalSourceType.desktop);
|
||||||
|
videoCodecWithExternalSwitching.SetExternalSourceState(kvp.Key, PepperDash.Essentials.Devices.Common.VideoCodec.Cisco.eExternalSourceMode.Ready);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#region IPrivacy Members
|
#region IPrivacy Members
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -224,6 +224,8 @@ namespace PepperDash.Essentials
|
|||||||
var room = DeviceManager.GetDeviceForKey(props.DefaultRoomKey);
|
var room = DeviceManager.GetDeviceForKey(props.DefaultRoomKey);
|
||||||
if (room is EssentialsHuddleSpaceRoom)
|
if (room is EssentialsHuddleSpaceRoom)
|
||||||
{
|
{
|
||||||
|
// Screen Saver Driver
|
||||||
|
mainDriver.ScreenSaverController = new ScreenSaverController(mainDriver, props);
|
||||||
|
|
||||||
// Header Driver
|
// Header Driver
|
||||||
Debug.Console(0, panelController, "Adding header driver");
|
Debug.Console(0, panelController, "Adding header driver");
|
||||||
@@ -272,6 +274,9 @@ namespace PepperDash.Essentials
|
|||||||
{
|
{
|
||||||
Debug.Console(0, panelController, "Adding huddle space VTC AV driver");
|
Debug.Console(0, panelController, "Adding huddle space VTC AV driver");
|
||||||
|
|
||||||
|
// Screen Saver Driver
|
||||||
|
mainDriver.ScreenSaverController = new ScreenSaverController(mainDriver, props);
|
||||||
|
|
||||||
// Header Driver
|
// Header Driver
|
||||||
mainDriver.HeaderDriver = new EssentialsHeaderDriver(mainDriver, props);
|
mainDriver.HeaderDriver = new EssentialsHeaderDriver(mainDriver, props);
|
||||||
|
|
||||||
|
|||||||
@@ -621,7 +621,7 @@ namespace PepperDash.Essentials
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 15030 Visibility for room data popup
|
/// 15030 Visibility for room data popup
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const uint RoomHeaderPageVisible = 15030;
|
public const uint RoomHeaderInfoPageVisible = 15030;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 15031
|
/// 15031
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -803,6 +803,47 @@ namespace PepperDash.Essentials
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public const uint SetupFullDistrib = 15091;
|
public const uint SetupFullDistrib = 15091;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 15092
|
||||||
|
/// </summary>
|
||||||
|
public const uint StartMCPageVisible = 15092;
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 15093
|
||||||
|
/// </summary>
|
||||||
|
public const uint RoomHeaderInfoMCPageVisible = 15093;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 15094
|
||||||
|
/// </summary>
|
||||||
|
public const uint MCScreenSaverVisible = 15094;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 15095
|
||||||
|
/// </summary>
|
||||||
|
public const uint MCScreenSaverPosition1Visible = 15095;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 15096
|
||||||
|
/// </summary>
|
||||||
|
public const uint MCScreenSaverPosition2Visible = 15096;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 15097
|
||||||
|
/// </summary>
|
||||||
|
public const uint MCScreenSaverPosition3Visible = 15097;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 15098
|
||||||
|
/// </summary>
|
||||||
|
public const uint MCScreenSaverPosition4Visible = 15098;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 15099
|
||||||
|
/// </summary>
|
||||||
|
public const uint MCScreenSaverClosePress = 15099;
|
||||||
|
|
||||||
// PIN dialogs ************************************
|
// PIN dialogs ************************************
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -146,6 +146,10 @@ namespace PepperDash.Essentials
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public const uint RoomPhoneText = 3904;
|
public const uint RoomPhoneText = 3904;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
/// 3905 - Video address/number for room header
|
||||||
|
/// </summary>
|
||||||
|
public const uint RoomVideoAddressText = 3905;
|
||||||
|
/// <summary>
|
||||||
/// 3906 - The separator for verbose-header text on addresses
|
/// 3906 - The separator for verbose-header text on addresses
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const uint RoomAddressPipeText = 3906;
|
public const uint RoomAddressPipeText = 3906;
|
||||||
@@ -154,6 +158,14 @@ namespace PepperDash.Essentials
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public const uint RoomUserCode = 3907;
|
public const uint RoomUserCode = 3907;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
/// 3908 - The url for the mobile control server
|
||||||
|
/// </summary>
|
||||||
|
public const uint RoomMcUrl = 3908;
|
||||||
|
/// <summary>
|
||||||
|
/// 3909 - The url for the mobile control QR Code image
|
||||||
|
/// </summary>
|
||||||
|
public const uint RoomMcQrCodeUrl = 3909;
|
||||||
|
/// <summary>
|
||||||
/// 3911
|
/// 3911
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const uint PowerOffMessage = 3911;
|
public const uint PowerOffMessage = 3911;
|
||||||
@@ -189,12 +201,19 @@ namespace PepperDash.Essentials
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 3923
|
/// 3923
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const uint LogoUrl = 3923;
|
public const uint LogoUrlLightBkgnd = 3923;
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 3924 - the text on the "call help desk" button
|
/// 3924 - the text on the "call help desk" button
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const uint HelpPageCallButtonText = 3924;
|
public const uint HelpPageCallButtonText = 3924;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 3925
|
||||||
|
/// </summary>
|
||||||
|
public const uint LogoUrlDarkBkgnd = 3925;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 3951
|
/// 3951
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
|
using Crestron.SimplSharp;
|
||||||
using Crestron.SimplSharpPro.DeviceSupport;
|
using Crestron.SimplSharpPro.DeviceSupport;
|
||||||
using Crestron.SimplSharpPro.UI;
|
using Crestron.SimplSharpPro.UI;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
@@ -11,6 +12,8 @@ namespace PepperDash.Essentials
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class EssentialsPanelMainInterfaceDriver : PanelDriverBase
|
public class EssentialsPanelMainInterfaceDriver : PanelDriverBase
|
||||||
{
|
{
|
||||||
|
CTimer InactivityTimer;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Assign the appropriate A/V driver.
|
/// Assign the appropriate A/V driver.
|
||||||
/// Want to keep the AvDriver alive, because it may hold states
|
/// Want to keep the AvDriver alive, because it may hold states
|
||||||
@@ -23,6 +26,8 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
public PanelDriverBase CurrentChildDriver { get; private set; }
|
public PanelDriverBase CurrentChildDriver { get; private set; }
|
||||||
|
|
||||||
|
public ScreenSaverController ScreenSaverController { get; set; }
|
||||||
|
|
||||||
CrestronTouchpanelPropertiesConfig Config;
|
CrestronTouchpanelPropertiesConfig Config;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -35,6 +40,47 @@ namespace PepperDash.Essentials
|
|||||||
: base(trilist)
|
: base(trilist)
|
||||||
{
|
{
|
||||||
Config = config;
|
Config = config;
|
||||||
|
|
||||||
|
var tsx52or60 = trilist as Tswx52ButtonVoiceControl;
|
||||||
|
|
||||||
|
if (tsx52or60 != null)
|
||||||
|
{
|
||||||
|
tsx52or60.ExtenderTouchDetectionReservedSigs.DeviceExtenderSigChange += ExtenderTouchDetectionReservedSigs_DeviceExtenderSigChange;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var tswx70 = trilist as TswX70Base;
|
||||||
|
if (tswx70 != null)
|
||||||
|
{
|
||||||
|
tswx70.ExtenderTouchDetectionReservedSigs.DeviceExtenderSigChange += ExtenderTouchDetectionReservedSigs_DeviceExtenderSigChange;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void ExtenderTouchDetectionReservedSigs_DeviceExtenderSigChange(Crestron.SimplSharpPro.DeviceExtender currentDeviceExtender, Crestron.SimplSharpPro.SigEventArgs args)
|
||||||
|
{
|
||||||
|
var timeoutMs = Config.ScreenSaverTimeoutMin * 60 * 1000;
|
||||||
|
|
||||||
|
if (args.Sig.BoolValue)
|
||||||
|
{
|
||||||
|
if (InactivityTimer != null)
|
||||||
|
{
|
||||||
|
InactivityTimer.Reset(timeoutMs);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
InactivityTimer = new CTimer((o) => InactivityTimerExpired(), timeoutMs);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void InactivityTimerExpired()
|
||||||
|
{
|
||||||
|
InactivityTimer.Stop();
|
||||||
|
InactivityTimer.Dispose();
|
||||||
|
InactivityTimer = null;
|
||||||
|
|
||||||
|
ScreenSaverController.Show();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Show()
|
public override void Show()
|
||||||
@@ -46,7 +92,7 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
public override void Hide()
|
public override void Hide()
|
||||||
{
|
{
|
||||||
TriList.BooleanInput[UIBoolJoin.StartPageVisible].BoolValue = false;
|
TriList.BooleanInput[AvDriver.StartPageVisibleJoin].BoolValue = false;
|
||||||
base.Hide();
|
base.Hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -267,7 +267,7 @@
|
|||||||
// HideAndClearCurrentDisplayModeSigsInUse();
|
// HideAndClearCurrentDisplayModeSigsInUse();
|
||||||
// tl[UIBoolJoin.TopBarHabaneroVisible].BoolValue = false;
|
// tl[UIBoolJoin.TopBarHabaneroVisible].BoolValue = false;
|
||||||
// tl[UIBoolJoin.ActivityFooterVisible].BoolValue = false;
|
// tl[UIBoolJoin.ActivityFooterVisible].BoolValue = false;
|
||||||
// tl[UIBoolJoin.StartPageVisible].BoolValue = false;
|
// tl[StartPageVisibleJoin].BoolValue = false;
|
||||||
// tl[UIBoolJoin.TapToBeginVisible].BoolValue = false;
|
// tl[UIBoolJoin.TapToBeginVisible].BoolValue = false;
|
||||||
// tl[UIBoolJoin.ToggleSharingModeVisible].BoolValue = false;
|
// tl[UIBoolJoin.ToggleSharingModeVisible].BoolValue = false;
|
||||||
// tl[UIBoolJoin.SourceStagingBarVisible].BoolValue = false;
|
// tl[UIBoolJoin.SourceStagingBarVisible].BoolValue = false;
|
||||||
@@ -335,7 +335,7 @@
|
|||||||
// }
|
// }
|
||||||
// else
|
// else
|
||||||
// {
|
// {
|
||||||
// TriList.BooleanInput[UIBoolJoin.StartPageVisible].BoolValue = true;
|
// TriList.BooleanInput[StartPageVisibleJoin].BoolValue = true;
|
||||||
// TriList.BooleanInput[UIBoolJoin.TapToBeginVisible].BoolValue = true;
|
// TriList.BooleanInput[UIBoolJoin.TapToBeginVisible].BoolValue = true;
|
||||||
// TriList.BooleanInput[UIBoolJoin.SelectASourceVisible].BoolValue = false;
|
// TriList.BooleanInput[UIBoolJoin.SelectASourceVisible].BoolValue = false;
|
||||||
// }
|
// }
|
||||||
@@ -525,7 +525,7 @@
|
|||||||
// if (!_CurrentRoom.OnFeedback.BoolValue)
|
// if (!_CurrentRoom.OnFeedback.BoolValue)
|
||||||
// {
|
// {
|
||||||
// ShareButtonSig.BoolValue = true;
|
// ShareButtonSig.BoolValue = true;
|
||||||
// TriList.BooleanInput[UIBoolJoin.StartPageVisible].BoolValue = false;
|
// TriList.BooleanInput[StartPageVisibleJoin].BoolValue = false;
|
||||||
// ShowCurrentSharingMode();
|
// ShowCurrentSharingMode();
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
@@ -953,13 +953,13 @@
|
|||||||
// if (value)
|
// if (value)
|
||||||
// {
|
// {
|
||||||
// SetupActivityFooterWhenRoomOn();
|
// SetupActivityFooterWhenRoomOn();
|
||||||
// TriList.BooleanInput[UIBoolJoin.StartPageVisible].BoolValue = false;
|
// TriList.BooleanInput[StartPageVisibleJoin].BoolValue = false;
|
||||||
// }
|
// }
|
||||||
// else
|
// else
|
||||||
// {
|
// {
|
||||||
// HideCurrentSharingMode();
|
// HideCurrentSharingMode();
|
||||||
// SetupActivityFooterWhenRoomOff();
|
// SetupActivityFooterWhenRoomOff();
|
||||||
// TriList.BooleanInput[UIBoolJoin.StartPageVisible].BoolValue = true;
|
// TriList.BooleanInput[StartPageVisibleJoin].BoolValue = true;
|
||||||
// if (LastSelectedSourceSig != null)
|
// if (LastSelectedSourceSig != null)
|
||||||
// {
|
// {
|
||||||
// LastSelectedSourceSig.BoolValue = false;
|
// LastSelectedSourceSig.BoolValue = false;
|
||||||
|
|||||||
@@ -24,6 +24,9 @@ namespace PepperDash.Essentials
|
|||||||
PresentationMode, AudioSetup
|
PresentationMode, AudioSetup
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public uint StartPageVisibleJoin { get; private set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Whether volume ramping from this panel will show the volume
|
/// Whether volume ramping from this panel will show the volume
|
||||||
/// gauge popup.
|
/// gauge popup.
|
||||||
@@ -209,6 +212,7 @@ namespace PepperDash.Essentials
|
|||||||
"Tap Share to begin";
|
"Tap Share to begin";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -225,20 +229,34 @@ namespace PepperDash.Essentials
|
|||||||
if (Config.HeaderStyle.ToLower() == CrestronTouchpanelPropertiesConfig.Habanero)
|
if (Config.HeaderStyle.ToLower() == CrestronTouchpanelPropertiesConfig.Habanero)
|
||||||
{
|
{
|
||||||
TriList.SetSigFalseAction(UIBoolJoin.HeaderRoomButtonPress, () =>
|
TriList.SetSigFalseAction(UIBoolJoin.HeaderRoomButtonPress, () =>
|
||||||
PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.RoomHeaderPageVisible));
|
{
|
||||||
|
if (CurrentRoom.IsMobileControlEnabled)
|
||||||
|
{
|
||||||
|
Debug.Console(1, "Showing Mobile Control Header Info");
|
||||||
|
PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.RoomHeaderInfoMCPageVisible);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Debug.Console(1, "Showing Non Mobile Control Header Info");
|
||||||
|
PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.RoomHeaderInfoPageVisible);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
else if (Config.HeaderStyle.ToLower() == CrestronTouchpanelPropertiesConfig.Verbose)
|
else if (Config.HeaderStyle.ToLower() == CrestronTouchpanelPropertiesConfig.Verbose)
|
||||||
{
|
{
|
||||||
// room name on join 1, concat phone and sip on join 2, no button method
|
TriList.SetSigFalseAction(UIBoolJoin.HeaderRoomButtonPress, () =>
|
||||||
//var addr = roomConf.Addresses;
|
{
|
||||||
//if (addr == null) // protect from missing values by using default empties
|
if (CurrentRoom.IsMobileControlEnabled)
|
||||||
// addr = new EssentialsRoomAddressPropertiesConfig();
|
{
|
||||||
//// empty string when either missing, pipe when both showing
|
Debug.Console(1, "Showing Mobile Control Header Info");
|
||||||
//TriList.SetString(UIStringJoin.RoomAddressPipeText,
|
PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.RoomHeaderInfoMCPageVisible);
|
||||||
// (string.IsNullOrEmpty(addr.PhoneNumber.Trim())
|
}
|
||||||
// || string.IsNullOrEmpty(addr.SipAddress.Trim())) ? "" : " | ");
|
else
|
||||||
//TriList.SetString(UIStringJoin.RoomPhoneText, addr.PhoneNumber);
|
{
|
||||||
//TriList.SetString(UIStringJoin.RoomSipText, addr.SipAddress);
|
Debug.Console(1, "Showing Non Mobile Control Header Info");
|
||||||
|
PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.RoomHeaderInfoPageVisible);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
TriList.SetBool(UIBoolJoin.DateAndTimeVisible, Config.ShowDate && Config.ShowTime);
|
TriList.SetBool(UIBoolJoin.DateAndTimeVisible, Config.ShowDate && Config.ShowTime);
|
||||||
@@ -256,7 +274,7 @@ namespace PepperDash.Essentials
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
TriList.SetBool(UIBoolJoin.StartPageVisible, true);
|
TriList.SetBool(StartPageVisibleJoin, true);
|
||||||
TriList.SetBool(UIBoolJoin.TapToBeginVisible, true);
|
TriList.SetBool(UIBoolJoin.TapToBeginVisible, true);
|
||||||
SetupActivityFooterWhenRoomOff();
|
SetupActivityFooterWhenRoomOff();
|
||||||
}
|
}
|
||||||
@@ -321,7 +339,7 @@ namespace PepperDash.Essentials
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
void ShowLogo()
|
void ShowLogo()
|
||||||
{
|
{
|
||||||
if (CurrentRoom.LogoUrl == null)
|
if (CurrentRoom.LogoUrlLightBkgnd == null)
|
||||||
{
|
{
|
||||||
TriList.SetBool(UIBoolJoin.LogoDefaultVisible, true);
|
TriList.SetBool(UIBoolJoin.LogoDefaultVisible, true);
|
||||||
TriList.SetBool(UIBoolJoin.LogoUrlVisible, false);
|
TriList.SetBool(UIBoolJoin.LogoUrlVisible, false);
|
||||||
@@ -330,7 +348,8 @@ namespace PepperDash.Essentials
|
|||||||
{
|
{
|
||||||
TriList.SetBool(UIBoolJoin.LogoDefaultVisible, false);
|
TriList.SetBool(UIBoolJoin.LogoDefaultVisible, false);
|
||||||
TriList.SetBool(UIBoolJoin.LogoUrlVisible, true);
|
TriList.SetBool(UIBoolJoin.LogoUrlVisible, true);
|
||||||
TriList.SetString(UIStringJoin.LogoUrl, _CurrentRoom.LogoUrl);
|
TriList.SetString(UIStringJoin.LogoUrlLightBkgnd, _CurrentRoom.LogoUrlLightBkgnd);
|
||||||
|
TriList.SetString(UIStringJoin.LogoUrlDarkBkgnd, _CurrentRoom.LogoUrlDarkBkgnd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -351,7 +370,7 @@ namespace PepperDash.Essentials
|
|||||||
HideAndClearCurrentDisplayModeSigsInUse();
|
HideAndClearCurrentDisplayModeSigsInUse();
|
||||||
TriList.BooleanInput[UIBoolJoin.TopBarHabaneroDynamicVisible].BoolValue = false;
|
TriList.BooleanInput[UIBoolJoin.TopBarHabaneroDynamicVisible].BoolValue = false;
|
||||||
TriList.BooleanInput[UIBoolJoin.ActivityFooterVisible].BoolValue = false;
|
TriList.BooleanInput[UIBoolJoin.ActivityFooterVisible].BoolValue = false;
|
||||||
TriList.BooleanInput[UIBoolJoin.StartPageVisible].BoolValue = false;
|
TriList.BooleanInput[StartPageVisibleJoin].BoolValue = false;
|
||||||
TriList.BooleanInput[UIBoolJoin.TapToBeginVisible].BoolValue = false;
|
TriList.BooleanInput[UIBoolJoin.TapToBeginVisible].BoolValue = false;
|
||||||
TriList.BooleanInput[UIBoolJoin.SelectASourceVisible].BoolValue = false;
|
TriList.BooleanInput[UIBoolJoin.SelectASourceVisible].BoolValue = false;
|
||||||
//TriList.BooleanInput[UIBoolJoin.StagingPageVisible].BoolValue = false;
|
//TriList.BooleanInput[UIBoolJoin.StagingPageVisible].BoolValue = false;
|
||||||
@@ -416,7 +435,7 @@ namespace PepperDash.Essentials
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
TriList.BooleanInput[UIBoolJoin.StartPageVisible].BoolValue = true;
|
TriList.BooleanInput[StartPageVisibleJoin].BoolValue = true;
|
||||||
TriList.BooleanInput[UIBoolJoin.TapToBeginVisible].BoolValue = true;
|
TriList.BooleanInput[UIBoolJoin.TapToBeginVisible].BoolValue = true;
|
||||||
TriList.BooleanInput[UIBoolJoin.SelectASourceVisible].BoolValue = false;
|
TriList.BooleanInput[UIBoolJoin.SelectASourceVisible].BoolValue = false;
|
||||||
}
|
}
|
||||||
@@ -474,7 +493,7 @@ namespace PepperDash.Essentials
|
|||||||
void ShareButtonPressed()
|
void ShareButtonPressed()
|
||||||
{
|
{
|
||||||
ShareButtonSig.BoolValue = true;
|
ShareButtonSig.BoolValue = true;
|
||||||
TriList.BooleanInput[UIBoolJoin.StartPageVisible].BoolValue = false;
|
TriList.BooleanInput[StartPageVisibleJoin].BoolValue = false;
|
||||||
TriList.BooleanInput[UIBoolJoin.SourceStagingBarVisible].BoolValue = true;
|
TriList.BooleanInput[UIBoolJoin.SourceStagingBarVisible].BoolValue = true;
|
||||||
TriList.BooleanInput[UIBoolJoin.SelectASourceVisible].BoolValue = true;
|
TriList.BooleanInput[UIBoolJoin.SelectASourceVisible].BoolValue = true;
|
||||||
// Run default source when room is off and share is pressed
|
// Run default source when room is off and share is pressed
|
||||||
@@ -778,7 +797,7 @@ namespace PepperDash.Essentials
|
|||||||
}
|
}
|
||||||
// Name and logo
|
// Name and logo
|
||||||
TriList.StringInput[UIStringJoin.CurrentRoomName].StringValue = _CurrentRoom.Name;
|
TriList.StringInput[UIStringJoin.CurrentRoomName].StringValue = _CurrentRoom.Name;
|
||||||
if (_CurrentRoom.LogoUrl == null)
|
if (_CurrentRoom.LogoUrlLightBkgnd == null)
|
||||||
{
|
{
|
||||||
TriList.BooleanInput[UIBoolJoin.LogoDefaultVisible].BoolValue = true;
|
TriList.BooleanInput[UIBoolJoin.LogoDefaultVisible].BoolValue = true;
|
||||||
TriList.BooleanInput[UIBoolJoin.LogoUrlVisible].BoolValue = false;
|
TriList.BooleanInput[UIBoolJoin.LogoUrlVisible].BoolValue = false;
|
||||||
@@ -787,7 +806,9 @@ namespace PepperDash.Essentials
|
|||||||
{
|
{
|
||||||
TriList.BooleanInput[UIBoolJoin.LogoDefaultVisible].BoolValue = false;
|
TriList.BooleanInput[UIBoolJoin.LogoDefaultVisible].BoolValue = false;
|
||||||
TriList.BooleanInput[UIBoolJoin.LogoUrlVisible].BoolValue = true;
|
TriList.BooleanInput[UIBoolJoin.LogoUrlVisible].BoolValue = true;
|
||||||
TriList.StringInput[UIStringJoin.LogoUrl].StringValue = _CurrentRoom.LogoUrl;
|
TriList.StringInput[UIStringJoin.LogoUrlLightBkgnd].StringValue = _CurrentRoom.LogoUrlLightBkgnd;
|
||||||
|
TriList.StringInput[UIStringJoin.LogoUrlLightBkgnd].StringValue = _CurrentRoom.LogoUrlDarkBkgnd;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Shutdown timer
|
// Shutdown timer
|
||||||
@@ -820,12 +841,43 @@ namespace PepperDash.Essentials
|
|||||||
if (_CurrentRoom == room) return;
|
if (_CurrentRoom == room) return;
|
||||||
// Disconnect current (probably never called)
|
// Disconnect current (probably never called)
|
||||||
|
|
||||||
|
if (_CurrentRoom != null)
|
||||||
|
_CurrentRoom.ConfigChanged -= room_ConfigChanged;
|
||||||
|
|
||||||
room.ConfigChanged -= room_ConfigChanged;
|
room.ConfigChanged -= room_ConfigChanged;
|
||||||
room.ConfigChanged += room_ConfigChanged;
|
room.ConfigChanged += room_ConfigChanged;
|
||||||
|
|
||||||
|
if (room.IsMobileControlEnabled)
|
||||||
|
{
|
||||||
|
StartPageVisibleJoin = UIBoolJoin.StartMCPageVisible;
|
||||||
|
UpdateMCJoins(room);
|
||||||
|
|
||||||
|
if (_CurrentRoom != null)
|
||||||
|
_CurrentRoom.MobileControlRoomBridge.UserCodeChanged -= MobileControlRoomBridge_UserCodeChanged;
|
||||||
|
|
||||||
|
room.MobileControlRoomBridge.UserCodeChanged -= MobileControlRoomBridge_UserCodeChanged;
|
||||||
|
room.MobileControlRoomBridge.UserCodeChanged += MobileControlRoomBridge_UserCodeChanged;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
StartPageVisibleJoin = UIBoolJoin.StartPageVisible;
|
||||||
|
}
|
||||||
|
|
||||||
RefreshCurrentRoom(room);
|
RefreshCurrentRoom(room);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MobileControlRoomBridge_UserCodeChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
UpdateMCJoins(_CurrentRoom);
|
||||||
|
}
|
||||||
|
|
||||||
|
void UpdateMCJoins(EssentialsHuddleSpaceRoom room)
|
||||||
|
{
|
||||||
|
TriList.SetString(UIStringJoin.RoomMcUrl, room.MobileControlRoomBridge.McServerUrl);
|
||||||
|
TriList.SetString(UIStringJoin.RoomMcQrCodeUrl, room.MobileControlRoomBridge.QrCodeUrl);
|
||||||
|
TriList.SetString(UIStringJoin.RoomUserCode, room.MobileControlRoomBridge.UserCode);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Fires when room config of current room has changed. Meant to refresh room values to propegate any updates to UI
|
/// Fires when room config of current room has changed. Meant to refresh room values to propegate any updates to UI
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -855,7 +907,7 @@ namespace PepperDash.Essentials
|
|||||||
SetupActivityFooterWhenRoomOn();
|
SetupActivityFooterWhenRoomOn();
|
||||||
TriList.BooleanInput[UIBoolJoin.SelectASourceVisible].BoolValue = false;
|
TriList.BooleanInput[UIBoolJoin.SelectASourceVisible].BoolValue = false;
|
||||||
TriList.BooleanInput[UIBoolJoin.SourceStagingBarVisible].BoolValue = true;
|
TriList.BooleanInput[UIBoolJoin.SourceStagingBarVisible].BoolValue = true;
|
||||||
TriList.BooleanInput[UIBoolJoin.StartPageVisible].BoolValue = false;
|
TriList.BooleanInput[StartPageVisibleJoin].BoolValue = false;
|
||||||
TriList.BooleanInput[UIBoolJoin.VolumeSingleMute1Visible].BoolValue = true;
|
TriList.BooleanInput[UIBoolJoin.VolumeSingleMute1Visible].BoolValue = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -863,7 +915,7 @@ namespace PepperDash.Essentials
|
|||||||
{
|
{
|
||||||
SetupActivityFooterWhenRoomOff();
|
SetupActivityFooterWhenRoomOff();
|
||||||
ShowLogo();
|
ShowLogo();
|
||||||
TriList.BooleanInput[UIBoolJoin.StartPageVisible].BoolValue = true;
|
TriList.BooleanInput[StartPageVisibleJoin].BoolValue = true;
|
||||||
TriList.BooleanInput[UIBoolJoin.VolumeSingleMute1Visible].BoolValue = false;
|
TriList.BooleanInput[UIBoolJoin.VolumeSingleMute1Visible].BoolValue = false;
|
||||||
TriList.BooleanInput[UIBoolJoin.SourceStagingBarVisible].BoolValue = false;
|
TriList.BooleanInput[UIBoolJoin.SourceStagingBarVisible].BoolValue = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,6 +28,8 @@ namespace PepperDash.Essentials
|
|||||||
Presentation, AudioSetup, Call, Start
|
Presentation, AudioSetup, Call, Start
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public uint StartPageVisibleJoin { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Whether volume ramping from this panel will show the volume
|
/// Whether volume ramping from this panel will show the volume
|
||||||
/// gauge popup.
|
/// gauge popup.
|
||||||
@@ -240,20 +242,34 @@ namespace PepperDash.Essentials
|
|||||||
if (Config.HeaderStyle.ToLower() == CrestronTouchpanelPropertiesConfig.Habanero)
|
if (Config.HeaderStyle.ToLower() == CrestronTouchpanelPropertiesConfig.Habanero)
|
||||||
{
|
{
|
||||||
TriList.SetSigFalseAction(UIBoolJoin.HeaderRoomButtonPress, () =>
|
TriList.SetSigFalseAction(UIBoolJoin.HeaderRoomButtonPress, () =>
|
||||||
PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.RoomHeaderPageVisible));
|
{
|
||||||
|
if (CurrentRoom.IsMobileControlEnabled)
|
||||||
|
{
|
||||||
|
Debug.Console(1, "Showing Mobile Control Header Info");
|
||||||
|
PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.RoomHeaderInfoMCPageVisible);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Debug.Console(1, "Showing Non Mobile Control Header Info");
|
||||||
|
PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.RoomHeaderInfoPageVisible);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
else if (Config.HeaderStyle.ToLower() == CrestronTouchpanelPropertiesConfig.Verbose)
|
else if (Config.HeaderStyle.ToLower() == CrestronTouchpanelPropertiesConfig.Verbose)
|
||||||
{
|
{
|
||||||
// room name on join 1, concat phone and sip on join 2, no button method
|
TriList.SetSigFalseAction(UIBoolJoin.HeaderRoomButtonPress, () =>
|
||||||
//var addr = roomConf.Addresses;
|
{
|
||||||
//if (addr == null) // protect from missing values by using default empties
|
if (CurrentRoom.IsMobileControlEnabled)
|
||||||
// addr = new EssentialsRoomAddressPropertiesConfig();
|
{
|
||||||
//// empty string when either missing, pipe when both showing
|
Debug.Console(1, "Showing Mobile Control Header Info");
|
||||||
//TriList.SetString(UIStringJoin.RoomAddressPipeText,
|
PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.RoomHeaderInfoMCPageVisible);
|
||||||
// (string.IsNullOrEmpty(addr.PhoneNumber.Trim())
|
}
|
||||||
// || string.IsNullOrEmpty(addr.SipAddress.Trim())) ? "" : " | ");
|
else
|
||||||
//TriList.SetString(UIStringJoin.RoomPhoneText, addr.PhoneNumber);
|
{
|
||||||
//TriList.SetString(UIStringJoin.RoomSipText, addr.SipAddress);
|
Debug.Console(1, "Showing Non Mobile Control Header Info");
|
||||||
|
PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.RoomHeaderInfoPageVisible);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
TriList.SetBool(UIBoolJoin.DateAndTimeVisible, Config.ShowDate && Config.ShowTime);
|
TriList.SetBool(UIBoolJoin.DateAndTimeVisible, Config.ShowDate && Config.ShowTime);
|
||||||
@@ -276,7 +292,7 @@ namespace PepperDash.Essentials
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
TriList.SetBool(UIBoolJoin.StartPageVisible, true);
|
TriList.SetBool(StartPageVisibleJoin, true);
|
||||||
TriList.SetBool(UIBoolJoin.TapToBeginVisible, true);
|
TriList.SetBool(UIBoolJoin.TapToBeginVisible, true);
|
||||||
SetupActivityFooterWhenRoomOff();
|
SetupActivityFooterWhenRoomOff();
|
||||||
}
|
}
|
||||||
@@ -332,7 +348,7 @@ namespace PepperDash.Essentials
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
void ShowLogo()
|
void ShowLogo()
|
||||||
{
|
{
|
||||||
if (CurrentRoom.LogoUrl == null)
|
if (CurrentRoom.LogoUrlLightBkgnd == null)
|
||||||
{
|
{
|
||||||
TriList.SetBool(UIBoolJoin.LogoDefaultVisible, true);
|
TriList.SetBool(UIBoolJoin.LogoDefaultVisible, true);
|
||||||
TriList.SetBool(UIBoolJoin.LogoUrlVisible, false);
|
TriList.SetBool(UIBoolJoin.LogoUrlVisible, false);
|
||||||
@@ -341,7 +357,8 @@ namespace PepperDash.Essentials
|
|||||||
{
|
{
|
||||||
TriList.SetBool(UIBoolJoin.LogoDefaultVisible, false);
|
TriList.SetBool(UIBoolJoin.LogoDefaultVisible, false);
|
||||||
TriList.SetBool(UIBoolJoin.LogoUrlVisible, true);
|
TriList.SetBool(UIBoolJoin.LogoUrlVisible, true);
|
||||||
TriList.SetString(UIStringJoin.LogoUrl, _CurrentRoom.LogoUrl);
|
TriList.SetString(UIStringJoin.LogoUrlLightBkgnd, _CurrentRoom.LogoUrlLightBkgnd);
|
||||||
|
TriList.SetString(UIStringJoin.LogoUrlDarkBkgnd, _CurrentRoom.LogoUrlDarkBkgnd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -362,7 +379,7 @@ namespace PepperDash.Essentials
|
|||||||
HideAndClearCurrentDisplayModeSigsInUse();
|
HideAndClearCurrentDisplayModeSigsInUse();
|
||||||
TriList.SetBool(UIBoolJoin.TopBarHabaneroDynamicVisible, false);
|
TriList.SetBool(UIBoolJoin.TopBarHabaneroDynamicVisible, false);
|
||||||
TriList.BooleanInput[UIBoolJoin.ActivityFooterVisible].BoolValue = false;
|
TriList.BooleanInput[UIBoolJoin.ActivityFooterVisible].BoolValue = false;
|
||||||
TriList.BooleanInput[UIBoolJoin.StartPageVisible].BoolValue = false;
|
TriList.BooleanInput[StartPageVisibleJoin].BoolValue = false;
|
||||||
TriList.BooleanInput[UIBoolJoin.TapToBeginVisible].BoolValue = false;
|
TriList.BooleanInput[UIBoolJoin.TapToBeginVisible].BoolValue = false;
|
||||||
TriList.BooleanInput[UIBoolJoin.SelectASourceVisible].BoolValue = false;
|
TriList.BooleanInput[UIBoolJoin.SelectASourceVisible].BoolValue = false;
|
||||||
if (NextMeetingTimer != null)
|
if (NextMeetingTimer != null)
|
||||||
@@ -606,7 +623,7 @@ namespace PepperDash.Essentials
|
|||||||
return;
|
return;
|
||||||
HideLogo();
|
HideLogo();
|
||||||
HideNextMeetingPopup();
|
HideNextMeetingPopup();
|
||||||
TriList.SetBool(UIBoolJoin.StartPageVisible, false);
|
TriList.SetBool(StartPageVisibleJoin, false);
|
||||||
TriList.SetBool(UIBoolJoin.SourceStagingBarVisible, false);
|
TriList.SetBool(UIBoolJoin.SourceStagingBarVisible, false);
|
||||||
TriList.SetBool(UIBoolJoin.SelectASourceVisible, false);
|
TriList.SetBool(UIBoolJoin.SelectASourceVisible, false);
|
||||||
if (CurrentSourcePageManager != null)
|
if (CurrentSourcePageManager != null)
|
||||||
@@ -626,7 +643,7 @@ namespace PepperDash.Essentials
|
|||||||
if (VCDriver.IsVisible)
|
if (VCDriver.IsVisible)
|
||||||
VCDriver.Hide();
|
VCDriver.Hide();
|
||||||
HideNextMeetingPopup();
|
HideNextMeetingPopup();
|
||||||
TriList.SetBool(UIBoolJoin.StartPageVisible, false);
|
TriList.SetBool(StartPageVisibleJoin, false);
|
||||||
TriList.SetBool(UIBoolJoin.CallStagingBarVisible, false);
|
TriList.SetBool(UIBoolJoin.CallStagingBarVisible, false);
|
||||||
TriList.SetBool(UIBoolJoin.SourceStagingBarVisible, true);
|
TriList.SetBool(UIBoolJoin.SourceStagingBarVisible, true);
|
||||||
// Run default source when room is off and share is pressed
|
// Run default source when room is off and share is pressed
|
||||||
@@ -957,12 +974,43 @@ namespace PepperDash.Essentials
|
|||||||
if (_CurrentRoom == room) return;
|
if (_CurrentRoom == room) return;
|
||||||
// Disconnect current (probably never called)
|
// Disconnect current (probably never called)
|
||||||
|
|
||||||
|
if(_CurrentRoom != null)
|
||||||
|
_CurrentRoom.ConfigChanged -= room_ConfigChanged;
|
||||||
|
|
||||||
room.ConfigChanged -= room_ConfigChanged;
|
room.ConfigChanged -= room_ConfigChanged;
|
||||||
room.ConfigChanged += room_ConfigChanged;
|
room.ConfigChanged += room_ConfigChanged;
|
||||||
|
|
||||||
|
if (room.IsMobileControlEnabled)
|
||||||
|
{
|
||||||
|
StartPageVisibleJoin = UIBoolJoin.StartMCPageVisible;
|
||||||
|
UpdateMCJoins(room);
|
||||||
|
|
||||||
|
if (_CurrentRoom != null)
|
||||||
|
_CurrentRoom.MobileControlRoomBridge.UserCodeChanged -= MobileControlRoomBridge_UserCodeChanged;
|
||||||
|
|
||||||
|
room.MobileControlRoomBridge.UserCodeChanged -= MobileControlRoomBridge_UserCodeChanged;
|
||||||
|
room.MobileControlRoomBridge.UserCodeChanged += MobileControlRoomBridge_UserCodeChanged;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
StartPageVisibleJoin = UIBoolJoin.StartPageVisible;
|
||||||
|
}
|
||||||
|
|
||||||
RefreshCurrentRoom(room);
|
RefreshCurrentRoom(room);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MobileControlRoomBridge_UserCodeChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
UpdateMCJoins(_CurrentRoom);
|
||||||
|
}
|
||||||
|
|
||||||
|
void UpdateMCJoins(EssentialsHuddleVtc1Room room)
|
||||||
|
{
|
||||||
|
TriList.SetString(UIStringJoin.RoomMcUrl, room.MobileControlRoomBridge.McServerUrl);
|
||||||
|
TriList.SetString(UIStringJoin.RoomMcQrCodeUrl, room.MobileControlRoomBridge.QrCodeUrl);
|
||||||
|
TriList.SetString(UIStringJoin.RoomUserCode, room.MobileControlRoomBridge.UserCode);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Fires when room config of current room has changed. Meant to refresh room values to propegate any updates to UI
|
/// Fires when room config of current room has changed. Meant to refresh room values to propegate any updates to UI
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -1002,10 +1050,13 @@ namespace PepperDash.Essentials
|
|||||||
|
|
||||||
var inCall = CurrentRoom.InCallFeedback.BoolValue;
|
var inCall = CurrentRoom.InCallFeedback.BoolValue;
|
||||||
var config = ConfigReader.ConfigObject.SourceLists;
|
var config = ConfigReader.ConfigObject.SourceLists;
|
||||||
|
|
||||||
|
|
||||||
if (config.ContainsKey(_CurrentRoom.SourceListKey))
|
if (config.ContainsKey(_CurrentRoom.SourceListKey))
|
||||||
{
|
{
|
||||||
var srcList = config[_CurrentRoom.SourceListKey].OrderBy(kv => kv.Value.Order);
|
var srcList = config[_CurrentRoom.SourceListKey].OrderBy(kv => kv.Value.Order);
|
||||||
|
|
||||||
|
|
||||||
// Setup sources list
|
// Setup sources list
|
||||||
SourceStagingSrl.Clear();
|
SourceStagingSrl.Clear();
|
||||||
uint i = 1; // counter for UI list
|
uint i = 1; // counter for UI list
|
||||||
@@ -1028,6 +1079,8 @@ namespace PepperDash.Essentials
|
|||||||
b => { if (!b) UiSelectSource(routeKey); });
|
b => { if (!b) UiSelectSource(routeKey); });
|
||||||
SourceStagingSrl.AddItem(item); // add to the SRL
|
SourceStagingSrl.AddItem(item); // add to the SRL
|
||||||
item.RegisterForSourceChange(_CurrentRoom);
|
item.RegisterForSourceChange(_CurrentRoom);
|
||||||
|
Debug.Console(1, "**** KEY {0}", kvp.Key);
|
||||||
|
|
||||||
}
|
}
|
||||||
SourceStagingSrl.Count = (ushort)(i - 1);
|
SourceStagingSrl.Count = (ushort)(i - 1);
|
||||||
}
|
}
|
||||||
@@ -1149,7 +1202,7 @@ namespace PepperDash.Essentials
|
|||||||
var value = _CurrentRoom.OnFeedback.BoolValue;
|
var value = _CurrentRoom.OnFeedback.BoolValue;
|
||||||
TriList.BooleanInput[UIBoolJoin.RoomIsOn].BoolValue = value;
|
TriList.BooleanInput[UIBoolJoin.RoomIsOn].BoolValue = value;
|
||||||
|
|
||||||
TriList.BooleanInput[UIBoolJoin.StartPageVisible].BoolValue = !value;
|
TriList.BooleanInput[StartPageVisibleJoin].BoolValue = !value;
|
||||||
|
|
||||||
if (value) //ON
|
if (value) //ON
|
||||||
{
|
{
|
||||||
@@ -1381,6 +1434,7 @@ namespace PepperDash.Essentials
|
|||||||
void ShowNotificationRibbon(string message, int timeout);
|
void ShowNotificationRibbon(string message, int timeout);
|
||||||
void HideNotificationRibbon();
|
void HideNotificationRibbon();
|
||||||
void ShowTech();
|
void ShowTech();
|
||||||
|
uint StartPageVisibleJoin { get; }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
118
PepperDashEssentials/UIDrivers/ScreenSaverController.cs
Normal file
118
PepperDashEssentials/UIDrivers/ScreenSaverController.cs
Normal file
@@ -0,0 +1,118 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using Crestron.SimplSharp;
|
||||||
|
|
||||||
|
using PepperDash.Core;
|
||||||
|
using PepperDash.Essentials.Core;
|
||||||
|
|
||||||
|
namespace PepperDash.Essentials
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Driver responsible for controlling the screenshaver showing the client logo, MC connection information and QR Code. Moves the elements around to prevent screen burn in
|
||||||
|
/// </summary>
|
||||||
|
public class ScreenSaverController : PanelDriverBase
|
||||||
|
{
|
||||||
|
CTimer PositionTimer;
|
||||||
|
|
||||||
|
uint PositionTimeoutMs;
|
||||||
|
|
||||||
|
List<uint> PositionJoins;
|
||||||
|
|
||||||
|
int CurrentPositionIndex = 0;
|
||||||
|
|
||||||
|
public ScreenSaverController(EssentialsPanelMainInterfaceDriver parent, CrestronTouchpanelPropertiesConfig config)
|
||||||
|
: base(parent.TriList)
|
||||||
|
{
|
||||||
|
PositionTimeoutMs = config.ScreenSaverMovePositionIntervalMs;
|
||||||
|
|
||||||
|
TriList.SetSigFalseAction(UIBoolJoin.MCScreenSaverClosePress, () => this.Hide());
|
||||||
|
|
||||||
|
PositionJoins = new List<uint>()
|
||||||
|
{ UIBoolJoin.MCScreenSaverPosition1Visible, UIBoolJoin.MCScreenSaverPosition2Visible, UIBoolJoin.MCScreenSaverPosition3Visible, UIBoolJoin.MCScreenSaverPosition4Visible };
|
||||||
|
|
||||||
|
CrestronConsole.AddNewConsoleCommand((o) => Show(), "showscreensaver", "Shows Panel Screensaver", ConsoleAccessLevelEnum.AccessOperator);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Show()
|
||||||
|
{
|
||||||
|
TriList.SetBool(UIBoolJoin.MCScreenSaverVisible, true);
|
||||||
|
|
||||||
|
CurrentPositionIndex = 0;
|
||||||
|
SetCurrentPosition();
|
||||||
|
StartPositionTimer();
|
||||||
|
|
||||||
|
base.Show();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Hide()
|
||||||
|
{
|
||||||
|
PositionTimer.Stop();
|
||||||
|
PositionTimer.Dispose();
|
||||||
|
PositionTimer = null;
|
||||||
|
|
||||||
|
ClearAllPositions();
|
||||||
|
|
||||||
|
TriList.SetBool(UIBoolJoin.MCScreenSaverVisible, false);
|
||||||
|
|
||||||
|
base.Hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void StartPositionTimer()
|
||||||
|
{
|
||||||
|
if (PositionTimer == null)
|
||||||
|
{
|
||||||
|
PositionTimer = new CTimer((o) => PositionTimerExpired(), PositionTimeoutMs);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
PositionTimer.Reset(PositionTimeoutMs);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void PositionTimerExpired()
|
||||||
|
{
|
||||||
|
IncrementPositionIndex();
|
||||||
|
|
||||||
|
SetCurrentPosition();
|
||||||
|
|
||||||
|
StartPositionTimer();
|
||||||
|
}
|
||||||
|
|
||||||
|
void IncrementPositionIndex()
|
||||||
|
{
|
||||||
|
if (CurrentPositionIndex < PositionJoins.Count - 1)
|
||||||
|
{
|
||||||
|
CurrentPositionIndex++;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CurrentPositionIndex = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
Debug.Console(1, "ScreenSaver Position Timer Expired: Setting new position: {0}", CurrentPositionIndex);
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
void SetCurrentPosition()
|
||||||
|
{
|
||||||
|
ClearAllPositions();
|
||||||
|
|
||||||
|
// Set based on current index
|
||||||
|
TriList.SetBool(PositionJoins[CurrentPositionIndex], true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ClearAllPositions()
|
||||||
|
{
|
||||||
|
foreach (var join in PositionJoins)
|
||||||
|
{
|
||||||
|
TriList.SetBool(join, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -192,22 +192,76 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
|||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
void Codec_IsReady()
|
void Codec_IsReady()
|
||||||
{
|
{
|
||||||
string roomNumberSipUri = "";
|
SetupAddresses();
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(Codec.CodecInfo.SipUri)) // If both values are present, format the string with a pipe divider
|
|
||||||
roomNumberSipUri = string.Format("{0} | {1}", GetFormattedPhoneNumber(Codec.CodecInfo.SipPhoneNumber), Codec.CodecInfo.SipUri);
|
|
||||||
else // If only one value present, just show the phone number
|
|
||||||
roomNumberSipUri = Codec.CodecInfo.SipPhoneNumber;
|
|
||||||
|
|
||||||
if(string.IsNullOrEmpty(roomNumberSipUri))
|
|
||||||
roomNumberSipUri = string.Format("{0} | {1}", Codec.CodecInfo.E164Alias, Codec.CodecInfo.H323Id);
|
|
||||||
|
|
||||||
TriList.SetString(UIStringJoin.RoomPhoneText, roomNumberSipUri);
|
|
||||||
|
|
||||||
if(HeaderDriver.HeaderButtonsAreSetUp)
|
if(HeaderDriver.HeaderButtonsAreSetUp)
|
||||||
HeaderDriver.ComputeHeaderCallStatus(Codec);
|
HeaderDriver.ComputeHeaderCallStatus(Codec);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SetupAddresses()
|
||||||
|
{
|
||||||
|
string roomContactNumbers = "";
|
||||||
|
string roomPhoneNumber = "";
|
||||||
|
string roomVideoAddress = "";
|
||||||
|
|
||||||
|
|
||||||
|
Debug.Console(1,
|
||||||
|
@"
|
||||||
|
Codec.CodecInfo.IpAddress: {0}
|
||||||
|
Codec.CodecInfo.SipUri: {1}
|
||||||
|
Codec.CodecInfo.SipPhoneNumber: {2}
|
||||||
|
Codec.CodecInfo.E164Alias: {3}
|
||||||
|
Codec.CodecInfo.H323Id: {4}
|
||||||
|
", Codec.CodecInfo.IpAddress, Codec.CodecInfo.SipUri, Codec.CodecInfo.SipPhoneNumber, Codec.CodecInfo.E164Alias, Codec.CodecInfo.H323Id);
|
||||||
|
|
||||||
|
// Populate phone number
|
||||||
|
if (!string.IsNullOrEmpty(Codec.CodecInfo.SipUri)) // If both values are present, format the string with a pipe divider
|
||||||
|
{
|
||||||
|
roomPhoneNumber = Codec.CodecInfo.SipUri;
|
||||||
|
}
|
||||||
|
else if (!string.IsNullOrEmpty(Codec.CodecInfo.SipPhoneNumber)) // If only one value present, just show the phone number
|
||||||
|
{
|
||||||
|
roomPhoneNumber = GetFormattedPhoneNumber(Codec.CodecInfo.SipPhoneNumber);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Populate video number
|
||||||
|
if (!string.IsNullOrEmpty(Codec.CodecInfo.IpAddress))
|
||||||
|
{
|
||||||
|
roomVideoAddress = Codec.CodecInfo.IpAddress;
|
||||||
|
}
|
||||||
|
else if (!string.IsNullOrEmpty(Codec.CodecInfo.E164Alias))
|
||||||
|
{
|
||||||
|
roomVideoAddress = Codec.CodecInfo.E164Alias;
|
||||||
|
}
|
||||||
|
else if (!string.IsNullOrEmpty(Codec.CodecInfo.H323Id))
|
||||||
|
{
|
||||||
|
roomVideoAddress = Codec.CodecInfo.H323Id;
|
||||||
|
}
|
||||||
|
|
||||||
|
Debug.Console(1,
|
||||||
|
@" Room Contact Numbers:
|
||||||
|
Phone Number: {0}
|
||||||
|
Video Number: {1}
|
||||||
|
", roomPhoneNumber, roomVideoAddress);
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(roomPhoneNumber) && !string.IsNullOrEmpty(roomVideoAddress))
|
||||||
|
{
|
||||||
|
roomContactNumbers = string.Format("{0} | {1}", roomPhoneNumber, roomVideoAddress);
|
||||||
|
}
|
||||||
|
else if (!string.IsNullOrEmpty(roomPhoneNumber))
|
||||||
|
{
|
||||||
|
roomContactNumbers = roomPhoneNumber;
|
||||||
|
}
|
||||||
|
else if (!string.IsNullOrEmpty(roomVideoAddress))
|
||||||
|
{
|
||||||
|
roomContactNumbers = roomVideoAddress;
|
||||||
|
}
|
||||||
|
|
||||||
|
TriList.SetString(UIStringJoin.RoomAddressPipeText, roomContactNumbers);
|
||||||
|
TriList.SetString(UIStringJoin.RoomPhoneText, roomPhoneNumber);
|
||||||
|
TriList.SetString(UIStringJoin.RoomVideoAddressText, roomVideoAddress);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Handles status changes for calls
|
/// Handles status changes for calls
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -1,11 +1,33 @@
|
|||||||
using PepperDash.Core;
|
using System;
|
||||||
|
using PepperDash.Core;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
|
namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Describes a MobileControlSystemController
|
||||||
|
/// </summary>
|
||||||
public interface IMobileControl : IKeyed
|
public interface IMobileControl : IKeyed
|
||||||
{
|
{
|
||||||
void CreateMobileControlRoomBridge(EssentialsRoomBase room);
|
void CreateMobileControlRoomBridge(EssentialsRoomBase room);
|
||||||
|
|
||||||
void LinkSystemMonitorToAppServer();
|
void LinkSystemMonitorToAppServer();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Describes a MobileControl Room Bridge
|
||||||
|
/// </summary>
|
||||||
|
public interface IMobileControlRoomBridge : IKeyed
|
||||||
|
{
|
||||||
|
event EventHandler<EventArgs> UserCodeChanged;
|
||||||
|
|
||||||
|
string UserCode { get; }
|
||||||
|
|
||||||
|
string QrCodeUrl { get; }
|
||||||
|
|
||||||
|
string McServerUrl { get; }
|
||||||
|
|
||||||
|
string RoomName { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9,6 +9,7 @@ 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;
|
using PepperDash.Essentials.Core.Devices;
|
||||||
|
using PepperDash.Essentials.Core.DeviceTypeInterfaces;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Core
|
namespace PepperDash.Essentials.Core
|
||||||
{
|
{
|
||||||
@@ -37,10 +38,32 @@ namespace PepperDash.Essentials.Core
|
|||||||
protected abstract Func<bool> IsWarmingFeedbackFunc { get; }
|
protected abstract Func<bool> IsWarmingFeedbackFunc { get; }
|
||||||
protected abstract Func<bool> IsCoolingFeedbackFunc { get; }
|
protected abstract Func<bool> IsCoolingFeedbackFunc { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Indicates if this room is Mobile Control Enabled
|
||||||
|
/// </summary>
|
||||||
|
public bool IsMobileControlEnabled { get; private set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The bridge for this room if Mobile Control is enabled
|
||||||
|
/// </summary>
|
||||||
|
public IMobileControlRoomBridge MobileControlRoomBridge { get; private set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The config name of the source list
|
/// The config name of the source list
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string SourceListKey { get; set; }
|
///
|
||||||
|
protected string _SourceListKey;
|
||||||
|
public virtual string SourceListKey {
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return _SourceListKey;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_SourceListKey = value;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Timer used for informing the UIs of a shutdown
|
/// Timer used for informing the UIs of a shutdown
|
||||||
@@ -58,7 +81,9 @@ namespace PepperDash.Essentials.Core
|
|||||||
|
|
||||||
public Core.Privacy.MicrophonePrivacyController MicrophonePrivacy { get; set; }
|
public Core.Privacy.MicrophonePrivacyController MicrophonePrivacy { get; set; }
|
||||||
|
|
||||||
public string LogoUrl { get; set; }
|
public string LogoUrlLightBkgnd { get; set; }
|
||||||
|
|
||||||
|
public string LogoUrlDarkBkgnd { get; set; }
|
||||||
|
|
||||||
protected SecondsCountdownTimer RoomVacancyShutdownTimer { get; private set; }
|
protected SecondsCountdownTimer RoomVacancyShutdownTimer { get; private set; }
|
||||||
|
|
||||||
@@ -128,6 +153,34 @@ namespace PepperDash.Essentials.Core
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override bool CustomActivate()
|
||||||
|
{
|
||||||
|
SetUpMobileControl();
|
||||||
|
|
||||||
|
return base.CustomActivate();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// If mobile control is enabled, sets the appropriate properties
|
||||||
|
/// </summary>
|
||||||
|
void SetUpMobileControl()
|
||||||
|
{
|
||||||
|
var mcBridgeKey = string.Format("mobileControlBridge-{0}", Key);
|
||||||
|
var mcBridge = DeviceManager.GetDeviceForKey(mcBridgeKey);
|
||||||
|
if (mcBridge == null)
|
||||||
|
{
|
||||||
|
Debug.Console(1, this, "*********************Mobile Control Bridge Not found for this room.");
|
||||||
|
IsMobileControlEnabled = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MobileControlRoomBridge = mcBridge as IMobileControlRoomBridge;
|
||||||
|
Debug.Console(1, this, "*********************Mobile Control Bridge found and enabled for this room");
|
||||||
|
IsMobileControlEnabled = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void RoomVacancyShutdownPromptTimer_HasFinished(object sender, EventArgs e)
|
void RoomVacancyShutdownPromptTimer_HasFinished(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
switch (VacancyMode)
|
switch (VacancyMode)
|
||||||
|
|||||||
@@ -14,6 +14,8 @@
|
|||||||
public UiSetupPropertiesConfig Setup { get; set; }
|
public UiSetupPropertiesConfig Setup { get; set; }
|
||||||
public string HeaderStyle { get; set; }
|
public string HeaderStyle { get; set; }
|
||||||
public bool IncludeInFusionRoomHealth { get; set; }
|
public bool IncludeInFusionRoomHealth { get; set; }
|
||||||
|
public uint ScreenSaverTimeoutMin { get; set; }
|
||||||
|
public uint ScreenSaverMovePositionIntervalMs { get; set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -26,6 +28,10 @@
|
|||||||
{
|
{
|
||||||
SourcesOverflowCount = 5;
|
SourcesOverflowCount = 5;
|
||||||
HeaderStyle = CrestronTouchpanelPropertiesConfig.Habanero;
|
HeaderStyle = CrestronTouchpanelPropertiesConfig.Habanero;
|
||||||
|
|
||||||
|
// Default values
|
||||||
|
ScreenSaverTimeoutMin = 5;
|
||||||
|
ScreenSaverMovePositionIntervalMs = 15000;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using Crestron.SimplSharp;
|
||||||
|
using PepperDash.Essentials.Core;
|
||||||
|
using PepperDash.Essentials.Devices.Common.VideoCodec.Cisco;
|
||||||
|
|
||||||
|
namespace PepperDash.Essentials.Devices.Common.Codec
|
||||||
|
{
|
||||||
|
public interface IHasExternalSourceSwitching
|
||||||
|
{
|
||||||
|
bool ExternalSourceListEnabled { get; }
|
||||||
|
void AddExternalSource(string connectorId, string key, string name, eExternalSourceType type);
|
||||||
|
void SetExternalSourceState(string key, eExternalSourceMode mode);
|
||||||
|
void ClearExternalSources();
|
||||||
|
Action<string, string> RunRouteAction { set;}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -112,6 +112,7 @@
|
|||||||
<Compile Include="Codec\eCodecCallStatus.cs" />
|
<Compile Include="Codec\eCodecCallStatus.cs" />
|
||||||
<Compile Include="Codec\eMeetingPrivacy.cs" />
|
<Compile Include="Codec\eMeetingPrivacy.cs" />
|
||||||
<Compile Include="Codec\iCodecAudio.cs" />
|
<Compile Include="Codec\iCodecAudio.cs" />
|
||||||
|
<Compile Include="Codec\IHasExternalSourceSwitching.cs" />
|
||||||
<Compile Include="ImageProcessors\TVOneCorio.cs" />
|
<Compile Include="ImageProcessors\TVOneCorio.cs" />
|
||||||
<Compile Include="ImageProcessors\TVOneCorioPropertiesConfig.cs" />
|
<Compile Include="ImageProcessors\TVOneCorioPropertiesConfig.cs" />
|
||||||
<Compile Include="Power Controllers\Digitallogger.cs" />
|
<Compile Include="Power Controllers\Digitallogger.cs" />
|
||||||
|
|||||||
@@ -15,16 +15,17 @@ using PepperDash.Essentials.Core.Config;
|
|||||||
using PepperDash.Essentials.Core.Routing;
|
using PepperDash.Essentials.Core.Routing;
|
||||||
using PepperDash.Essentials.Devices.Common.Cameras;
|
using PepperDash.Essentials.Devices.Common.Cameras;
|
||||||
using PepperDash.Essentials.Devices.Common.Codec;
|
using PepperDash.Essentials.Devices.Common.Codec;
|
||||||
using PepperDash.Essentials.Core;
|
|
||||||
using PepperDash.Essentials.Devices.Common.VideoCodec;
|
using PepperDash.Essentials.Devices.Common.VideoCodec;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||||
{
|
{
|
||||||
enum eCommandType { SessionStart, SessionEnd, Command, GetStatus, GetConfiguration };
|
enum eCommandType { SessionStart, SessionEnd, Command, GetStatus, GetConfiguration };
|
||||||
|
public enum eExternalSourceType {camera, desktop, document_camera, mediaplayer, PC, whiteboard, other}
|
||||||
|
public enum eExternalSourceMode {Ready, NotReady, Hidden, Error}
|
||||||
|
|
||||||
public class CiscoSparkCodec : VideoCodecBase, IHasCallHistory, IHasCallFavorites, IHasDirectory,
|
public class CiscoSparkCodec : VideoCodecBase, IHasCallHistory, IHasCallFavorites, IHasDirectory,
|
||||||
IHasScheduleAwareness, IOccupancyStatusProvider, IHasCodecLayouts, IHasCodecSelfView,
|
IHasScheduleAwareness, IOccupancyStatusProvider, IHasCodecLayouts, IHasCodecSelfView,
|
||||||
ICommunicationMonitor, IRouting, IHasCodecCameras, IHasCameraAutoMode, IHasCodecRoomPresets
|
ICommunicationMonitor, IRouting, IHasCodecCameras, IHasCameraAutoMode, IHasCodecRoomPresets, IHasExternalSourceSwitching
|
||||||
{
|
{
|
||||||
public event EventHandler<DirectoryEventArgs> DirectoryResultReturned;
|
public event EventHandler<DirectoryEventArgs> DirectoryResultReturned;
|
||||||
|
|
||||||
@@ -348,6 +349,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
|
|
||||||
CallHistory = new CodecCallHistory();
|
CallHistory = new CodecCallHistory();
|
||||||
|
|
||||||
|
|
||||||
if (props.Favorites != null)
|
if (props.Favorites != null)
|
||||||
{
|
{
|
||||||
CallFavorites = new CodecCallFavorites();
|
CallFavorites = new CodecCallFavorites();
|
||||||
@@ -398,6 +400,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
SetUpCameras();
|
SetUpCameras();
|
||||||
|
|
||||||
CreateOsdSource();
|
CreateOsdSource();
|
||||||
|
|
||||||
|
if (props.ExternalSourceListEnabled != null)
|
||||||
|
{
|
||||||
|
ExternalSourceListEnabled = props.ExternalSourceListEnabled;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -472,7 +479,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
prefix + "/Bookings" + Delimiter +
|
prefix + "/Bookings" + Delimiter +
|
||||||
prefix + "/Event/CallDisconnect" + Delimiter +
|
prefix + "/Event/CallDisconnect" + Delimiter +
|
||||||
prefix + "/Event/Bookings" + Delimiter +
|
prefix + "/Event/Bookings" + Delimiter +
|
||||||
prefix + "/Event/CameraPresetListUpdated" + Delimiter;
|
prefix + "/Event/CameraPresetListUpdated" + Delimiter +
|
||||||
|
prefix + "/Event/UserInterface/Presentation/ExternalSource/Selected/SourceIdentifier" + Delimiter;
|
||||||
|
|
||||||
return base.CustomActivate();
|
return base.CustomActivate();
|
||||||
}
|
}
|
||||||
@@ -630,6 +638,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SendText(string command)
|
public void SendText(string command)
|
||||||
@@ -853,6 +862,18 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
{
|
{
|
||||||
GetBookings(null);
|
GetBookings(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
else if (response.IndexOf("\"UserInterface\":{") > -1 || response.IndexOf("\"UserInterface\": {") > -1) // External Source Trigger
|
||||||
|
{
|
||||||
|
CiscoCodecEvents.RootObject eventReceived = new CiscoCodecEvents.RootObject();
|
||||||
|
JsonConvert.PopulateObject(response, eventReceived);
|
||||||
|
Debug.Console(2, this, "*** Got an External Source Selection {0} {1}", eventReceived, eventReceived.Event.UserInterface, eventReceived.Event.UserInterface.Presentation.ExternalSource.Selected.SourceIdentifier.Value);
|
||||||
|
|
||||||
|
if (RunRouteAction != null)
|
||||||
|
{
|
||||||
|
RunRouteAction(eventReceived.Event.UserInterface.Presentation.ExternalSource.Selected.SourceIdentifier.Value, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (response.IndexOf("\"CommandResponse\":{") > -1 || response.IndexOf("\"CommandResponse\": {") > -1)
|
else if (response.IndexOf("\"CommandResponse\":{") > -1 || response.IndexOf("\"CommandResponse\": {") > -1)
|
||||||
{
|
{
|
||||||
@@ -1699,7 +1720,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (CodecConfiguration.Configuration.H323 != null && CodecConfiguration.Configuration.H323.H323Alias.E164 != null)
|
if (CodecConfiguration.Configuration.H323 != null && CodecConfiguration.Configuration.H323.H323Alias != null
|
||||||
|
&& CodecConfiguration.Configuration.H323.H323Alias.ID != null)
|
||||||
{
|
{
|
||||||
return CodecConfiguration.Configuration.H323.H323Alias.ID.Value;
|
return CodecConfiguration.Configuration.H323.H323Alias.ID.Value;
|
||||||
}
|
}
|
||||||
@@ -1801,8 +1823,75 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
SendText(string.Format("xCommand Call FarEndControl RoomPreset Activate CallId: {0} PresetId: {1}", GetCallId(), preset));
|
SendText(string.Format("xCommand Call FarEndControl RoomPreset Activate CallId: {0} PresetId: {1}", GetCallId(), preset));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#region IHasExternalSourceSwitching Members
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Weather the Cisco supports External Source Lists or not
|
||||||
|
/// </summary>
|
||||||
|
public bool ExternalSourceListEnabled
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
private set;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Adds an external source to the Cisco
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="connectorId"></param>
|
||||||
|
/// <param name="key"></param>
|
||||||
|
/// <param name="name"></param>
|
||||||
|
public void AddExternalSource(string connectorId, string key, string name, eExternalSourceType type)
|
||||||
|
{
|
||||||
|
int id = 2;
|
||||||
|
if (connectorId.ToLower() == "hdmiin3")
|
||||||
|
{
|
||||||
|
id = 3;
|
||||||
|
}
|
||||||
|
SendText(string.Format("xCommand UserInterface Presentation ExternalSource Add ConnectorId: {0} SourceIdentifier: \"{1}\" Name: \"{2}\" Type: {3}", id, key, name, type.ToString()));
|
||||||
|
// SendText(string.Format("xCommand UserInterface Presentation ExternalSource State Set SourceIdentifier: \"{0}\" State: Ready", key));
|
||||||
|
Debug.Console(2, this, "Adding ExternalSource {0} {1}", connectorId, name);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sets the state of the External Source
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="key"></param>
|
||||||
|
/// <param name="mode"></param>
|
||||||
|
public void SetExternalSourceState(string key, eExternalSourceMode mode)
|
||||||
|
{
|
||||||
|
SendText(string.Format("xCommand UserInterface Presentation ExternalSource State Set SourceIdentifier: \"{0}\" State: {1}", key, mode.ToString()));
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Clears all external sources on the codec
|
||||||
|
/// </summary>
|
||||||
|
public void ClearExternalSources()
|
||||||
|
{
|
||||||
|
SendText("xCommand UserInterface Presentation ExternalSource RemoveAll");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Action that will run when the External Source is selected.
|
||||||
|
/// </summary>
|
||||||
|
public Action<string, string> RunRouteAction { private get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
#region ExternalDevices
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a codec command that might need to have a friendly label applied for UI feedback purposes
|
/// Represents a codec command that might need to have a friendly label applied for UI feedback purposes
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -31,6 +31,9 @@ namespace PepperDash.Essentials.Devices.Common.Codec
|
|||||||
[JsonProperty("sharing")]
|
[JsonProperty("sharing")]
|
||||||
public SharingProperties Sharing { get; set; }
|
public SharingProperties Sharing { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("externalSourceListEnabled")]
|
||||||
|
public bool ExternalSourceListEnabled { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Optionsal property to set the limit of any phonebook queries for directory or searching
|
/// Optionsal property to set the limit of any phonebook queries for directory or searching
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -127,10 +127,35 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||||||
public RequestedURI RequestedURI { get; set; }
|
public RequestedURI RequestedURI { get; set; }
|
||||||
public PeopleCountAverage PeopleCountAverage { get; set; }
|
public PeopleCountAverage PeopleCountAverage { get; set; }
|
||||||
}
|
}
|
||||||
|
public class UserInterface
|
||||||
|
{
|
||||||
|
public string id { get; set; }
|
||||||
|
public Presentation Presentation { get; set; }
|
||||||
|
}
|
||||||
|
public class Presentation
|
||||||
|
{
|
||||||
|
public string id { get; set; }
|
||||||
|
public ExternalSource ExternalSource { get; set; }
|
||||||
|
}
|
||||||
|
public class ExternalSource
|
||||||
|
{
|
||||||
|
public string id { get; set; }
|
||||||
|
public Selected Selected { get; set; }
|
||||||
|
}
|
||||||
|
public class Selected
|
||||||
|
{
|
||||||
|
public string id { get; set; }
|
||||||
|
public SourceIdentifier SourceIdentifier { get; set; }
|
||||||
|
}
|
||||||
|
public class SourceIdentifier
|
||||||
|
{
|
||||||
|
public string id { get; set; }
|
||||||
|
public string Value { get; set; }
|
||||||
|
}
|
||||||
public class Event
|
public class Event
|
||||||
{
|
{
|
||||||
public CallDisconnect CallDisconnect { get; set; }
|
public CallDisconnect CallDisconnect { get; set; }
|
||||||
|
public UserInterface UserInterface { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class RootObject
|
public class RootObject
|
||||||
|
|||||||
Reference in New Issue
Block a user