mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-16 05:05:00 +00:00
Restructured header into icon list depending on features available
This commit is contained in:
@@ -11,7 +11,7 @@ using PepperDash.Essentials.Devices.Common.Codec;
|
|||||||
|
|
||||||
namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||||
{
|
{
|
||||||
public class MockVC : VideoCodecBase, IRoutingSource, IHasCallHistory
|
public class MockVC : VideoCodecBase, IRoutingSource, IHasCallHistory, IHasScheduleAwareness
|
||||||
{
|
{
|
||||||
public RoutingInputPort CodecOsdIn { get; private set; }
|
public RoutingInputPort CodecOsdIn { get; private set; }
|
||||||
public RoutingInputPort HdmiIn1 { get; private set; }
|
public RoutingInputPort HdmiIn1 { get; private set; }
|
||||||
@@ -322,6 +322,27 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region IHasScheduleAwareness Members
|
||||||
|
|
||||||
|
public CodecScheduleAwareness CodecSchedule
|
||||||
|
{
|
||||||
|
get {
|
||||||
|
var sch = new CodecScheduleAwareness();
|
||||||
|
for(int i = 0; i < 5; i++)
|
||||||
|
{
|
||||||
|
var m = new Meeting();
|
||||||
|
m.StartTime = DateTime.Now.AddHours(1 + i);
|
||||||
|
m.EndTime = DateTime.Now.AddHours(1 + i).AddMinutes(30);
|
||||||
|
m.Title = "Meeting " + i;
|
||||||
|
m.ConferenceNumberToDial = i + "meeting@fake.com";
|
||||||
|
sch.Meetings.Add(m);
|
||||||
|
}
|
||||||
|
return sch;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -170,6 +170,7 @@
|
|||||||
<Compile Include="UIDrivers\EssentialsHuddleVTC\EssentialsHuddlePresentationUiDriver.cs" />
|
<Compile Include="UIDrivers\EssentialsHuddleVTC\EssentialsHuddlePresentationUiDriver.cs" />
|
||||||
<Compile Include="UIDrivers\EssentialsHuddleVTC\EssentialsHuddleTechPageDriver.cs" />
|
<Compile Include="UIDrivers\EssentialsHuddleVTC\EssentialsHuddleTechPageDriver.cs" />
|
||||||
<Compile Include="UI\HttpLogoServer.cs" />
|
<Compile Include="UI\HttpLogoServer.cs" />
|
||||||
|
<Compile Include="UI\SmartObjectHeaderButtonList.cs" />
|
||||||
<Compile Include="UI\SubpageReferenceListCallStagingItem.cs" />
|
<Compile Include="UI\SubpageReferenceListCallStagingItem.cs" />
|
||||||
<Compile Include="UIDrivers\VC\EssentialsVideoCodecUiDriver.cs" />
|
<Compile Include="UIDrivers\VC\EssentialsVideoCodecUiDriver.cs" />
|
||||||
<Compile Include="UIDrivers\JoinedSigInterlock.cs" />
|
<Compile Include="UIDrivers\JoinedSigInterlock.cs" />
|
||||||
|
|||||||
@@ -184,6 +184,12 @@ namespace PepperDash.Essentials
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public string DefaultCodecRouteString { get { return "codecOsd"; } }
|
public string DefaultCodecRouteString { get { return "codecOsd"; } }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Temporary implementation. Returns the schedule-ready object or null if none. Fow now,
|
||||||
|
/// always returns the VideoCodec if it is capable
|
||||||
|
/// </summary>
|
||||||
|
public IHasScheduleAwareness ScheduleSource { get { return VideoCodec as IHasScheduleAwareness; } }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -406,6 +406,10 @@ namespace PepperDash.Essentials
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public const uint StagingPageAdditionalArrowsVisible = 15017;
|
public const uint StagingPageAdditionalArrowsVisible = 15017;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
/// 15018 The Header with dynamic buttons
|
||||||
|
/// </summary>
|
||||||
|
public const uint TopBarHabaneroDynamicVisible = 15018;
|
||||||
|
/// <summary>
|
||||||
/// 15020
|
/// 15020
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const uint PanelSetupVisible = 15020;
|
public const uint PanelSetupVisible = 15020;
|
||||||
@@ -420,31 +424,31 @@ namespace PepperDash.Essentials
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 15023
|
/// 15023
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const uint LightsHeaderButtonVisible = 15023;
|
public const uint HeaderLightsButtonVisible = 15023;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 15024
|
/// 15024
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const uint CallRightHeaderButtonVisible = 15024;
|
public const uint HeaderCallRightButtonVisible = 15024;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 15025
|
/// 15025
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const uint CallLeftHeaderButtonVisible = 15025;
|
public const uint HeaderCallLeftButtonVisible = 15025;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 15026
|
/// 15026
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const uint LightsHeaderButtonPress = 15026;
|
public const uint HeaderLightsButtonPress = 15026;
|
||||||
/// <summary>[-
|
/// <summary>[-
|
||||||
/// 15027
|
/// 15027
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const uint CallHeaderButtonPress = 15027;
|
public const uint HeaderCallButtonPress = 15027;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 15028 The gear button in header
|
/// 15028 The gear button in header
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const uint GearHeaderButtonPress = 15028;
|
public const uint HeaderGearButtonPress = 15028;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 15029 the room button in header
|
/// 15029 the room button in header
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const uint RoomHeaderButtonPress = 15029;
|
public const uint HeaderRoomButtonPress = 15029;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 15030 Visibility for room data popup
|
/// 15030 Visibility for room data popup
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -38,10 +38,6 @@
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public const uint SourceStagingSRL = 3200;
|
public const uint SourceStagingSRL = 3200;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 15022 The main activity footer
|
|
||||||
/// </summary>
|
|
||||||
public const uint ActivityFooterSRL = 15022;
|
|
||||||
/// <summary>
|
|
||||||
/// 3901 The Tech page menu list
|
/// 3901 The Tech page menu list
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const uint TechMenuList = 3901;
|
public const uint TechMenuList = 3901;
|
||||||
@@ -57,6 +53,13 @@
|
|||||||
/// 3904 - Display controls on the tech page
|
/// 3904 - Display controls on the tech page
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const uint TechDisplayControlsList = 3904;
|
public const uint TechDisplayControlsList = 3904;
|
||||||
|
/// <summary>
|
||||||
|
/// 15018
|
||||||
|
/// </summary>
|
||||||
|
public const uint HeaderButtonList = 15018;
|
||||||
|
/// <summary>
|
||||||
|
/// 15022 The main activity footer
|
||||||
|
/// </summary>
|
||||||
|
public const uint ActivityFooterSRL = 15022;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -111,6 +111,10 @@ namespace PepperDash.Essentials
|
|||||||
/// 3915
|
/// 3915
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const uint NotificationRibbonText = 3915;
|
public const uint NotificationRibbonText = 3915;
|
||||||
|
/// <summary>
|
||||||
|
/// 3916 The "active call" label
|
||||||
|
/// </summary>
|
||||||
|
public const uint HeaderCallLabel = 3916;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 3922
|
/// 3922
|
||||||
|
|||||||
@@ -0,0 +1,63 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using Crestron.SimplSharp;
|
||||||
|
using Crestron.SimplSharpPro;
|
||||||
|
using Crestron.SimplSharpPro.DeviceSupport;
|
||||||
|
|
||||||
|
using PepperDash.Essentials.Core;
|
||||||
|
using PepperDash.Essentials.Core.SmartObjects;
|
||||||
|
|
||||||
|
namespace PepperDash.Essentials
|
||||||
|
{
|
||||||
|
public class SmartObjectHeaderButtonList : SmartObjectHelperBase
|
||||||
|
{
|
||||||
|
|
||||||
|
public SmartObjectHeaderButtonList(SmartObject so)
|
||||||
|
: base(so, true)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class HeaderListButton
|
||||||
|
{
|
||||||
|
public BoolInputSig SelectedSig { get; private set; }
|
||||||
|
public BoolInputSig VisibleSig { get; private set; }
|
||||||
|
BoolOutputSig OutputSig;
|
||||||
|
StringInputSig IconSig;
|
||||||
|
|
||||||
|
public HeaderListButton(SmartObjectHeaderButtonList list, uint index)
|
||||||
|
{
|
||||||
|
var so = list.SmartObject;
|
||||||
|
OutputSig = so.BooleanOutput["Item " + index + " Pressed"];
|
||||||
|
SelectedSig = so.BooleanInput["Item " + index + " Selected"];
|
||||||
|
VisibleSig = so.BooleanInput["Item " + index + " Visible"];
|
||||||
|
IconSig = so.StringInput["Set Item " + index + " Icon Serial"];
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetBoolFalseAction(Action a)
|
||||||
|
{
|
||||||
|
OutputSig.SetSigFalseAction(a);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetIcon(string i)
|
||||||
|
{
|
||||||
|
IconSig.StringValue = i;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ClearIcon()
|
||||||
|
{
|
||||||
|
IconSig.StringValue = "Blank";
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string Calendar = "Calendar";
|
||||||
|
public static string Camera = "Camera";
|
||||||
|
public static string Gear = "Gear";
|
||||||
|
public static string Lights = "Lights";
|
||||||
|
public static string Help = "Help";
|
||||||
|
public static string OnHook = "Phone Down";
|
||||||
|
public static string Phone = "Phone";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -218,7 +218,7 @@ namespace PepperDash.Essentials
|
|||||||
// ShowInterlockedModal(UIBoolJoin.RoomHeaderPageVisible));
|
// ShowInterlockedModal(UIBoolJoin.RoomHeaderPageVisible));
|
||||||
|
|
||||||
// Setup button
|
// Setup button
|
||||||
TriList.SetSigHeldAction(UIBoolJoin.GearHeaderButtonPress, 2000,
|
TriList.SetSigHeldAction(UIBoolJoin.HeaderGearButtonPress, 2000,
|
||||||
() => PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.TechPanelSetupVisible));// ShowInterlockedModal(UIBoolJoin.TechPanelSetupVisible));
|
() => PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.TechPanelSetupVisible));// ShowInterlockedModal(UIBoolJoin.TechPanelSetupVisible));
|
||||||
TriList.SetSigFalseAction(UIBoolJoin.TechExitButton, () =>
|
TriList.SetSigFalseAction(UIBoolJoin.TechExitButton, () =>
|
||||||
PopupInterlock.HideAndClear()); // HideCurrentInterlockedModal());
|
PopupInterlock.HideAndClear()); // HideCurrentInterlockedModal());
|
||||||
|
|||||||
@@ -229,10 +229,10 @@ namespace PepperDash.Essentials
|
|||||||
ShowInterlockedModal(UIBoolJoin.HelpPageVisible);
|
ShowInterlockedModal(UIBoolJoin.HelpPageVisible);
|
||||||
});
|
});
|
||||||
|
|
||||||
TriList.SetSigFalseAction(UIBoolJoin.RoomHeaderButtonPress, () =>
|
TriList.SetSigFalseAction(UIBoolJoin.HeaderRoomButtonPress, () =>
|
||||||
ShowInterlockedModal(UIBoolJoin.RoomHeaderPageVisible));
|
ShowInterlockedModal(UIBoolJoin.RoomHeaderPageVisible));
|
||||||
|
|
||||||
TriList.SetSigFalseAction(UIBoolJoin.GearHeaderButtonPress, () =>
|
TriList.SetSigFalseAction(UIBoolJoin.HeaderGearButtonPress, () =>
|
||||||
ShowInterlockedModal(UIBoolJoin.VolumesPageVisible));
|
ShowInterlockedModal(UIBoolJoin.VolumesPageVisible));
|
||||||
|
|
||||||
// power-related functions
|
// power-related functions
|
||||||
|
|||||||
@@ -85,6 +85,11 @@ namespace PepperDash.Essentials
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
SubpageReferenceList ActivityFooterSrl;
|
SubpageReferenceList ActivityFooterSrl;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The list of buttons on the header. Managed with visibility only
|
||||||
|
/// </summary>
|
||||||
|
SmartObjectHeaderButtonList HeaderButtonsList;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The AV page mangagers that have been used, to keep them alive for later
|
/// The AV page mangagers that have been used, to keep them alive for later
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -183,6 +188,9 @@ namespace PepperDash.Essentials
|
|||||||
ShareButtonSig = ActivityFooterSrl.BoolInputSig(1, 1);
|
ShareButtonSig = ActivityFooterSrl.BoolInputSig(1, 1);
|
||||||
EndMeetingButtonSig = ActivityFooterSrl.BoolInputSig(3, 1);
|
EndMeetingButtonSig = ActivityFooterSrl.BoolInputSig(3, 1);
|
||||||
|
|
||||||
|
// buttons are added in SetCurrentRoom
|
||||||
|
HeaderButtonsList = new SmartObjectHeaderButtonList(TriList.SmartObjects[UISmartObjectJoin.HeaderButtonList]);
|
||||||
|
|
||||||
SetupActivityFooterWhenRoomOff();
|
SetupActivityFooterWhenRoomOff();
|
||||||
|
|
||||||
ShowVolumeGauge = true;
|
ShowVolumeGauge = true;
|
||||||
@@ -214,7 +222,7 @@ namespace PepperDash.Essentials
|
|||||||
if (Config.HeaderStyle == UiHeaderStyle.Habanero)
|
if (Config.HeaderStyle == UiHeaderStyle.Habanero)
|
||||||
{
|
{
|
||||||
TriList.SetString(UIStringJoin.CurrentRoomName, CurrentRoom.Name);
|
TriList.SetString(UIStringJoin.CurrentRoomName, CurrentRoom.Name);
|
||||||
TriList.SetSigFalseAction(UIBoolJoin.RoomHeaderButtonPress, () =>
|
TriList.SetSigFalseAction(UIBoolJoin.HeaderRoomButtonPress, () =>
|
||||||
PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.RoomHeaderPageVisible));
|
PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.RoomHeaderPageVisible));
|
||||||
}
|
}
|
||||||
else if (Config.HeaderStyle == UiHeaderStyle.Verbose)
|
else if (Config.HeaderStyle == UiHeaderStyle.Verbose)
|
||||||
@@ -235,7 +243,9 @@ namespace PepperDash.Essentials
|
|||||||
TriList.SetBool(UIBoolJoin.DateAndTimeVisible, Config.ShowDate && Config.ShowTime);
|
TriList.SetBool(UIBoolJoin.DateAndTimeVisible, Config.ShowDate && Config.ShowTime);
|
||||||
TriList.SetBool(UIBoolJoin.DateOnlyVisible, Config.ShowDate && !Config.ShowTime);
|
TriList.SetBool(UIBoolJoin.DateOnlyVisible, Config.ShowDate && !Config.ShowTime);
|
||||||
TriList.SetBool(UIBoolJoin.TimeOnlyVisible, !Config.ShowDate && Config.ShowTime);
|
TriList.SetBool(UIBoolJoin.TimeOnlyVisible, !Config.ShowDate && Config.ShowTime);
|
||||||
TriList.SetBool(UIBoolJoin.TopBarHabaneroVisible, true);
|
|
||||||
|
TriList.SetBool(UIBoolJoin.TopBarHabaneroDynamicVisible, true);
|
||||||
|
|
||||||
TriList.SetBool(UIBoolJoin.ActivityFooterVisible, true);
|
TriList.SetBool(UIBoolJoin.ActivityFooterVisible, true);
|
||||||
|
|
||||||
// Privacy mute button
|
// Privacy mute button
|
||||||
@@ -259,60 +269,47 @@ namespace PepperDash.Essentials
|
|||||||
// Generic "close" button for these modals
|
// Generic "close" button for these modals
|
||||||
TriList.SetSigFalseAction(UIBoolJoin.InterlockedModalClosePress, PopupInterlock.HideAndClear);
|
TriList.SetSigFalseAction(UIBoolJoin.InterlockedModalClosePress, PopupInterlock.HideAndClear);
|
||||||
|
|
||||||
// Help button and popup
|
//// Help button and popup
|
||||||
if (CurrentRoom.Config.Help != null)
|
//if (CurrentRoom.Config.Help != null)
|
||||||
{
|
//{
|
||||||
TriList.SetString(UIStringJoin.HelpMessage, roomConf.Help.Message);
|
// TriList.SetString(UIStringJoin.HelpMessage, roomConf.Help.Message);
|
||||||
TriList.SetBool(UIBoolJoin.HelpPageShowCallButtonVisible, roomConf.Help.ShowCallButton);
|
// TriList.SetBool(UIBoolJoin.HelpPageShowCallButtonVisible, roomConf.Help.ShowCallButton);
|
||||||
TriList.SetString(UIStringJoin.HelpPageCallButtonText, roomConf.Help.CallButtonText);
|
// TriList.SetString(UIStringJoin.HelpPageCallButtonText, roomConf.Help.CallButtonText);
|
||||||
if(roomConf.Help.ShowCallButton)
|
// if(roomConf.Help.ShowCallButton)
|
||||||
TriList.SetSigFalseAction(UIBoolJoin.HelpPageShowCallButtonPress, () => { }); // ************ FILL IN
|
// TriList.SetSigFalseAction(UIBoolJoin.HelpPageShowCallButtonPress, () => { }); // ************ FILL IN
|
||||||
else
|
// else
|
||||||
TriList.ClearBoolSigAction(UIBoolJoin.HelpPageShowCallButtonPress);
|
// TriList.ClearBoolSigAction(UIBoolJoin.HelpPageShowCallButtonPress);
|
||||||
}
|
//}
|
||||||
else // older config
|
//else // older config
|
||||||
{
|
//{
|
||||||
TriList.SetString(UIStringJoin.HelpMessage, CurrentRoom.Config.HelpMessage);
|
// TriList.SetString(UIStringJoin.HelpMessage, CurrentRoom.Config.HelpMessage);
|
||||||
TriList.SetBool(UIBoolJoin.HelpPageShowCallButtonVisible, false);
|
// TriList.SetBool(UIBoolJoin.HelpPageShowCallButtonVisible, false);
|
||||||
TriList.SetString(UIStringJoin.HelpPageCallButtonText, null);
|
// TriList.SetString(UIStringJoin.HelpPageCallButtonText, null);
|
||||||
TriList.ClearBoolSigAction(UIBoolJoin.HelpPageShowCallButtonPress);
|
// TriList.ClearBoolSigAction(UIBoolJoin.HelpPageShowCallButtonPress);
|
||||||
}
|
//}
|
||||||
TriList.SetSigFalseAction(UIBoolJoin.HelpPress, () =>
|
//TriList.SetSigFalseAction(UIBoolJoin.HelpPress, () =>
|
||||||
{
|
//{
|
||||||
string message = null;
|
// string message = null;
|
||||||
var room = DeviceManager.GetDeviceForKey(Config.DefaultRoomKey)
|
// var room = DeviceManager.GetDeviceForKey(Config.DefaultRoomKey)
|
||||||
as EssentialsHuddleSpaceRoom;
|
// as EssentialsHuddleSpaceRoom;
|
||||||
if (room != null)
|
// if (room != null)
|
||||||
message = room.Config.HelpMessage;
|
// message = room.Config.HelpMessage;
|
||||||
else
|
// else
|
||||||
message = "Sorry, no help message available. No room connected.";
|
// message = "Sorry, no help message available. No room connected.";
|
||||||
//TriList.StringInput[UIStringJoin.HelpMessage].StringValue = message;
|
// //TriList.StringInput[UIStringJoin.HelpMessage].StringValue = message;
|
||||||
PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.HelpPageVisible);
|
// PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.HelpPageVisible);
|
||||||
});
|
//});
|
||||||
|
|
||||||
// Lights button
|
//// Lights button
|
||||||
TriList.SetSigFalseAction(UIBoolJoin.LightsHeaderButtonPress, () => // ******************** FILL IN
|
//TriList.SetSigFalseAction(UIBoolJoin.HeaderLightsButtonPress, () => // ******************** FILL IN
|
||||||
{ });
|
// { });
|
||||||
|
|
||||||
// Call header button
|
//// Setup button - shows volumes with default button OR hold for tech page
|
||||||
if(roomConf.OneButtonMeeting != null && roomConf.OneButtonMeeting.Enable)
|
//TriList.SetSigHeldAction(UIBoolJoin.HeaderGearButtonPress, 2000,
|
||||||
{
|
// ShowTech,
|
||||||
TriList.SetBool(UIBoolJoin.CalendarHeaderButtonVisible, true);
|
// () => PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.VolumesPageVisible));
|
||||||
TriList.SetBool(UIBoolJoin.CallLeftHeaderButtonVisible, true);
|
//TriList.SetSigFalseAction(UIBoolJoin.TechExitButton, () =>
|
||||||
}
|
// PopupInterlock.HideAndClear());
|
||||||
else
|
|
||||||
TriList.SetBool(UIBoolJoin.CallRightHeaderButtonVisible, true);
|
|
||||||
|
|
||||||
TriList.SetSigFalseAction(UIBoolJoin.CallHeaderButtonPress, () =>
|
|
||||||
PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.HeaderActiveCallsListVisible));
|
|
||||||
|
|
||||||
|
|
||||||
// Setup button - shows volumes with default button OR hold for tech page
|
|
||||||
TriList.SetSigHeldAction(UIBoolJoin.GearHeaderButtonPress, 2000,
|
|
||||||
ShowTech,
|
|
||||||
() => PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.VolumesPageVisible));
|
|
||||||
TriList.SetSigFalseAction(UIBoolJoin.TechExitButton, () =>
|
|
||||||
PopupInterlock.HideAndClear());
|
|
||||||
|
|
||||||
// Volume related things
|
// Volume related things
|
||||||
TriList.SetSigFalseAction(UIBoolJoin.VolumeDefaultPress, () => CurrentRoom.SetDefaultLevels());
|
TriList.SetSigFalseAction(UIBoolJoin.VolumeDefaultPress, () => CurrentRoom.SetDefaultLevels());
|
||||||
@@ -370,7 +367,7 @@ namespace PepperDash.Essentials
|
|||||||
public override void Hide()
|
public override void Hide()
|
||||||
{
|
{
|
||||||
HideAndClearCurrentDisplayModeSigsInUse();
|
HideAndClearCurrentDisplayModeSigsInUse();
|
||||||
TriList.BooleanInput[UIBoolJoin.TopBarHabaneroVisible].BoolValue = 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[UIBoolJoin.StartPageVisible].BoolValue = false;
|
||||||
TriList.BooleanInput[UIBoolJoin.TapToBeginVisible].BoolValue = false;
|
TriList.BooleanInput[UIBoolJoin.TapToBeginVisible].BoolValue = false;
|
||||||
@@ -785,6 +782,8 @@ namespace PepperDash.Essentials
|
|||||||
RefreshAudioDeviceConnections();
|
RefreshAudioDeviceConnections();
|
||||||
_CurrentRoom.CurrentSingleSourceChange += CurrentRoom_SourceInfoChange;
|
_CurrentRoom.CurrentSingleSourceChange += CurrentRoom_SourceInfoChange;
|
||||||
RefreshSourceInfo();
|
RefreshSourceInfo();
|
||||||
|
|
||||||
|
SetupHeaderButtons();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -793,6 +792,93 @@ namespace PepperDash.Essentials
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
void SetupHeaderButtons()
|
||||||
|
{
|
||||||
|
TriList.SetBool(UIBoolJoin.TopBarHabaneroDynamicVisible, true);
|
||||||
|
|
||||||
|
var roomConf = CurrentRoom.Config;
|
||||||
|
//
|
||||||
|
var setupButton = new HeaderListButton(HeaderButtonsList, 5);
|
||||||
|
setupButton.SetIcon(HeaderListButton.Gear);
|
||||||
|
setupButton.SetBoolFalseAction(() => PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.VolumesPageVisible));
|
||||||
|
#warning Add held action - and add press/hold to SIG helper
|
||||||
|
//// Setup button - shows volumes with default button OR hold for tech page
|
||||||
|
//TriList.SetSigHeldAction(UIBoolJoin.HeaderGearButtonPress, 2000,
|
||||||
|
// ShowTech,
|
||||||
|
// () => PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.VolumesPageVisible));
|
||||||
|
|
||||||
|
TriList.SetSigFalseAction(UIBoolJoin.TechExitButton, () =>
|
||||||
|
PopupInterlock.HideAndClear());
|
||||||
|
|
||||||
|
// Help button and popup
|
||||||
|
if (CurrentRoom.Config.Help != null)
|
||||||
|
{
|
||||||
|
TriList.SetString(UIStringJoin.HelpMessage, roomConf.Help.Message);
|
||||||
|
TriList.SetBool(UIBoolJoin.HelpPageShowCallButtonVisible, roomConf.Help.ShowCallButton);
|
||||||
|
TriList.SetString(UIStringJoin.HelpPageCallButtonText, roomConf.Help.CallButtonText);
|
||||||
|
if (roomConf.Help.ShowCallButton)
|
||||||
|
TriList.SetSigFalseAction(UIBoolJoin.HelpPageShowCallButtonPress, () => { }); // ************ FILL IN
|
||||||
|
else
|
||||||
|
TriList.ClearBoolSigAction(UIBoolJoin.HelpPageShowCallButtonPress);
|
||||||
|
}
|
||||||
|
else // older config
|
||||||
|
{
|
||||||
|
TriList.SetString(UIStringJoin.HelpMessage, CurrentRoom.Config.HelpMessage);
|
||||||
|
TriList.SetBool(UIBoolJoin.HelpPageShowCallButtonVisible, false);
|
||||||
|
TriList.SetString(UIStringJoin.HelpPageCallButtonText, null);
|
||||||
|
TriList.ClearBoolSigAction(UIBoolJoin.HelpPageShowCallButtonPress);
|
||||||
|
}
|
||||||
|
var helpButton = new HeaderListButton(HeaderButtonsList, 4);
|
||||||
|
helpButton.SetIcon(HeaderListButton.Help);
|
||||||
|
helpButton.SetBoolFalseAction(() =>
|
||||||
|
{
|
||||||
|
string message = null;
|
||||||
|
var room = DeviceManager.GetDeviceForKey(Config.DefaultRoomKey)
|
||||||
|
as EssentialsHuddleSpaceRoom;
|
||||||
|
if (room != null)
|
||||||
|
message = room.Config.HelpMessage;
|
||||||
|
else
|
||||||
|
message = "Sorry, no help message available. No room connected.";
|
||||||
|
//TriList.StringInput[UIStringJoin.HelpMessage].StringValue = message;
|
||||||
|
PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.HelpPageVisible);
|
||||||
|
});
|
||||||
|
uint nextIndex = 3;
|
||||||
|
|
||||||
|
// Lights button
|
||||||
|
//if (WHATEVER MAKES LIGHTS WORK)
|
||||||
|
//{
|
||||||
|
// // do lights
|
||||||
|
// nextIndex--;
|
||||||
|
//}
|
||||||
|
|
||||||
|
// Calendar button
|
||||||
|
if (_CurrentRoom.ScheduleSource != null) // ******************* Do we need a config option here as well?
|
||||||
|
{
|
||||||
|
var calBut = new HeaderListButton(HeaderButtonsList, nextIndex);
|
||||||
|
calBut.SetIcon(HeaderListButton.Calendar);
|
||||||
|
calBut.SetBoolFalseAction(() => { });
|
||||||
|
nextIndex--;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Call button
|
||||||
|
var callBut = new HeaderListButton(HeaderButtonsList, nextIndex);
|
||||||
|
callBut.SetIcon(HeaderListButton.OnHook);
|
||||||
|
callBut.SetBoolFalseAction(() =>
|
||||||
|
PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.HeaderActiveCallsListVisible));
|
||||||
|
nextIndex--;
|
||||||
|
|
||||||
|
// blank any that remain
|
||||||
|
for (var i = nextIndex; i > 0; i--)
|
||||||
|
{
|
||||||
|
var blankBut = new HeaderListButton(HeaderButtonsList, i);
|
||||||
|
blankBut.ClearIcon();
|
||||||
|
blankBut.SetBoolFalseAction(() => { });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// For room on/off changes
|
/// For room on/off changes
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user