Even more basic dual-display workflow

This commit is contained in:
Heath Volmer
2017-02-14 17:16:25 -07:00
parent a0f1201a1a
commit 23729f680c
8 changed files with 193 additions and 62 deletions

View File

@@ -163,6 +163,7 @@
<Compile Include="UI Drivers\SingleSubpageModalAndBackDriver.cs" />
<Compile Include="UI Drivers\SmartObjectRoomsList.cs" />
<Compile Include="UI Drivers\UIJoins.cs" />
<Compile Include="UI\DualDisplaySourceSRLController.cs" />
<Compile Include="UI\SubpageReferenceListActivityItem.cs" />
<Compile Include="UI\CrestronTouchpanelPropertiesConfig.cs" />
<Compile Include="FOR REFERENCE UI\Panels\REMOVE UiCue.cs" />

View File

@@ -0,0 +1,110 @@
2/14/2017 9:19:32 AM, Info: Initializing SIMPLSharp Services...
2/14/2017 9:19:32 AM, Info: ProjectInfo successfully initialized.
2/14/2017 9:49:26 AM, Info: Saving project information...
2/14/2017 9:49:26 AM, Info: Saving project information...
2/14/2017 9:49:26 AM, Info: Saving project information...
2/14/2017 9:54:26 AM, Info: Saving project information...
2/14/2017 9:54:26 AM, Info: Saving project information...
2/14/2017 9:54:26 AM, Info: Saving project information...
2/14/2017 9:59:26 AM, Info: Saving project information...
2/14/2017 9:59:26 AM, Info: Saving project information...
2/14/2017 9:59:26 AM, Info: Saving project information...
2/14/2017 10:04:24 AM, Info: Saving project information...
2/14/2017 10:04:24 AM, Info: Saving project information...
2/14/2017 10:04:24 AM, Info: Saving project information...
2/14/2017 10:04:24 AM, Info: Saving project information...
2/14/2017 10:04:24 AM, Info: Saving project information...
2/14/2017 10:04:24 AM, Info: Saving project information...
2/14/2017 10:04:27 AM, Info: Validating assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll...
2/14/2017 10:04:28 AM, Info: Verifying assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll
2/14/2017 10:04:29 AM, Info: Creating Archive C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.cpz...
2/14/2017 10:04:30 AM, Info: Saving project information...
2/14/2017 10:45:07 AM, Info: Validating assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll...
2/14/2017 10:45:08 AM, Info: Verifying assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll
2/14/2017 10:45:08 AM, Info: Creating Archive C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.cpz...
2/14/2017 10:45:09 AM, Info: Saving project information...
2/14/2017 10:54:24 AM, Info: Validating assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll...
2/14/2017 10:54:25 AM, Info: Verifying assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll
2/14/2017 10:54:25 AM, Info: Creating Archive C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.cpz...
2/14/2017 10:54:26 AM, Info: Saving project information...
2/14/2017 11:20:14 AM, Info: Validating assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll...
2/14/2017 11:20:15 AM, Info: Verifying assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll
2/14/2017 11:20:15 AM, Info: Creating Archive C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.cpz...
2/14/2017 11:20:16 AM, Info: Saving project information...
2/14/2017 11:24:21 AM, Info: Validating assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll...
2/14/2017 11:24:21 AM, Info: Verifying assembly C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.dll
2/14/2017 11:24:21 AM, Info: Creating Archive C:\Users\hvolmer\Desktop\working\essentials\PepperDashEssentials\PepperDashEssentials\bin\PepperDashEssentials.cpz...
2/14/2017 11:24:23 AM, Info: Saving project information...
2/14/2017 3:14:36 PM, Info: Saving project information...
2/14/2017 3:14:36 PM, Info: Saving project information...
2/14/2017 3:14:36 PM, Info: Saving project information...
2/14/2017 3:19:36 PM, Info: Saving project information...
2/14/2017 3:19:36 PM, Info: Saving project information...
2/14/2017 3:19:36 PM, Info: Saving project information...
2/14/2017 3:24:36 PM, Info: Saving project information...
2/14/2017 3:24:36 PM, Info: Saving project information...
2/14/2017 3:24:36 PM, Info: Saving project information...
2/14/2017 3:29:36 PM, Info: Saving project information...
2/14/2017 3:29:36 PM, Info: Saving project information...
2/14/2017 3:29:36 PM, Info: Saving project information...
2/14/2017 3:34:36 PM, Info: Saving project information...
2/14/2017 3:34:36 PM, Info: Saving project information...
2/14/2017 3:34:36 PM, Info: Saving project information...
2/14/2017 3:39:36 PM, Info: Saving project information...
2/14/2017 3:39:36 PM, Info: Saving project information...
2/14/2017 3:39:36 PM, Info: Saving project information...
2/14/2017 3:56:52 PM, Info: Saving project information...
2/14/2017 3:56:52 PM, Info: Saving project information...
2/14/2017 3:56:52 PM, Info: Saving project information...
2/14/2017 4:01:51 PM, Info: Saving project information...
2/14/2017 4:01:51 PM, Info: Saving project information...
2/14/2017 4:01:51 PM, Info: Saving project information...
2/14/2017 4:06:51 PM, Info: Saving project information...
2/14/2017 4:06:51 PM, Info: Saving project information...
2/14/2017 4:06:51 PM, Info: Saving project information...
2/14/2017 4:11:51 PM, Info: Saving project information...
2/14/2017 4:11:51 PM, Info: Saving project information...
2/14/2017 4:11:51 PM, Info: Saving project information...
2/14/2017 4:16:51 PM, Info: Saving project information...
2/14/2017 4:16:51 PM, Info: Saving project information...
2/14/2017 4:16:51 PM, Info: Saving project information...
2/14/2017 4:21:51 PM, Info: Saving project information...
2/14/2017 4:21:51 PM, Info: Saving project information...
2/14/2017 4:21:51 PM, Info: Saving project information...
2/14/2017 4:26:51 PM, Info: Saving project information...
2/14/2017 4:26:51 PM, Info: Saving project information...
2/14/2017 4:26:51 PM, Info: Saving project information...
2/14/2017 4:31:51 PM, Info: Saving project information...
2/14/2017 4:31:51 PM, Info: Saving project information...
2/14/2017 4:31:51 PM, Info: Saving project information...
2/14/2017 4:36:51 PM, Info: Saving project information...
2/14/2017 4:36:51 PM, Info: Saving project information...
2/14/2017 4:36:51 PM, Info: Saving project information...
2/14/2017 4:41:51 PM, Info: Saving project information...
2/14/2017 4:41:51 PM, Info: Saving project information...
2/14/2017 4:41:51 PM, Info: Saving project information...
2/14/2017 4:46:51 PM, Info: Saving project information...
2/14/2017 4:46:51 PM, Info: Saving project information...
2/14/2017 4:46:51 PM, Info: Saving project information...
2/14/2017 4:51:51 PM, Info: Saving project information...
2/14/2017 4:51:51 PM, Info: Saving project information...
2/14/2017 4:51:51 PM, Info: Saving project information...
2/14/2017 4:56:51 PM, Info: Saving project information...
2/14/2017 4:56:51 PM, Info: Saving project information...
2/14/2017 4:56:51 PM, Info: Saving project information...
2/14/2017 5:01:51 PM, Info: Saving project information...
2/14/2017 5:01:51 PM, Info: Saving project information...
2/14/2017 5:01:51 PM, Info: Saving project information...
2/14/2017 5:06:51 PM, Info: Saving project information...
2/14/2017 5:06:51 PM, Info: Saving project information...
2/14/2017 5:06:51 PM, Info: Saving project information...
2/14/2017 5:11:51 PM, Info: Saving project information...
2/14/2017 5:11:51 PM, Info: Saving project information...
2/14/2017 5:11:51 PM, Info: Saving project information...
2/14/2017 5:16:18 PM, Info: Saving project information...
2/14/2017 5:16:18 PM, Info: Saving project information...
2/14/2017 5:16:18 PM, Info: Saving project information...
2/14/2017 5:16:18 PM, Info: Saving project information...
2/14/2017 5:16:18 PM, Info: Saving project information...
2/14/2017 5:16:18 PM, Info: Saving project information...
2/14/2017 5:16:19 PM, Info: Terminating SIMPLSharp Services

