diff --git a/PepperDashEssentials/PepperDashEssentials.suo b/PepperDashEssentials/PepperDashEssentials.suo index 1c453ea4..beeaaa11 100644 Binary files a/PepperDashEssentials/PepperDashEssentials.suo and b/PepperDashEssentials/PepperDashEssentials.suo differ diff --git a/PepperDashEssentials/PepperDashEssentials/Fusion/FusionSystemController.cs b/PepperDashEssentials/PepperDashEssentials/Fusion/FusionSystemController.cs index b410f10e..e128bb94 100644 --- a/PepperDashEssentials/PepperDashEssentials/Fusion/FusionSystemController.cs +++ b/PepperDashEssentials/PepperDashEssentials/Fusion/FusionSystemController.cs @@ -62,7 +62,7 @@ namespace PepperDash.Essentials.Fusion Room.OnFeedback.LinkInputSig(FusionRoom.SystemPowerOn.InputSig); SourceNameSig = FusionRoom.CreateOffsetStringSig(50, "Source - Name", eSigIoMask.InputSigOnly); // Don't think we need to get current status of this as nothing should be alive yet. - Room.CurrentSourceInfoChange += new SourceInfoChangeHandler(Room_CurrentSourceInfoChange); + Room.CurrentSingleSourceChange += new SourceInfoChangeHandler(Room_CurrentSourceInfoChange); FusionRoom.SystemPowerOn.OutputSig.SetSigFalseAction(Room.PowerOnToDefaultOrLastSource); diff --git a/PepperDashEssentials/PepperDashEssentials/PepperDashEssentials.projectinfo b/PepperDashEssentials/PepperDashEssentials/PepperDashEssentials.projectinfo index e42a09ec..d6a17668 100644 Binary files a/PepperDashEssentials/PepperDashEssentials/PepperDashEssentials.projectinfo and b/PepperDashEssentials/PepperDashEssentials/PepperDashEssentials.projectinfo differ diff --git a/PepperDashEssentials/PepperDashEssentials/Room/EssentialsHuddleSpaceRoom.cs b/PepperDashEssentials/PepperDashEssentials/Room/EssentialsHuddleSpaceRoom.cs index f026a641..c29ca706 100644 --- a/PepperDashEssentials/PepperDashEssentials/Room/EssentialsHuddleSpaceRoom.cs +++ b/PepperDashEssentials/PepperDashEssentials/Room/EssentialsHuddleSpaceRoom.cs @@ -12,7 +12,7 @@ namespace PepperDash.Essentials public class EssentialsHuddleSpaceRoom : EssentialsRoomBase, IHasCurrentSourceInfoChange { public event EventHandler CurrentVolumeDeviceChange; - public event SourceInfoChangeHandler CurrentSourceInfoChange; + public event SourceInfoChangeHandler CurrentSingleSourceChange; public EssentialsRoomPropertiesConfig Config { get; private set; } @@ -70,7 +70,7 @@ namespace PepperDash.Essentials { if (value == _CurrentSourceInfo) return; - var handler = CurrentSourceInfoChange; + var handler = CurrentSingleSourceChange; // remove from in-use tracker, if so equipped if(_CurrentSourceInfo != null && _CurrentSourceInfo.SourceDevice is IInUseTracking) (_CurrentSourceInfo.SourceDevice as IInUseTracking).InUseTracker.RemoveUser(this, "control"); diff --git a/PepperDashEssentials/PepperDashEssentials/Room/EssentialsPresentationRoom.cs b/PepperDashEssentials/PepperDashEssentials/Room/EssentialsPresentationRoom.cs index 9ae69bc0..85003599 100644 --- a/PepperDashEssentials/PepperDashEssentials/Room/EssentialsPresentationRoom.cs +++ b/PepperDashEssentials/PepperDashEssentials/Room/EssentialsPresentationRoom.cs @@ -12,7 +12,9 @@ namespace PepperDash.Essentials public class EssentialsPresentationRoom : EssentialsRoomBase, IHasCurrentSourceInfoChange { public event EventHandler CurrentVolumeDeviceChange; - public event SourceInfoChangeHandler CurrentSourceInfoChange; + public event SourceInfoChangeHandler CurrentSingleSourceChange; + public event SourceInfoChangeHandler CurrentDisplay1SourceChange; + public event SourceInfoChangeHandler CurrentDisplay2SourceChange; public EssentialsPresentationRoomPropertiesConfig Config { get; private set; } @@ -72,33 +74,72 @@ namespace PepperDash.Essentials IBasicVolumeControls _CurrentAudioDevice; /// - /// The SourceListItem last run - containing names and icons + /// The SourceListItem last run - containing names and icons. The complex setter is + /// to add/remove this room to the source's InUseTracking, if it is capable /// - public SourceListItem CurrentSourceInfo + public SourceListItem CurrentSingleSourceInfo { - get { return _CurrentSourceInfo; } + get { return _CurrentSingleSourceInfo; } private set { - if (value == _CurrentSourceInfo) return; + if (value == _CurrentSingleSourceInfo) return; - var handler = CurrentSourceInfoChange; + var handler = CurrentSingleSourceChange; // remove from in-use tracker, if so equipped - if(_CurrentSourceInfo != null && _CurrentSourceInfo.SourceDevice is IInUseTracking) - (_CurrentSourceInfo.SourceDevice as IInUseTracking).InUseTracker.RemoveUser(this, "control"); + if(_CurrentSingleSourceInfo != null && _CurrentSingleSourceInfo.SourceDevice is IInUseTracking) + (_CurrentSingleSourceInfo.SourceDevice as IInUseTracking).InUseTracker.RemoveUser(this, "control"); if (handler != null) - handler(this, _CurrentSourceInfo, ChangeType.WillChange); + handler(this, _CurrentSingleSourceInfo, ChangeType.WillChange); - _CurrentSourceInfo = value; + _CurrentSingleSourceInfo = value; // add to in-use tracking - if (_CurrentSourceInfo != null && _CurrentSourceInfo.SourceDevice is IInUseTracking) - (_CurrentSourceInfo.SourceDevice as IInUseTracking).InUseTracker.AddUser(this, "control"); + if (_CurrentSingleSourceInfo != null && _CurrentSingleSourceInfo.SourceDevice is IInUseTracking) + (_CurrentSingleSourceInfo.SourceDevice as IInUseTracking).InUseTracker.AddUser(this, "control"); if (handler != null) - handler(this, _CurrentSourceInfo, ChangeType.DidChange); + handler(this, _CurrentSingleSourceInfo, ChangeType.DidChange); } } - SourceListItem _CurrentSourceInfo; + SourceListItem _CurrentSingleSourceInfo; + + public SourceListItem Display1SourceInfo + { + get { return _Display1SourceInfo; } + set + { + if (value == _Display1SourceInfo) return; + + var handler = CurrentDisplay1SourceChange; + if (handler != null) + handler(this, _Display1SourceInfo, ChangeType.WillChange); + + _Display1SourceInfo = value; + + if (handler != null) + handler(this, _Display1SourceInfo, ChangeType.DidChange); + } + } + SourceListItem _Display1SourceInfo; + + public SourceListItem Display2SourceInfo + { + get { return _Display2SourceInfo; } + set + { + if (value == _Display2SourceInfo) return; + + var handler = CurrentDisplay2SourceChange; + if (handler != null) + handler(this, _Display2SourceInfo, ChangeType.WillChange); + + _Display2SourceInfo = value; + + if (handler != null) + handler(this, _Display2SourceInfo, ChangeType.DidChange); + } + } + SourceListItem _Display2SourceInfo; /// /// @@ -124,8 +165,14 @@ namespace PepperDash.Essentials DefaultVolumeControls = (defaultAudio as IHasVolumeDevice).VolumeDevice; OnFeedback = new BoolFeedback(() => - { return CurrentSourceInfo != null - && CurrentSourceInfo.Type == eSourceListItemType.Route; }); + { return (CurrentSingleSourceInfo != null + && CurrentSingleSourceInfo.Type != eSourceListItemType.Off) + || (Display1SourceInfo != null + && Display1SourceInfo.Type != eSourceListItemType.Off) + || (Display2SourceInfo != null + && Display2SourceInfo.Type != eSourceListItemType.Off); + + }); SourceListKey = "default"; EnablePowerOnToLastSource = true; } @@ -143,11 +190,27 @@ namespace PepperDash.Essentials else DoVideoRoute("$off", display.Key); } - - CurrentSourceInfo = sourceItem; + Display1SourceInfo = sourceItem; + Display2SourceInfo = sourceItem; + CurrentSingleSourceInfo = sourceItem; OnFeedback.FireUpdate(); } + public void SourceToDisplay1(SourceListItem sourceItem) + { + DoVideoRoute(sourceItem.SourceKey, Displays[1].Key); + Display1SourceInfo = sourceItem; + OnFeedback.FireUpdate(); + } + + public void SourceToDisplay2(SourceListItem sourceItem) + { + DoVideoRoute(sourceItem.SourceKey, Displays[2].Key); + Display2SourceInfo = sourceItem; + OnFeedback.FireUpdate(); + } + + /// /// Basic source -> destination routing /// @@ -267,7 +330,7 @@ namespace PepperDash.Essentials // store the name and UI info for routes if (item.SourceKey != null) - CurrentSourceInfo = item; + CurrentSingleSourceInfo = item; // And finally, set the "control". This will trigger event //CurrentControlDevice = DeviceManager.GetDeviceForKey(item.SourceKey) as Device; diff --git a/PepperDashEssentials/PepperDashEssentials/Room/EssentialsRoomBase.cs b/PepperDashEssentials/PepperDashEssentials/Room/EssentialsRoomBase.cs index e0443b0a..62e01ad7 100644 --- a/PepperDashEssentials/PepperDashEssentials/Room/EssentialsRoomBase.cs +++ b/PepperDashEssentials/PepperDashEssentials/Room/EssentialsRoomBase.cs @@ -13,7 +13,7 @@ namespace PepperDash.Essentials /// public interface IHasCurrentSourceInfoChange { - event SourceInfoChangeHandler CurrentSourceInfoChange; + event SourceInfoChangeHandler CurrentSingleSourceChange; } diff --git a/PepperDashEssentials/PepperDashEssentials/SIMPLSharpLogs/(2017-02-17 08-49-15).log b/PepperDashEssentials/PepperDashEssentials/SIMPLSharpLogs/(2017-02-17 08-49-15).log new file mode 100644 index 00000000..707c08ae --- /dev/null +++ b/PepperDashEssentials/PepperDashEssentials/SIMPLSharpLogs/(2017-02-17 08-49-15).log @@ -0,0 +1,35 @@ +2/17/2017 8:49:15 AM, Info: Initializing SIMPLSharp Services... +2/17/2017 8:49:15 AM, Info: ProjectInfo successfully initialized. +2/17/2017 9:50:45 AM, Info: Validating assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll... +2/17/2017 9:50:46 AM, Info: Verifying assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll +2/17/2017 9:50:46 AM, Info: Creating Archive C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.cpz... +2/17/2017 9:50:48 AM, Info: Saving project information... +2/17/2017 10:21:23 AM, Info: Validating assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll... +2/17/2017 10:21:23 AM, Info: Verifying assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll +2/17/2017 10:21:23 AM, Info: Creating Archive C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.cpz... +2/17/2017 10:21:25 AM, Info: Saving project information... +2/17/2017 11:43:36 AM, Info: Validating assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll... +2/17/2017 11:43:37 AM, Info: Verifying assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll +2/17/2017 11:43:37 AM, Info: Creating Archive C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.cpz... +2/17/2017 11:43:39 AM, Info: Saving project information... +2/17/2017 12:40:59 PM, Info: Validating assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll... +2/17/2017 12:40:59 PM, Info: Verifying assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll +2/17/2017 12:40:59 PM, Info: Creating Archive C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.cpz... +2/17/2017 12:41:00 PM, Info: Saving project information... +2/17/2017 1:07:27 PM, Info: Validating assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll... +2/17/2017 1:07:27 PM, Info: Verifying assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll +2/17/2017 1:07:27 PM, Info: Creating Archive C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.cpz... +2/17/2017 1:07:29 PM, Info: Saving project information... +2/17/2017 1:23:03 PM, Info: Validating assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll... +2/17/2017 1:23:04 PM, Info: Verifying assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll +2/17/2017 1:23:04 PM, Info: Creating Archive C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.cpz... +2/17/2017 1:23:05 PM, Info: Saving project information... +2/17/2017 1:30:27 PM, Info: Validating assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll... +2/17/2017 1:30:27 PM, Info: Verifying assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll +2/17/2017 1:30:27 PM, Info: Creating Archive C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.cpz... +2/17/2017 1:30:29 PM, Info: Saving project information... +2/17/2017 2:17:11 PM, Info: Validating assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll... +2/17/2017 2:17:12 PM, Info: Verifying assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll +2/17/2017 2:17:12 PM, Info: Creating Archive C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.cpz... +2/17/2017 2:17:13 PM, Info: Saving project information... +2/17/2017 2:31:44 PM, Info: Terminating SIMPLSharp Services diff --git a/PepperDashEssentials/PepperDashEssentials/SIMPLSharpLogs/(2017-02-20 11-06-26).log b/PepperDashEssentials/PepperDashEssentials/SIMPLSharpLogs/(2017-02-20 11-06-26).log new file mode 100644 index 00000000..783d99f2 --- /dev/null +++ b/PepperDashEssentials/PepperDashEssentials/SIMPLSharpLogs/(2017-02-20 11-06-26).log @@ -0,0 +1,20 @@ +2/20/2017 11:06:26 AM, Info: Initializing SIMPLSharp Services... +2/20/2017 11:06:27 AM, Info: ProjectInfo successfully initialized. +2/20/2017 12:42:22 PM, Info: Validating assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll... +2/20/2017 12:42:23 PM, Info: Verifying assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll +2/20/2017 12:42:24 PM, Info: Creating Archive C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.cpz... +2/20/2017 12:42:25 PM, Info: Saving project information... +2/20/2017 1:36:30 PM, Info: Validating assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll... +2/20/2017 1:36:30 PM, Info: Verifying assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll +2/20/2017 1:36:31 PM, Info: Creating Archive C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.cpz... +2/20/2017 1:36:32 PM, Info: Saving project information... +2/20/2017 1:42:21 PM, Info: Saving project information... +2/20/2017 1:42:21 PM, Info: Saving project information... +2/20/2017 1:42:21 PM, Info: Saving project information... +2/20/2017 1:46:45 PM, Info: Saving project information... +2/20/2017 1:46:45 PM, Info: Saving project information... +2/20/2017 1:46:45 PM, Info: Saving project information... +2/20/2017 1:46:45 PM, Info: Saving project information... +2/20/2017 1:46:45 PM, Info: Saving project information... +2/20/2017 1:46:45 PM, Info: Saving project information... +2/20/2017 1:46:46 PM, Info: Terminating SIMPLSharp Services diff --git a/PepperDashEssentials/PepperDashEssentials/SIMPLSharpLogs/(2017-02-20 13-48-17).log b/PepperDashEssentials/PepperDashEssentials/SIMPLSharpLogs/(2017-02-20 13-48-17).log new file mode 100644 index 00000000..8a2564f5 --- /dev/null +++ b/PepperDashEssentials/PepperDashEssentials/SIMPLSharpLogs/(2017-02-20 13-48-17).log @@ -0,0 +1,43 @@ +2/20/2017 1:48:17 PM, Info: Initializing SIMPLSharp Services... +2/20/2017 1:48:17 PM, Info: ProjectInfo successfully initialized. +2/20/2017 3:16:00 PM, Info: Validating assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll... +2/20/2017 3:16:01 PM, Info: Verifying assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll +2/20/2017 3:16:01 PM, Info: Creating Archive C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.cpz... +2/20/2017 3:16:03 PM, Info: Saving project information... +2/20/2017 3:48:35 PM, Info: Validating assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll... +2/20/2017 3:48:36 PM, Info: Verifying assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll +2/20/2017 3:48:36 PM, Info: Creating Archive C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.cpz... +2/20/2017 3:48:37 PM, Info: Saving project information... +2/20/2017 4:03:34 PM, Info: Validating assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll... +2/20/2017 4:03:34 PM, Info: Verifying assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll +2/20/2017 4:03:35 PM, Info: Creating Archive C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.cpz... +2/20/2017 4:03:36 PM, Info: Saving project information... +2/20/2017 4:11:39 PM, Info: Validating assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll... +2/20/2017 4:11:40 PM, Info: Verifying assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll +2/20/2017 4:11:40 PM, Info: Creating Archive C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.cpz... +2/20/2017 4:11:41 PM, Info: Saving project information... +2/20/2017 4:26:20 PM, Info: Validating assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll... +2/20/2017 4:26:20 PM, Info: Verifying assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll +2/20/2017 4:26:21 PM, Info: Creating Archive C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.cpz... +2/20/2017 4:26:22 PM, Info: Saving project information... +2/20/2017 4:43:14 PM, Info: Validating assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll... +2/20/2017 4:43:14 PM, Info: Verifying assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll +2/20/2017 4:43:14 PM, Info: Creating Archive C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.cpz... +2/20/2017 4:43:16 PM, Info: Saving project information... +2/20/2017 4:43:52 PM, Info: Validating assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll... +2/20/2017 4:43:52 PM, Info: Verifying assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll +2/20/2017 4:43:53 PM, Info: Creating Archive C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.cpz... +2/20/2017 4:43:54 PM, Info: Saving project information... +2/20/2017 4:49:15 PM, Info: Validating assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll... +2/20/2017 4:49:15 PM, Info: Verifying assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll +2/20/2017 4:49:15 PM, Info: Creating Archive C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.cpz... +2/20/2017 4:49:17 PM, Info: Saving project information... +2/20/2017 5:01:32 PM, Info: Validating assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll... +2/20/2017 5:01:32 PM, Info: Verifying assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll +2/20/2017 5:01:32 PM, Info: Creating Archive C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.cpz... +2/20/2017 5:01:33 PM, Info: Saving project information... +2/20/2017 5:05:08 PM, Info: Validating assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll... +2/20/2017 5:05:08 PM, Info: Verifying assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll +2/20/2017 5:05:08 PM, Info: Creating Archive C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.cpz... +2/20/2017 5:05:09 PM, Info: Saving project information... +2/20/2017 5:21:45 PM, Info: Terminating SIMPLSharp Services diff --git a/PepperDashEssentials/PepperDashEssentials/UI Drivers/DualDisplayRouting.cs b/PepperDashEssentials/PepperDashEssentials/UI Drivers/DualDisplayRouting.cs index b9b6bd4d..5666f038 100644 --- a/PepperDashEssentials/PepperDashEssentials/UI Drivers/DualDisplayRouting.cs +++ b/PepperDashEssentials/PepperDashEssentials/UI Drivers/DualDisplayRouting.cs @@ -16,13 +16,21 @@ namespace PepperDash.Essentials { EssentialsPresentationPanelAvFunctionsDriver Parent; - CTimer SourceSelectedTimer; - /// /// Smart Object 3200 /// SubpageReferenceList SourcesSrl; + /// + /// For tracking feedback on last selected + /// + BoolInputSig LastSelectedSourceSig; + + /// + /// The source that has been selected and is awaiting assignment to a display + /// + SourceListItem PendingSource; + bool IsSharingModeAdvanced; public DualDisplaySimpleOrAdvancedRouting(EssentialsPresentationPanelAvFunctionsDriver parent) : base(parent.TriList) @@ -58,16 +66,16 @@ namespace PepperDash.Essentials /// /// /// - public override void Hide() - { - TriList.BooleanInput[UIBoolJoin.ToggleSharingModeVisible].BoolValue = false; - TriList.BooleanInput[UIBoolJoin.StagingPageVisible].BoolValue = false; - if(IsSharingModeAdvanced) - TriList.BooleanInput[UIBoolJoin.DualDisplayPageVisible].BoolValue = false; - else - TriList.BooleanInput[UIBoolJoin.SelectASourceVisible].BoolValue = false; - base.Hide(); - } + //public override void Hide() + //{ + // TriList.BooleanInput[UIBoolJoin.ToggleSharingModeVisible].BoolValue = false; + // TriList.BooleanInput[UIBoolJoin.StagingPageVisible].BoolValue = false; + // if(IsSharingModeAdvanced) + // TriList.BooleanInput[UIBoolJoin.DualDisplayPageVisible].BoolValue = false; + // else + // TriList.BooleanInput[UIBoolJoin.SelectASourceVisible].BoolValue = false; + // base.Hide(); + //} public void SetCurrentRoomFromParent() { @@ -103,9 +111,21 @@ namespace PepperDash.Essentials srcConfig.SourceKey); continue; } - var localSrcConfig = srcConfig; // lambda scope below + var localSrcItem = srcConfig; // lambda scope below + var localIndex = i; SourcesSrl.GetBoolFeedbackSig(i, 1).UserObject = new Action(b => - { if (!b) UiSelectSource(localSrcConfig); }); + { + if (IsSharingModeAdvanced) + { + if (LastSelectedSourceSig != null) + LastSelectedSourceSig.BoolValue = false; + SourceListButtonPress(localSrcItem); + LastSelectedSourceSig = SourcesSrl.BoolInputSig(localIndex, 1); + LastSelectedSourceSig.BoolValue = true; + } + else + Parent.CurrentRoom.DoSourceToAllDestinationsRoute(localSrcItem); + }); SourcesSrl.StringInputSig(i, 1).StringValue = srcConfig.PreferredName; i++; @@ -115,7 +135,9 @@ namespace PepperDash.Essentials //item.RegisterForSourceChange(Parent.CurrentRoom); } SourcesSrl.Count = (ushort)(i - 1); - Parent.CurrentRoom.CurrentSourceInfoChange += CurrentRoom_CurrentSourceInfoChange; + Parent.CurrentRoom.CurrentSingleSourceChange += CurrentRoom_CurrentSourceInfoChange; + Parent.CurrentRoom.CurrentDisplay1SourceChange += CurrentRoom_CurrentDisplay1SourceChange; + Parent.CurrentRoom.CurrentDisplay2SourceChange += CurrentRoom_CurrentDisplay2SourceChange; } } @@ -124,26 +146,21 @@ namespace PepperDash.Essentials } - /// - /// Called from button presses on source, where We can assume we want - /// to change to the proper screen. - /// - /// The key name of the route to run - void UiSelectSource(SourceListItem sourceItem) - { - if (IsSharingModeAdvanced) - { - SourceListButtonPress(sourceItem); - } - else - Parent.CurrentRoom.DoSourceToAllDestinationsRoute(sourceItem); - } - void CurrentRoom_CurrentSourceInfoChange(EssentialsRoomBase room, SourceListItem info, ChangeType type) { } + void CurrentRoom_CurrentDisplay1SourceChange(EssentialsRoomBase room, SourceListItem info, ChangeType type) + { + TriList.StringInput[UIStringJoin.Display1SourceLabel].StringValue = PendingSource.PreferredName; + + } + + void CurrentRoom_CurrentDisplay2SourceChange(EssentialsRoomBase room, SourceListItem info, ChangeType type) + { + TriList.StringInput[UIStringJoin.Display2SourceLabel].StringValue = PendingSource.PreferredName; + } /// /// @@ -164,6 +181,7 @@ namespace PepperDash.Essentials TriList.BooleanInput[UIBoolJoin.Display1ControlButtonEnable].BoolValue = false; TriList.BooleanInput[UIBoolJoin.Display2AudioButtonEnable].BoolValue = false; TriList.BooleanInput[UIBoolJoin.Display2ControlButtonEnable].BoolValue = false; + PendingSource = item; } void EnableAppropriateDisplayButtons() @@ -172,11 +190,15 @@ namespace PepperDash.Essentials TriList.BooleanInput[UIBoolJoin.Display1ControlButtonEnable].BoolValue = true; TriList.BooleanInput[UIBoolJoin.Display2AudioButtonEnable].BoolValue = true; TriList.BooleanInput[UIBoolJoin.Display2ControlButtonEnable].BoolValue = true; + if (LastSelectedSourceSig != null) + LastSelectedSourceSig.BoolValue = false; } public void Display1Press() { EnableAppropriateDisplayButtons(); + Parent.CurrentRoom.SourceToDisplay1(PendingSource); + // Enable end meeting } public void Display1AudioPress() @@ -184,6 +206,7 @@ namespace PepperDash.Essentials } + public void Display1ControlPress() { @@ -192,6 +215,7 @@ namespace PepperDash.Essentials public void Display2Press() { EnableAppropriateDisplayButtons(); + Parent.CurrentRoom.SourceToDisplay2(PendingSource); } public void Display2AudioPress() diff --git a/PepperDashEssentials/PepperDashEssentials/UI Drivers/EssentialsHuddlePanelAvFunctionsDriver.cs b/PepperDashEssentials/PepperDashEssentials/UI Drivers/EssentialsHuddlePanelAvFunctionsDriver.cs index 3a9c37c4..6b82e1a1 100644 --- a/PepperDashEssentials/PepperDashEssentials/UI Drivers/EssentialsHuddlePanelAvFunctionsDriver.cs +++ b/PepperDashEssentials/PepperDashEssentials/UI Drivers/EssentialsHuddlePanelAvFunctionsDriver.cs @@ -171,6 +171,9 @@ namespace PepperDash.Essentials .LinkInputSig(TriList.BooleanInput[UIBoolJoin.VolumeButtonPopupVisible]); PowerOffTimeout = 30000; + + TriList.StringInput[UIStringJoin.StartActivityText].StringValue = + "Tap Share to begin"; } /// @@ -553,7 +556,7 @@ namespace PepperDash.Essentials _CurrentRoom.OnFeedback.OutputChange -= _CurrentRoom_OnFeedback_OutputChange; _CurrentRoom.CurrentVolumeDeviceChange -= this._CurrentRoom_CurrentAudioDeviceChange; ClearAudioDeviceConnections(); - _CurrentRoom.CurrentSourceInfoChange -= this._CurrentRoom_SourceInfoChange; + _CurrentRoom.CurrentSingleSourceChange -= this._CurrentRoom_SourceInfoChange; DisconnectSource(_CurrentRoom.CurrentSourceInfo); } _CurrentRoom = room; @@ -595,7 +598,7 @@ namespace PepperDash.Essentials _CurrentRoom.OnFeedback.OutputChange += _CurrentRoom_OnFeedback_OutputChange; _CurrentRoom.CurrentVolumeDeviceChange += _CurrentRoom_CurrentAudioDeviceChange; RefreshAudioDeviceConnections(); - _CurrentRoom.CurrentSourceInfoChange += _CurrentRoom_SourceInfoChange; + _CurrentRoom.CurrentSingleSourceChange += _CurrentRoom_SourceInfoChange; RefreshSourceInfo(); } else diff --git a/PepperDashEssentials/PepperDashEssentials/UI Drivers/EssentialsPresentationPanelAvFunctionsDriver.cs b/PepperDashEssentials/PepperDashEssentials/UI Drivers/EssentialsPresentationPanelAvFunctionsDriver.cs index 153ea8cd..ad6af10e 100644 --- a/PepperDashEssentials/PepperDashEssentials/UI Drivers/EssentialsPresentationPanelAvFunctionsDriver.cs +++ b/PepperDashEssentials/PepperDashEssentials/UI Drivers/EssentialsPresentationPanelAvFunctionsDriver.cs @@ -16,6 +16,23 @@ namespace PepperDash.Essentials /// public class EssentialsPresentationPanelAvFunctionsDriver : PanelDriverBase { + /// + /// Smart Object 3200 + /// + SubpageReferenceList SourcesSrl; + + /// + /// For tracking feedback on last selected + /// + BoolInputSig LastSelectedSourceSig; + + /// + /// The source that has been selected and is awaiting assignment to a display + /// + SourceListItem PendingSource; + + bool IsSharingModeAdvanced; + CrestronTouchpanelPropertiesConfig Config; public enum UiDisplayMode @@ -102,10 +119,10 @@ namespace PepperDash.Essentials /// PanelDriverBase Parent; - /// - /// Driver that manages advanced sharing features - /// - DualDisplaySimpleOrAdvancedRouting DualDisplayUiDriver; + ///// + ///// Driver that manages advanced sharing features + ///// + //DualDisplaySimpleOrAdvancedRouting DualDisplayUiDriver; /// /// All children attached to this driver. For hiding and showing as a group. @@ -114,13 +131,6 @@ namespace PepperDash.Essentials List CurrentDisplayModeSigsInUse = new List(); - //// Important smart objects - - ///// - ///// Smart Object 3200 - ///// - //SubpageReferenceList SourcesSrl; - /// /// Smart Object 15022 /// @@ -158,10 +168,7 @@ namespace PepperDash.Essentials Config = config; Parent = parent; - - //SourcesSrl = new SubpageReferenceList(TriList, 3200, 3, 3, 3); ActivityFooterSrl = new SubpageReferenceList(TriList, 15022, 3, 3, 3); - DualDisplayUiDriver = new DualDisplaySimpleOrAdvancedRouting(this); SetupActivityFooterWhenRoomOff(); ShowVolumeGauge = true; @@ -176,6 +183,22 @@ namespace PepperDash.Essentials .LinkInputSig(TriList.BooleanInput[UIBoolJoin.VolumeButtonPopupVisible]); PowerOffTimeout = 30000; + + SourcesSrl = new SubpageReferenceList(TriList, 3200, 3, 3, 3); + + TriList.StringInput[UIStringJoin.StartActivityText].StringValue = + "Tap an activity to begin"; + + // Sharing mode things + TriList.SetSigFalseAction(UIBoolJoin.ToggleSharingModePress, ToggleSharingModePressed); + + TriList.SetSigFalseAction(UIBoolJoin.Display1AudioButtonPressAndFb, Display1AudioPress); + TriList.SetSigFalseAction(UIBoolJoin.Display1ControlButtonPress, Display1ControlPress); + TriList.SetSigTrueAction(UIBoolJoin.Display1SelectPress, Display1Press); + + TriList.SetSigFalseAction(UIBoolJoin.Display2AudioButtonPressAndFb, Display2AudioPress); + TriList.SetSigFalseAction(UIBoolJoin.Display2ControlButtonPress, Display2ControlPress); + TriList.SetSigTrueAction(UIBoolJoin.Display2SelectPress, Display2Press); } /// @@ -235,20 +258,61 @@ namespace PepperDash.Essentials base.Show(); } + /// + /// + /// public override void Hide() { - HideAndClearCurrentDisplayModeSigsInUse(); - TriList.BooleanInput[UIBoolJoin.TopBarVisible].BoolValue = false; - TriList.BooleanInput[UIBoolJoin.ActivityFooterVisible].BoolValue = false; - TriList.BooleanInput[UIBoolJoin.StartPageVisible].BoolValue = false; - TriList.BooleanInput[UIBoolJoin.TapToBeginVisible].BoolValue = false; - TriList.BooleanInput[UIBoolJoin.SelectASourceVisible].BoolValue = false; - //TriList.BooleanInput[UIBoolJoin.StagingPageVisible].BoolValue = false; + var tl = TriList.BooleanInput; + HideAndClearCurrentDisplayModeSigsInUse(); + tl[UIBoolJoin.TopBarVisible].BoolValue = false; + tl[UIBoolJoin.ActivityFooterVisible].BoolValue = false; + tl[UIBoolJoin.StartPageVisible].BoolValue = false; + tl[UIBoolJoin.TapToBeginVisible].BoolValue = false; + tl[UIBoolJoin.ToggleSharingModeVisible].BoolValue = false; + tl[UIBoolJoin.StagingPageVisible].BoolValue = false; + if (IsSharingModeAdvanced) + tl[UIBoolJoin.DualDisplayPageVisible].BoolValue = false; + else + tl[UIBoolJoin.SelectASourceVisible].BoolValue = false; + VolumeButtonsPopupFeedback.ClearNow(); CancelPowerOff(); base.Hide(); - } + } + + /// + /// + /// + void ShowCurrentSharingMode() + { + var tlb = TriList.BooleanInput; + tlb[UIBoolJoin.ToggleSharingModeVisible].BoolValue = true; + tlb[UIBoolJoin.StagingPageVisible].BoolValue = true; + if (IsSharingModeAdvanced) + { + tlb[UIBoolJoin.DualDisplayPageVisible].BoolValue = true; + TriList.StringInput[UIStringJoin.Display1TitleLabel].StringValue = + (CurrentRoom.Displays[1] as IKeyName).Name; + TriList.StringInput[UIStringJoin.Display2TitleLabel].StringValue = + (CurrentRoom.Displays[2] as IKeyName).Name; + } + else + tlb[UIBoolJoin.SelectASourceVisible].BoolValue = true; + } + + /// + /// + /// + void HideCurrentSharingMode() + { + var tl = TriList.BooleanInput; + tl[UIBoolJoin.ToggleSharingModeVisible].BoolValue = false; + tl[UIBoolJoin.StagingPageVisible].BoolValue = false; + tl[UIBoolJoin.DualDisplayPageVisible].BoolValue = false; + tl[UIBoolJoin.SelectASourceVisible].BoolValue = false; + } /// /// Shows the various "modes" that this driver controls. Presentation, Setup page @@ -296,51 +360,132 @@ namespace PepperDash.Essentials } } - ///// - ///// - ///// - //void ToggleSharingModePressed() - //{ - // HideSharingMode(); - // IsSharingModeAdvanced = !IsSharingModeAdvanced; - // TriList.BooleanInput[UIBoolJoin.ToggleSharingModePress].BoolValue = IsSharingModeAdvanced; - // RevealSharingMode(); - //} + /// + /// + /// + void SetupSourceList() + { + // get the source list config and set up the source list + var config = ConfigReader.ConfigObject.SourceLists; + if (config.ContainsKey(CurrentRoom.SourceListKey)) + { + var srcList = config[CurrentRoom.SourceListKey] + .Values.ToList().OrderBy(s => s.Order); + // Setup sources list + uint i = 1; // counter for UI list + foreach (var srcConfig in srcList) + { + if (!srcConfig.IncludeInSourceList) // Skip sources marked this way + continue; - ///// - ///// - ///// - //void HideSharingMode() - //{ - // TriList.BooleanInput[UIBoolJoin.StagingPageVisible].BoolValue = false; - // if (IsSharingModeAdvanced) - // { - // if (DualDisplayUiDriver != null) - // DualDisplayUiDriver.Hide(); - // } - // else - // { - // TriList.BooleanInput[UIBoolJoin.SelectASourceVisible].BoolValue = false; - // } - //} + var sourceKey = srcConfig.SourceKey; + var actualSource = DeviceManager.GetDeviceForKey(sourceKey) as Device; + if (actualSource == null) + { + Debug.Console(0, "Cannot assign missing source '{0}' to source UI list", + srcConfig.SourceKey); + continue; + } + var localSrcItem = srcConfig; // lambda scope below + var localIndex = i; + SourcesSrl.GetBoolFeedbackSig(i, 1).UserObject = new Action(b => + { + if (IsSharingModeAdvanced) + { + if (LastSelectedSourceSig != null) + LastSelectedSourceSig.BoolValue = false; + SourceListButtonPress(localSrcItem); + LastSelectedSourceSig = SourcesSrl.BoolInputSig(localIndex, 1); + LastSelectedSourceSig.BoolValue = true; + } + else + CurrentRoom.DoSourceToAllDestinationsRoute(localSrcItem); + }); + SourcesSrl.StringInputSig(i, 1).StringValue = srcConfig.PreferredName; + i++; + } + var count = (ushort)(i-1); + SourcesSrl.Count = count; + TriList.BooleanInput[UIBoolJoin.StagingPageAdditionalArrowsVisible].BoolValue = + count >= Config.SourcesOverflowCount; - ///// - ///// - ///// - //void RevealSharingMode() - //{ - // TriList.BooleanInput[UIBoolJoin.StagingPageVisible].BoolValue = true; - // if (IsSharingModeAdvanced) - // { - // if(DualDisplayUiDriver == null) - // DualDisplayUiDriver = new DualDisplaySimpleOrAdvancedRouting(this); - // DualDisplayUiDriver.Show(); - // } - // else - // { - // TriList.BooleanInput[UIBoolJoin.SelectASourceVisible].BoolValue = true; - // } - //} + _CurrentRoom.CurrentDisplay1SourceChange += _CurrentRoom_CurrentDisplay1SourceChange; + _CurrentRoom.CurrentDisplay2SourceChange += _CurrentRoom_CurrentDisplay2SourceChange; + } + } + + /// + /// + /// + void ToggleSharingModePressed() + { + HideCurrentSharingMode(); + IsSharingModeAdvanced = !IsSharingModeAdvanced; + TriList.BooleanInput[UIBoolJoin.ToggleSharingModePress].BoolValue = IsSharingModeAdvanced; + ShowCurrentSharingMode(); + } + + /// + /// + /// + /// + public void SourceListButtonPress(SourceListItem item) + { + // start the timer + // show FB on potential source + TriList.BooleanInput[UIBoolJoin.Display1AudioButtonEnable].BoolValue = false; + TriList.BooleanInput[UIBoolJoin.Display1ControlButtonEnable].BoolValue = false; + TriList.BooleanInput[UIBoolJoin.Display2AudioButtonEnable].BoolValue = false; + TriList.BooleanInput[UIBoolJoin.Display2ControlButtonEnable].BoolValue = false; + PendingSource = item; + } + + /// + /// + /// + void EnableAppropriateDisplayButtons() + { + TriList.BooleanInput[UIBoolJoin.Display1AudioButtonEnable].BoolValue = true; + TriList.BooleanInput[UIBoolJoin.Display1ControlButtonEnable].BoolValue = true; + TriList.BooleanInput[UIBoolJoin.Display2AudioButtonEnable].BoolValue = true; + TriList.BooleanInput[UIBoolJoin.Display2ControlButtonEnable].BoolValue = true; + if (LastSelectedSourceSig != null) + LastSelectedSourceSig.BoolValue = false; + } + + public void Display1Press() + { + EnableAppropriateDisplayButtons(); + CurrentRoom.SourceToDisplay1(PendingSource); + // Enable end meeting + } + + public void Display1AudioPress() + { + + } + + + public void Display1ControlPress() + { + + } + + public void Display2Press() + { + EnableAppropriateDisplayButtons(); + CurrentRoom.SourceToDisplay2(PendingSource); + } + + public void Display2AudioPress() + { + + } + + public void Display2ControlPress() + { + + } /// /// When the room is off, set the footer SRL @@ -370,7 +515,7 @@ namespace PepperDash.Essentials 3, b => { if (!b) PowerButtonPressed(); })); ActivityFooterSrl.Count = 3; TriList.UShortInput[UIUshortJoin.PresentationListCaretMode].UShortValue = 2; - EndMeetingButtonSig = ActivityFooterSrl.BoolInputSig(2, 1); + EndMeetingButtonSig = ActivityFooterSrl.BoolInputSig(3, 1); } /// @@ -383,9 +528,7 @@ namespace PepperDash.Essentials { ShareButtonSig.BoolValue = true; TriList.BooleanInput[UIBoolJoin.StartPageVisible].BoolValue = false; - DualDisplayUiDriver.Show(); - //TriList.BooleanInput[UIBoolJoin.ToggleSharingModeVisible].BoolValue = true; - //RevealSharingMode(); + ShowCurrentSharingMode(); } } @@ -457,10 +600,10 @@ namespace PepperDash.Essentials /// void ShowCurrentSource() { - if (CurrentRoom.CurrentSourceInfo == null) + if (CurrentRoom.CurrentSingleSourceInfo == null) return; - var uiDev = CurrentRoom.CurrentSourceInfo.SourceDevice as IUiDisplayInfo; + var uiDev = CurrentRoom.CurrentSingleSourceInfo.SourceDevice as IUiDisplayInfo; PageManager pm = null; // If we need a page manager, get an appropriate one if (uiDev != null) @@ -483,21 +626,6 @@ namespace PepperDash.Essentials } } - ///// - ///// Called from button presses on source, where We can assume we want - ///// to change to the proper screen. - ///// - ///// The key name of the route to run - //void UiSelectSource(SourceListItem sourceItem) - //{ - // if (IsSharingModeAdvanced) - // { - // DualDisplayUiDriver.SourceListButtonPress(sourceItem); - // } - // else - // CurrentRoom.DoSourceToAllDestinationsRoute(sourceItem); - //} - /// /// /// @@ -517,7 +645,9 @@ namespace PepperDash.Essentials but => { if (but != 2) + { CurrentRoom.DoSourceToAllDestinationsRoute(null); + } else ShareButtonSig.BoolValue = true; // restore Share fb EndMeetingButtonSig.BoolValue = false; @@ -609,22 +739,25 @@ namespace PepperDash.Essentials _CurrentRoom.OnFeedback.OutputChange -= _CurrentRoom_OnFeedback_OutputChange; _CurrentRoom.CurrentVolumeDeviceChange -= this._CurrentRoom_CurrentAudioDeviceChange; ClearAudioDeviceConnections(); - _CurrentRoom.CurrentSourceInfoChange -= this._CurrentRoom_SourceInfoChange; - DisconnectSource(_CurrentRoom.CurrentSourceInfo); + _CurrentRoom.CurrentSingleSourceChange -= this._CurrentRoom_SourceInfoChange; + DisconnectSource(_CurrentRoom.CurrentSingleSourceInfo); } _CurrentRoom = room; if (_CurrentRoom != null) { - DualDisplayUiDriver.SetCurrentRoomFromParent(); - //SetupSourcesForSimpleRouting(); + if (IsSharingModeAdvanced) + {} // add stuff here + else + SetupSourceList(); + TriList.StringInput[UIStringJoin.CurrentRoomName].StringValue = _CurrentRoom.Name; // Link up all the change events from the room _CurrentRoom.OnFeedback.OutputChange += _CurrentRoom_OnFeedback_OutputChange; _CurrentRoom.CurrentVolumeDeviceChange += _CurrentRoom_CurrentAudioDeviceChange; RefreshAudioDeviceConnections(); - _CurrentRoom.CurrentSourceInfoChange += _CurrentRoom_SourceInfoChange; + _CurrentRoom.CurrentSingleSourceChange += _CurrentRoom_SourceInfoChange; RefreshSourceInfo(); } else @@ -648,44 +781,31 @@ namespace PepperDash.Essentials } else { - DualDisplayUiDriver.Hide(); + HideCurrentSharingMode(); SetupActivityFooterWhenRoomOff(); TriList.BooleanInput[UIBoolJoin.StartPageVisible].BoolValue = true; } } - //void SetupSourcesForSimpleRouting() - //{ - // // get the source list config and set up the source list - // var config = ConfigReader.ConfigObject.SourceLists; - // if (config.ContainsKey(_CurrentRoom.SourceListKey)) - // { - // var srcList = config[_CurrentRoom.SourceListKey] - // .Values.ToList().OrderBy(s => s.Order); - // // Setup sources list - // uint i = 1; // counter for UI list - // foreach (var srcConfig in srcList) - // { - // if (!srcConfig.IncludeInSourceList) // Skip sources marked this way - // continue; + /// + /// + /// + void _CurrentRoom_CurrentDisplay1SourceChange(EssentialsRoomBase room, SourceListItem info, ChangeType type) + { + if (type == ChangeType.DidChange) + TriList.StringInput[UIStringJoin.Display1SourceLabel].StringValue = + info == null ? "" : info.PreferredName; + } - // var sourceKey = srcConfig.SourceKey; - // var actualSource = DeviceManager.GetDeviceForKey(sourceKey) as Device; - // if (actualSource == null) - // { - // Debug.Console(0, "Cannot assign missing source '{0}' to source UI list", - // srcConfig.SourceKey); - // continue; - // } - // var localSrcConfig = srcConfig; // lambda scope below - // var item = new SubpageReferenceListSourceItem(i++, SourcesSrl, srcConfig, - // b => { if (!b) UiSelectSource(localSrcConfig); }); - // SourcesSrl.AddItem(item); // add to the SRL - // item.RegisterForSourceChange(_CurrentRoom); - // } - // SourcesSrl.Count = (ushort)(i - 1); - // } - //} + /// + /// + /// + void _CurrentRoom_CurrentDisplay2SourceChange(EssentialsRoomBase room, SourceListItem info, ChangeType type) + { + if (type == ChangeType.DidChange) + TriList.StringInput[UIStringJoin.Display2SourceLabel].StringValue = + info == null ? "" : info.PreferredName; + } /// /// Hides source for provided source info @@ -735,7 +855,7 @@ namespace PepperDash.Essentials /// void RefreshSourceInfo() { - var routeInfo = CurrentRoom.CurrentSourceInfo; + var routeInfo = CurrentRoom.CurrentSingleSourceInfo; // This will show off popup too if (this.IsVisible) ShowCurrentSource(); @@ -749,7 +869,7 @@ namespace PepperDash.Essentials Parent.Show(); return; } - else if (CurrentRoom.CurrentSourceInfo != null) + else if (CurrentRoom.CurrentSingleSourceInfo != null) { TriList.StringInput[UIStringJoin.CurrentSourceName].StringValue = routeInfo.PreferredName; TriList.StringInput[UIStringJoin.CurrentSourceIcon].StringValue = routeInfo.Icon; // defaults to "blank" diff --git a/PepperDashEssentials/PepperDashEssentials/UI Drivers/SmartObjectRoomsList.cs b/PepperDashEssentials/PepperDashEssentials/UI Drivers/SmartObjectRoomsList.cs index 7d818e3e..e942913a 100644 --- a/PepperDashEssentials/PepperDashEssentials/UI Drivers/SmartObjectRoomsList.cs +++ b/PepperDashEssentials/PepperDashEssentials/UI Drivers/SmartObjectRoomsList.cs @@ -64,7 +64,7 @@ namespace PepperDash.Essentials parent.SetItemMainText(index, room.Name); UpdateItem(room.CurrentSourceInfo); // Watch for later changes - room.CurrentSourceInfoChange += new SourceInfoChangeHandler(room_CurrentSourceInfoChange); + room.CurrentSingleSourceChange += new SourceInfoChangeHandler(room_CurrentSourceInfoChange); parent.SetItemButtonAction(index, buttonAction); } diff --git a/PepperDashEssentials/PepperDashEssentials/UI Drivers/UIJoins.cs b/PepperDashEssentials/PepperDashEssentials/UI Drivers/UIJoins.cs index 77a7c42c..2f1be68f 100644 --- a/PepperDashEssentials/PepperDashEssentials/UI Drivers/UIJoins.cs +++ b/PepperDashEssentials/PepperDashEssentials/UI Drivers/UIJoins.cs @@ -178,6 +178,7 @@ namespace PepperDash.Essentials public const uint CurrentSourceIcon = 3903; public const uint PowerOffMessage = 3911; public const uint StartPageMessage = 3912; + public const uint StartActivityText = 3913; public const uint HelpMessage = 3922; /// diff --git a/PepperDashEssentials/PepperDashEssentials/UI/CrestronTouchpanelPropertiesConfig.cs b/PepperDashEssentials/PepperDashEssentials/UI/CrestronTouchpanelPropertiesConfig.cs index 30ee75b7..3279c2c1 100644 --- a/PepperDashEssentials/PepperDashEssentials/UI/CrestronTouchpanelPropertiesConfig.cs +++ b/PepperDashEssentials/PepperDashEssentials/UI/CrestronTouchpanelPropertiesConfig.cs @@ -11,5 +11,15 @@ public bool UsesSplashPage { get; set; } public bool ShowDate { get; set; } public bool ShowTime { get; set; } + /// + /// The count of sources that will trigger the "additional" arrows to show on the SRL. + /// Defaults to 5 + /// + public int SourcesOverflowCount { get; set; } + + public CrestronTouchpanelPropertiesConfig() + { + SourcesOverflowCount = 5; + } } } \ No newline at end of file diff --git a/PepperDashEssentials/PepperDashEssentials/UI/SubpageReferenceListSourceItem.cs b/PepperDashEssentials/PepperDashEssentials/UI/SubpageReferenceListSourceItem.cs index bd5a3348..73cc5e71 100644 --- a/PepperDashEssentials/PepperDashEssentials/UI/SubpageReferenceListSourceItem.cs +++ b/PepperDashEssentials/PepperDashEssentials/UI/SubpageReferenceListSourceItem.cs @@ -1,65 +1,65 @@ -//using System; -//using System.Collections.Generic; -//using System.Linq; -//using System.Text; -//using Crestron.SimplSharp; -//using Crestron.SimplSharpPro; -//using Crestron.SimplSharpPro.UI; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; +using Crestron.SimplSharpPro; +using Crestron.SimplSharpPro.UI; -//using PepperDash.Essentials.Core; +using PepperDash.Essentials.Core; -//namespace PepperDash.Essentials -//{ -// public class SubpageReferenceListSourceItem : SubpageReferenceListItem -// { -// public SourceListItem SourceItem { get; private set; } +namespace PepperDash.Essentials +{ + public class SubpageReferenceListSourceItem : SubpageReferenceListItem + { + public SourceListItem SourceItem { get; private set; } -// public SubpageReferenceListSourceItem(uint index, SubpageReferenceList owner, -// SourceListItem sourceItem, Action routeAction) -// : base(index, owner) -// { -// SourceItem = sourceItem; -// owner.GetBoolFeedbackSig(index, 1).UserObject = new Action(routeAction); -// owner.StringInputSig(index, 1).StringValue = SourceItem.PreferredName; -// } + public SubpageReferenceListSourceItem(uint index, SubpageReferenceList owner, + SourceListItem sourceItem, Action routeAction) + : base(index, owner) + { + SourceItem = sourceItem; + owner.GetBoolFeedbackSig(index, 1).UserObject = new Action(routeAction); + owner.StringInputSig(index, 1).StringValue = SourceItem.PreferredName; + } -// public void RegisterForSourceChange(IHasCurrentSourceInfoChange room) -// { -// room.CurrentSourceInfoChange -= room_CurrentSourceInfoChange; -// room.CurrentSourceInfoChange += room_CurrentSourceInfoChange; -// } + public void RegisterForSourceChange(IHasCurrentSourceInfoChange room) + { + room.CurrentSingleSourceChange -= room_CurrentSourceInfoChange; + room.CurrentSingleSourceChange += room_CurrentSourceInfoChange; + } -// void room_CurrentSourceInfoChange(EssentialsRoomBase room, SourceListItem info, ChangeType type) -// { -// if (type == ChangeType.WillChange && info == SourceItem) -// ClearFeedback(); -// else if (type == ChangeType.DidChange && info == SourceItem) -// SetFeedback(); -// } + void room_CurrentSourceInfoChange(EssentialsRoomBase room, SourceListItem info, ChangeType type) + { + if (type == ChangeType.WillChange && info == SourceItem) + ClearFeedback(); + else if (type == ChangeType.DidChange && info == SourceItem) + SetFeedback(); + } -// /// -// /// Called by SRL to release all referenced objects -// /// -// public override void Clear() -// { -// Owner.BoolInputSig(Index, 1).UserObject = null; -// Owner.StringInputSig(Index, 1).StringValue = ""; -// } + /// + /// Called by SRL to release all referenced objects + /// + public override void Clear() + { + Owner.BoolInputSig(Index, 1).UserObject = null; + Owner.StringInputSig(Index, 1).StringValue = ""; + } -// /// -// /// Sets the selected feedback on the button -// /// -// public void SetFeedback() -// { -// Owner.BoolInputSig(Index, 1).BoolValue = true; -// } + /// + /// Sets the selected feedback on the button + /// + public void SetFeedback() + { + Owner.BoolInputSig(Index, 1).BoolValue = true; + } -// /// -// /// Clears the selected feedback on the button -// /// -// public void ClearFeedback() -// { -// Owner.BoolInputSig(Index, 1).BoolValue = false; -// } -// } -//} \ No newline at end of file + /// + /// Clears the selected feedback on the button + /// + public void ClearFeedback() + { + Owner.BoolInputSig(Index, 1).BoolValue = false; + } + } +} \ No newline at end of file diff --git a/PepperDashEssentials/PepperDashEssentials/bin/PepperDashEssentials.cpz b/PepperDashEssentials/PepperDashEssentials/bin/PepperDashEssentials.cpz index 612a35bf..450ccc7a 100644 Binary files a/PepperDashEssentials/PepperDashEssentials/bin/PepperDashEssentials.cpz and b/PepperDashEssentials/PepperDashEssentials/bin/PepperDashEssentials.cpz differ diff --git a/PepperDashEssentials/PepperDashEssentials/bin/PepperDashEssentials.dll b/PepperDashEssentials/PepperDashEssentials/bin/PepperDashEssentials.dll index ee0f6007..499a9644 100644 Binary files a/PepperDashEssentials/PepperDashEssentials/bin/PepperDashEssentials.dll and b/PepperDashEssentials/PepperDashEssentials/bin/PepperDashEssentials.dll differ diff --git a/PepperDashEssentials/PepperDashEssentials/bin/PepperDashEssentials.pdb b/PepperDashEssentials/PepperDashEssentials/bin/PepperDashEssentials.pdb index 99792765..99e8cc26 100644 Binary files a/PepperDashEssentials/PepperDashEssentials/bin/PepperDashEssentials.pdb and b/PepperDashEssentials/PepperDashEssentials/bin/PepperDashEssentials.pdb differ diff --git a/PepperDashEssentials/PepperDashEssentials/bin/ProgramInfo.config b/PepperDashEssentials/PepperDashEssentials/bin/ProgramInfo.config index 0d3d8707..d43a8f26 100644 --- a/PepperDashEssentials/PepperDashEssentials/bin/ProgramInfo.config +++ b/PepperDashEssentials/PepperDashEssentials/bin/ProgramInfo.config @@ -10,8 +10,8 @@ - 2/16/2017 3:45:04 PM - 1.0.0.28239 + 2/20/2017 5:05:08 PM + 1.0.0.30753 Crestron.SIMPLSharp, Version=2.0.48.0, Culture=neutral, PublicKeyToken=812d080f93e2de10 diff --git a/PepperDashEssentials/PepperDashEssentials/bin/manifest.info b/PepperDashEssentials/PepperDashEssentials/bin/manifest.info index efdd875e..4d5255bf 100644 --- a/PepperDashEssentials/PepperDashEssentials/bin/manifest.info +++ b/PepperDashEssentials/PepperDashEssentials/bin/manifest.info @@ -1,4 +1,4 @@ -MainAssembly=PepperDashEssentials.dll:5deb13632556e8d5c82a54c2bb816ea0 +MainAssembly=PepperDashEssentials.dll:0b867fd313ed2c071ddab7aa55521c8b MainAssemblyMinFirmwareVersion=1.009.0029 MainAssemblyResource=SimplSharpData.dat:820b61c48c8a2cace82957eed4cc377c ü diff --git a/PepperDashEssentials/PepperDashEssentials/bin/manifest.ser b/PepperDashEssentials/PepperDashEssentials/bin/manifest.ser index b14026c2..a6f9e2b3 100644 Binary files a/PepperDashEssentials/PepperDashEssentials/bin/manifest.ser and b/PepperDashEssentials/PepperDashEssentials/bin/manifest.ser differ diff --git a/PepperDashEssentials/PepperDashEssentials/obj/Debug/PepperDashEssentials.dll b/PepperDashEssentials/PepperDashEssentials/obj/Debug/PepperDashEssentials.dll index 8d79389b..96915754 100644 Binary files a/PepperDashEssentials/PepperDashEssentials/obj/Debug/PepperDashEssentials.dll and b/PepperDashEssentials/PepperDashEssentials/obj/Debug/PepperDashEssentials.dll differ diff --git a/PepperDashEssentials/PepperDashEssentials/obj/Debug/PepperDashEssentials.pdb b/PepperDashEssentials/PepperDashEssentials/obj/Debug/PepperDashEssentials.pdb index 7f27dbfd..95e76228 100644 Binary files a/PepperDashEssentials/PepperDashEssentials/obj/Debug/PepperDashEssentials.pdb and b/PepperDashEssentials/PepperDashEssentials/obj/Debug/PepperDashEssentials.pdb differ