mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-07 16:55:04 +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
|
||||
{
|
||||
public class MockVC : VideoCodecBase, IRoutingSource, IHasCallHistory
|
||||
public class MockVC : VideoCodecBase, IRoutingSource, IHasCallHistory, IHasScheduleAwareness
|
||||
{
|
||||
public RoutingInputPort CodecOsdIn { get; private set; }
|
||||
public RoutingInputPort HdmiIn1 { get; private set; }
|
||||
@@ -323,7 +323,28 @@ 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
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Implementation for the mock VC
|
||||
|
||||
@@ -170,6 +170,7 @@
|
||||
<Compile Include="UIDrivers\EssentialsHuddleVTC\EssentialsHuddlePresentationUiDriver.cs" />
|
||||
<Compile Include="UIDrivers\EssentialsHuddleVTC\EssentialsHuddleTechPageDriver.cs" />
|
||||
<Compile Include="UI\HttpLogoServer.cs" />
|
||||
<Compile Include="UI\SmartObjectHeaderButtonList.cs" />
|
||||
<Compile Include="UI\SubpageReferenceListCallStagingItem.cs" />
|
||||
<Compile Include="UIDrivers\VC\EssentialsVideoCodecUiDriver.cs" />
|
||||
<Compile Include="UIDrivers\JoinedSigInterlock.cs" />
|
||||
|
||||
@@ -182,7 +182,13 @@ namespace PepperDash.Essentials
|
||||
/// <summary>
|
||||
/// "codecOsd"
|
||||
/// </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>
|
||||
///
|
||||
|
||||
@@ -405,6 +405,10 @@ namespace PepperDash.Essentials
|
||||
/// 15017
|
||||
/// </summary>
|
||||
public const uint StagingPageAdditionalArrowsVisible = 15017;
|
||||
/// <summary>
|
||||
/// 15018 The Header with dynamic buttons
|
||||
/// </summary>
|
||||
public const uint TopBarHabaneroDynamicVisible = 15018;
|
||||
/// <summary>
|
||||
/// 15020
|
||||
/// </summary>
|
||||
@@ -420,31 +424,31 @@ namespace PepperDash.Essentials
|
||||
/// <summary>
|
||||
/// 15023
|
||||
/// </summary>
|
||||
public const uint LightsHeaderButtonVisible = 15023;
|
||||
public const uint HeaderLightsButtonVisible = 15023;
|
||||
/// <summary>
|
||||
/// 15024
|
||||
/// </summary>
|
||||
public const uint CallRightHeaderButtonVisible = 15024;
|
||||
public const uint HeaderCallRightButtonVisible = 15024;
|
||||
/// <summary>
|
||||
/// 15025
|
||||
/// </summary>
|
||||
public const uint CallLeftHeaderButtonVisible = 15025;
|
||||
public const uint HeaderCallLeftButtonVisible = 15025;
|
||||
/// <summary>
|
||||
/// 15026
|
||||
/// </summary>
|
||||
public const uint LightsHeaderButtonPress = 15026;
|
||||
public const uint HeaderLightsButtonPress = 15026;
|
||||
/// <summary>[-
|
||||
/// 15027
|
||||
/// </summary>
|
||||
public const uint CallHeaderButtonPress = 15027;
|
||||
public const uint HeaderCallButtonPress = 15027;
|
||||
/// <summary>
|
||||
/// 15028 The gear button in header
|
||||
/// </summary>
|
||||
public const uint GearHeaderButtonPress = 15028;
|
||||
public const uint HeaderGearButtonPress = 15028;
|
||||
/// <summary>
|
||||
/// 15029 the room button in header
|
||||
/// </summary>
|
||||
public const uint RoomHeaderButtonPress = 15029;
|
||||
public const uint HeaderRoomButtonPress = 15029;
|
||||
/// <summary>
|
||||
/// 15030 Visibility for room data popup
|
||||
/// </summary>
|
||||
|
||||
@@ -38,10 +38,6 @@
|
||||
/// </summary>
|
||||
public const uint SourceStagingSRL = 3200;
|
||||
/// <summary>
|
||||
/// 15022 The main activity footer
|
||||
/// </summary>
|
||||
public const uint ActivityFooterSRL = 15022;
|
||||
/// <summary>
|
||||
/// 3901 The Tech page menu list
|
||||
/// </summary>
|
||||
public const uint TechMenuList = 3901;
|
||||
@@ -57,6 +53,13 @@
|
||||
/// 3904 - Display controls on the tech page
|
||||
/// </summary>
|
||||
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
|
||||
/// </summary>
|
||||
public const uint NotificationRibbonText = 3915;
|
||||
/// <summary>
|
||||
/// 3916 The "active call" label
|
||||
/// </summary>
|
||||
public const uint HeaderCallLabel = 3916;
|
||||
|
||||
/// <summary>
|
||||
/// 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));
|
||||
|
||||
// Setup button
|
||||
TriList.SetSigHeldAction(UIBoolJoin.GearHeaderButtonPress, 2000,
|
||||
TriList.SetSigHeldAction(UIBoolJoin.HeaderGearButtonPress, 2000,
|
||||
() => PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.TechPanelSetupVisible));// ShowInterlockedModal(UIBoolJoin.TechPanelSetupVisible));
|
||||
TriList.SetSigFalseAction(UIBoolJoin.TechExitButton, () =>
|
||||
PopupInterlock.HideAndClear()); // HideCurrentInterlockedModal());
|
||||
|
||||
@@ -229,10 +229,10 @@ namespace PepperDash.Essentials
|
||||
ShowInterlockedModal(UIBoolJoin.HelpPageVisible);
|
||||
});
|
||||
|
||||
TriList.SetSigFalseAction(UIBoolJoin.RoomHeaderButtonPress, () =>
|
||||
TriList.SetSigFalseAction(UIBoolJoin.HeaderRoomButtonPress, () =>
|
||||
ShowInterlockedModal(UIBoolJoin.RoomHeaderPageVisible));
|
||||
|
||||
TriList.SetSigFalseAction(UIBoolJoin.GearHeaderButtonPress, () =>
|
||||
TriList.SetSigFalseAction(UIBoolJoin.HeaderGearButtonPress, () =>
|
||||
ShowInterlockedModal(UIBoolJoin.VolumesPageVisible));
|
||||
|
||||
// power-related functions
|
||||
|
||||
@@ -85,6 +85,11 @@ namespace PepperDash.Essentials
|
||||
/// </summary>
|
||||
SubpageReferenceList ActivityFooterSrl;
|
||||
|
||||
/// <summary>
|
||||
/// The list of buttons on the header. Managed with visibility only
|
||||
/// </summary>
|
||||
SmartObjectHeaderButtonList HeaderButtonsList;
|
||||
|
||||
/// <summary>
|
||||
/// The AV page mangagers that have been used, to keep them alive for later
|
||||
/// </summary>
|
||||
@@ -183,6 +188,9 @@ namespace PepperDash.Essentials
|
||||
ShareButtonSig = ActivityFooterSrl.BoolInputSig(1, 1);
|
||||
EndMeetingButtonSig = ActivityFooterSrl.BoolInputSig(3, 1);
|
||||
|
||||
// buttons are added in SetCurrentRoom
|
||||
HeaderButtonsList = new SmartObjectHeaderButtonList(TriList.SmartObjects[UISmartObjectJoin.HeaderButtonList]);
|
||||
|
||||
SetupActivityFooterWhenRoomOff();
|
||||
|
||||
ShowVolumeGauge = true;
|
||||
@@ -214,7 +222,7 @@ namespace PepperDash.Essentials
|
||||
if (Config.HeaderStyle == UiHeaderStyle.Habanero)
|
||||
{
|
||||
TriList.SetString(UIStringJoin.CurrentRoomName, CurrentRoom.Name);
|
||||
TriList.SetSigFalseAction(UIBoolJoin.RoomHeaderButtonPress, () =>
|
||||
TriList.SetSigFalseAction(UIBoolJoin.HeaderRoomButtonPress, () =>
|
||||
PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.RoomHeaderPageVisible));
|
||||
}
|
||||
else if (Config.HeaderStyle == UiHeaderStyle.Verbose)
|
||||
@@ -235,7 +243,9 @@ namespace PepperDash.Essentials
|
||||
TriList.SetBool(UIBoolJoin.DateAndTimeVisible, Config.ShowDate && Config.ShowTime);
|
||||
TriList.SetBool(UIBoolJoin.DateOnlyVisible, 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);
|
||||
|
||||
// Privacy mute button
|
||||
@@ -259,60 +269,47 @@ namespace PepperDash.Essentials
|
||||
// Generic "close" button for these modals
|
||||
TriList.SetSigFalseAction(UIBoolJoin.InterlockedModalClosePress, 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);
|
||||
}
|
||||
TriList.SetSigFalseAction(UIBoolJoin.HelpPress, () =>
|
||||
{
|
||||
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);
|
||||
});
|
||||
//// 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);
|
||||
//}
|
||||
//TriList.SetSigFalseAction(UIBoolJoin.HelpPress, () =>
|
||||
//{
|
||||
// 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);
|
||||
//});
|
||||
|
||||
// Lights button
|
||||
TriList.SetSigFalseAction(UIBoolJoin.LightsHeaderButtonPress, () => // ******************** FILL IN
|
||||
{ });
|
||||
//// Lights button
|
||||
//TriList.SetSigFalseAction(UIBoolJoin.HeaderLightsButtonPress, () => // ******************** FILL IN
|
||||
// { });
|
||||
|
||||
// Call header button
|
||||
if(roomConf.OneButtonMeeting != null && roomConf.OneButtonMeeting.Enable)
|
||||
{
|
||||
TriList.SetBool(UIBoolJoin.CalendarHeaderButtonVisible, true);
|
||||
TriList.SetBool(UIBoolJoin.CallLeftHeaderButtonVisible, true);
|
||||
}
|
||||
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());
|
||||
//// 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());
|
||||
|
||||
// Volume related things
|
||||
TriList.SetSigFalseAction(UIBoolJoin.VolumeDefaultPress, () => CurrentRoom.SetDefaultLevels());
|
||||
@@ -370,7 +367,7 @@ namespace PepperDash.Essentials
|
||||
public override void Hide()
|
||||
{
|
||||
HideAndClearCurrentDisplayModeSigsInUse();
|
||||
TriList.BooleanInput[UIBoolJoin.TopBarHabaneroVisible].BoolValue = false;
|
||||
TriList.SetBool(UIBoolJoin.TopBarHabaneroDynamicVisible, false);
|
||||
TriList.BooleanInput[UIBoolJoin.ActivityFooterVisible].BoolValue = false;
|
||||
TriList.BooleanInput[UIBoolJoin.StartPageVisible].BoolValue = false;
|
||||
TriList.BooleanInput[UIBoolJoin.TapToBeginVisible].BoolValue = false;
|
||||
@@ -775,7 +772,7 @@ namespace PepperDash.Essentials
|
||||
_CurrentRoom.ShutdownPromptTimer.HasFinished += ShutdownPromptTimer_HasFinished;
|
||||
_CurrentRoom.ShutdownPromptTimer.WasCancelled += ShutdownPromptTimer_WasCancelled;
|
||||
|
||||
// Link up all the change events from the room
|
||||
// Link up all the change events from the room
|
||||
_CurrentRoom.OnFeedback.OutputChange += CurrentRoom_OnFeedback_OutputChange;
|
||||
CurrentRoom_SyncOnFeedback();
|
||||
_CurrentRoom.IsWarmingUpFeedback.OutputChange += CurrentRoom_IsWarmingFeedback_OutputChange;
|
||||
@@ -785,6 +782,8 @@ namespace PepperDash.Essentials
|
||||
RefreshAudioDeviceConnections();
|
||||
_CurrentRoom.CurrentSingleSourceChange += CurrentRoom_SourceInfoChange;
|
||||
RefreshSourceInfo();
|
||||
|
||||
SetupHeaderButtons();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -793,10 +792,97 @@ namespace PepperDash.Essentials
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// For room on/off changes
|
||||
/// </summary>
|
||||
void CurrentRoom_OnFeedback_OutputChange(object sender, EventArgs e)
|
||||
/// <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>
|
||||
/// For room on/off changes
|
||||
/// </summary>
|
||||
void CurrentRoom_OnFeedback_OutputChange(object sender, EventArgs e)
|
||||
{
|
||||
CurrentRoom_SyncOnFeedback();
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user