View File

@@ -14,44 +14,17 @@ namespace PepperDash.Essentials
{
public class DualDisplayRouting : PanelDriverBase
{
//public BoolFeedback Display1AudioButtonEnable { get; private set; }
//bool _Display1AudioButtonEnable;
//public BoolFeedback Display1AudioButtonFeedback { get; private set; }
//bool _Display1AudioButtonFeedback;
//public BoolFeedback Display1ControlButtonEnable { get; private set; }
//bool _Display1ControlButtonEnable;
//public BoolFeedback Display2AudioButtonEnable { get; private set; }
//bool _Display2AudioButtonEnable;
//public BoolFeedback Display2AudioButtonFeedback { get; private set; }
//bool _Display2AudioButtonFeedback;
//public BoolFeedback Display2ControlButtonEnable { get; private set; }
//bool _Display2ControlButtonEnable;
//public BoolFeedback DualDisplayRoutingVisible { get; private set; }
//bool _DualDisplayRoutingVisible;
CTimer SourceSelectedTimer;
public DualDisplayRouting(BasicTriListWithSmartObject trilist) : base(trilist)
{
//Display1AudioButtonEnable = new BoolFeedback(() => _Display1AudioButtonEnable);
//Display1AudioButtonFeedback = new BoolFeedback(() => _Display1AudioButtonFeedback);
TriList.SetSigFalseAction(UIBoolJoin.Display1AudioButtonPressAndFb, Display1AudioPress);
//Display1ControlButtonEnable = new BoolFeedback(() => _Display1ControlButtonEnable);
TriList.SetSigFalseAction(UIBoolJoin.Display1ControlButtonPress, Display1ControlPress);
TriList.SetSigTrueAction(UIBoolJoin.Display1SelectPress, Display1Press);
TriList.SetSigFalseAction(UIBoolJoin.Display1SelectPress, Display1Press);
//Display2AudioButtonEnable = new BoolFeedback(() => _Display2AudioButtonEnable);
//Display2AudioButtonFeedback = new BoolFeedback(() => _Display2AudioButtonFeedback);
TriList.SetSigFalseAction(UIBoolJoin.Display2AudioButtonPressAndFb, Display2AudioPress);
//Display2ControlButtonEnable = new BoolFeedback(() => _Display2ControlButtonEnable);
TriList.SetSigFalseAction(UIBoolJoin.Display2ControlButtonPress, Display2ControlPress);
TriList.SetSigFalseAction(UIBoolJoin.Display2SelectPress, Display2Press);
//DualDisplayRoutingVisible = new BoolFeedback(() => _DualDisplayRoutingVisible);
TriList.SetSigTrueAction(UIBoolJoin.Display2SelectPress, Display2Press);
}
public void Enable()
@@ -68,7 +41,6 @@ namespace PepperDash.Essentials
public override void Hide()
{
TriList.BooleanInput[UIBoolJoin.DualDisplayPageVisible].BoolValue = false;
base.Hide();
}

View File

@@ -615,36 +615,7 @@ namespace PepperDash.Essentials
if (_CurrentRoom != null)
{
// 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;
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);
}
SetupSourcesForSimpleRouting();
TriList.StringInput[UIStringJoin.CurrentRoomName].StringValue = _CurrentRoom.Name;
// Link up all the change events from the room
@@ -680,6 +651,39 @@ namespace PepperDash.Essentials
}
}
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;
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);
}
}
/// <summary>
/// Hides source for provided source info
/// </summary>

View File

@@ -0,0 +1,28 @@
//using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Text;
//using Crestron.SimplSharp;
//using Crestron.SimplSharpPro;
//using Crestron.SimplSharpPro.DeviceSupport;
//using Crestron.SimplSharpPro.UI;
//using PepperDash.Essentials.Core;
//namespace PepperDash.Essentials
//{
// public class DualDisplaySourceSRLController : SubpageReferenceList
// {
// public DualDisplaySourceSRLController(BasicTriListWithSmartObject triList,
// uint smartObjectId, EssentialsPresentationRoom room)
// : base(triList, smartObjectId, 3, 3, 3)
// {
// var srcList = room.s items.Values.ToList().OrderBy(s => s.Order);
// foreach (var item in srcList)
// {
// GetBoolFeedbackSig(index, 1).UserObject = new Action<bool>(routeAction);
// }
// }
// }
//}

View File

@@ -32,9 +32,9 @@ namespace PepperDash.Essentials
void room_CurrentSourceInfoChange(EssentialsRoomBase room, SourceListItem info, ChangeType type)
{
if (type == ChangeType.WillChange && info == SourceItem)
Owner.BoolInputSig(Index, 1).BoolValue = false;
ClearFeedback();
else if (type == ChangeType.DidChange && info == SourceItem)
Owner.BoolInputSig(Index, 1).BoolValue = true;
SetFeedback();
}
/// <summary>
@@ -45,5 +45,21 @@ namespace PepperDash.Essentials
Owner.BoolInputSig(Index, 1).UserObject = null;
Owner.StringInputSig(Index, 1).StringValue = "";
}
/// <summary>
/// Sets the selected feedback on the button
/// </summary>
public void SetFeedback()
{
Owner.BoolInputSig(Index, 1).BoolValue = true;
}
/// <summary>
/// Clears the selected feedback on the button
/// </summary>
public void ClearFeedback()
{
Owner.BoolInputSig(Index, 1).BoolValue = false;
}
}
}