mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-04 07:14:58 +00:00
Fixing header list icons
This commit is contained in:
@@ -366,7 +366,26 @@ namespace PepperDash.Essentials
|
||||
/// </summary>
|
||||
public const uint VolumeDefaultPress = 3891;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 3991
|
||||
/// </summary>
|
||||
public const uint HeaderIcon1Press = 3991;
|
||||
/// <summary>
|
||||
/// 3992
|
||||
/// </summary>
|
||||
public const uint HeaderIcon2Press = 3992;
|
||||
/// <summary>
|
||||
/// 3993
|
||||
/// </summary>
|
||||
public const uint HeaderIcon3Press = 3993;
|
||||
/// <summary>
|
||||
/// 3994
|
||||
/// </summary>
|
||||
public const uint HeaderIcon4Press = 3994;
|
||||
/// <summary>
|
||||
/// 3995
|
||||
/// </summary>
|
||||
public const uint HeaderIcon5Press = 3995;
|
||||
/// <summary>
|
||||
/// 3999
|
||||
/// </summary>
|
||||
@@ -451,10 +470,6 @@ namespace PepperDash.Essentials
|
||||
/// </summary>
|
||||
public const uint ActivityFooterVisible = 15022;
|
||||
/// <summary>
|
||||
/// 15023
|
||||
/// </summary>
|
||||
public const uint HeaderLightsButtonVisible = 15023;
|
||||
/// <summary>
|
||||
/// 15024
|
||||
/// </summary>
|
||||
public const uint HeaderCallStatusLeftPositionVisible = 15024;
|
||||
@@ -463,17 +478,9 @@ namespace PepperDash.Essentials
|
||||
/// </summary>
|
||||
public const uint HeaderCallStatusRightPositionVisible = 15025;
|
||||
/// <summary>
|
||||
/// 15026
|
||||
/// </summary>
|
||||
public const uint HeaderLightsButtonPress = 15026;
|
||||
/// <summary>[-
|
||||
/// 15027
|
||||
/// </summary>
|
||||
public const uint HeaderCallStatusButtonPress = 15027;
|
||||
/// <summary>
|
||||
/// 15028 The gear button in header
|
||||
/// </summary>
|
||||
public const uint HeaderGearButtonPress = 15028;
|
||||
public const uint FIXFIX_HeaderGearButtonPress_FIXFIX = 15028;
|
||||
/// <summary>
|
||||
/// 15029 the room button in header
|
||||
/// </summary>
|
||||
|
||||
@@ -228,6 +228,27 @@ namespace PepperDash.Essentials
|
||||
/// </summary>
|
||||
public const uint NextMeetingFollowingMeetingText = 3972;
|
||||
|
||||
/// <summary>
|
||||
/// 3991
|
||||
/// </summary>
|
||||
public const uint HeaderButtonIcon1 = 3991;
|
||||
/// <summary>
|
||||
/// 3992
|
||||
/// </summary>
|
||||
public const uint HeaderButtonIcon2 = 3992;
|
||||
/// <summary>
|
||||
/// 3993
|
||||
/// </summary>
|
||||
public const uint HeaderButtonIcon3 = 3993;
|
||||
/// <summary>
|
||||
/// 3994
|
||||
/// </summary>
|
||||
public const uint HeaderButtonIcon4 = 3994;
|
||||
/// <summary>
|
||||
/// 3995
|
||||
/// </summary>
|
||||
public const uint HeaderButtonIcon5 = 3995;
|
||||
|
||||
/// <summary>
|
||||
/// 3996
|
||||
/// </summary>
|
||||
|
||||
@@ -1,58 +1,58 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
using Crestron.SimplSharpPro;
|
||||
using Crestron.SimplSharpPro.DeviceSupport;
|
||||
//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;
|
||||
//using PepperDash.Essentials.Core;
|
||||
//using PepperDash.Essentials.Core.SmartObjects;
|
||||
|
||||
namespace PepperDash.Essentials
|
||||
{
|
||||
public class SmartObjectHeaderButtonList : SmartObjectHelperBase
|
||||
{
|
||||
//namespace PepperDash.Essentials
|
||||
//{
|
||||
// public class SmartObjectHeaderButtonList : SmartObjectHelperBase
|
||||
// {
|
||||
|
||||
public SmartObjectHeaderButtonList(SmartObject so)
|
||||
: base(so, true)
|
||||
{
|
||||
// public SmartObjectHeaderButtonList(SmartObject so)
|
||||
// : base(so, true)
|
||||
// {
|
||||
|
||||
}
|
||||
}
|
||||
// }
|
||||
// }
|
||||
|
||||
public class HeaderListButton
|
||||
{
|
||||
public BoolInputSig SelectedSig { get; private set; }
|
||||
public BoolInputSig VisibleSig { get; private set; }
|
||||
public BoolOutputSig OutputSig { get; private set; }
|
||||
StringInputSig IconSig;
|
||||
// public class HeaderListButton
|
||||
// {
|
||||
// public BoolInputSig SelectedSig { get; private set; }
|
||||
// public BoolInputSig VisibleSig { get; private set; }
|
||||
// public BoolOutputSig OutputSig { get; private set; }
|
||||
// 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 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 SetIcon(string i)
|
||||
{
|
||||
IconSig.StringValue = i;
|
||||
}
|
||||
// public void SetIcon(string i)
|
||||
// {
|
||||
// IconSig.StringValue = i;
|
||||
// }
|
||||
|
||||
public void ClearIcon()
|
||||
{
|
||||
IconSig.StringValue = "Blank";
|
||||
}
|
||||
// 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 = "DND";
|
||||
public static string Phone = "Phone";
|
||||
}
|
||||
}
|
||||
// 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 = "DND";
|
||||
// public static string Phone = "Phone";
|
||||
// }
|
||||
//}
|
||||
@@ -218,7 +218,7 @@ namespace PepperDash.Essentials
|
||||
// ShowInterlockedModal(UIBoolJoin.RoomHeaderPageVisible));
|
||||
|
||||
// Setup button
|
||||
TriList.SetSigHeldAction(UIBoolJoin.HeaderGearButtonPress, 2000,
|
||||
TriList.SetSigHeldAction(UIBoolJoin.FIXFIX_HeaderGearButtonPress_FIXFIX, 2000,
|
||||
() => PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.TechPanelSetupVisible));// ShowInterlockedModal(UIBoolJoin.TechPanelSetupVisible));
|
||||
TriList.SetSigFalseAction(UIBoolJoin.TechExitButton, () =>
|
||||
PopupInterlock.HideAndClear()); // HideCurrentInterlockedModal());
|
||||
|
||||
@@ -232,7 +232,7 @@ namespace PepperDash.Essentials
|
||||
TriList.SetSigFalseAction(UIBoolJoin.HeaderRoomButtonPress, () =>
|
||||
ShowInterlockedModal(UIBoolJoin.RoomHeaderPageVisible));
|
||||
|
||||
TriList.SetSigFalseAction(UIBoolJoin.HeaderGearButtonPress, () =>
|
||||
TriList.SetSigFalseAction(UIBoolJoin.FIXFIX_HeaderGearButtonPress_FIXFIX, () =>
|
||||
ShowInterlockedModal(UIBoolJoin.VolumesPageVisible));
|
||||
|
||||
// power-related functions
|
||||
|
||||
@@ -63,8 +63,10 @@ namespace PepperDash.Essentials
|
||||
BoolInputSig ShareButtonSig;
|
||||
BoolInputSig EndMeetingButtonSig;
|
||||
|
||||
HeaderListButton HeaderCallButton;
|
||||
HeaderListButton HeaderGearButton;
|
||||
//HeaderListButton HeaderCallButton;
|
||||
//HeaderListButton HeaderGearButton;
|
||||
|
||||
StringInputSig HeaderCallButtonIconSig;
|
||||
|
||||
|
||||
/// <summary>
|
||||
@@ -99,7 +101,7 @@ namespace PepperDash.Essentials
|
||||
/// <summary>
|
||||
/// The list of buttons on the header. Managed with visibility only
|
||||
/// </summary>
|
||||
SmartObjectHeaderButtonList HeaderButtonsList;
|
||||
//SmartObjectHeaderButtonList HeaderButtonsList;
|
||||
|
||||
/// <summary>
|
||||
/// The AV page mangagers that have been used, to keep them alive for later
|
||||
@@ -178,6 +180,12 @@ namespace PepperDash.Essentials
|
||||
|
||||
CTimer NextMeetingTimer;
|
||||
|
||||
/// <summary>
|
||||
/// Tracks whether the user dismissed the meeting popup, while the system was on. Always false when
|
||||
/// system is off.
|
||||
/// </summary>
|
||||
DateTime NextMeetingWarningDismissedTime;
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
@@ -204,7 +212,7 @@ namespace PepperDash.Essentials
|
||||
|
||||
|
||||
// buttons are added in SetCurrentRoom
|
||||
HeaderButtonsList = new SmartObjectHeaderButtonList(TriList.SmartObjects[UISmartObjectJoin.HeaderButtonList]);
|
||||
//HeaderButtonsList = new SmartObjectHeaderButtonList(TriList.SmartObjects[UISmartObjectJoin.HeaderButtonList]);
|
||||
|
||||
SetupActivityFooterWhenRoomOff();
|
||||
|
||||
@@ -306,7 +314,7 @@ namespace PepperDash.Essentials
|
||||
(CurrentRoom.DefaultDisplay as IPower).PowerToggle();
|
||||
});
|
||||
|
||||
TriList.SetSigFalseAction(UIBoolJoin.HeaderCallStatusButtonPress, ShowActiveCallsList );
|
||||
//TriList.SetSigFalseAction(UIBoolJoin.HeaderCallStatusButtonPress, ShowActiveCallsList );
|
||||
|
||||
SetupNextMeetingTimer();
|
||||
|
||||
@@ -417,8 +425,14 @@ namespace PepperDash.Essentials
|
||||
var meetings = ss.CodecSchedule.Meetings;
|
||||
if (meetings.Count > 0)
|
||||
{
|
||||
var meeting = meetings.Aggregate((m1, m2) => m1.StartTime < m2.StartTime ? m1 : m2);
|
||||
if (meeting != null && meeting.Joinable)
|
||||
var meeting = meetings.FirstOrDefault(m => m.Joinable);
|
||||
|
||||
//var meeting = meetings.Aggregate((m1, m2) => m1.StartTime < m2.StartTime ? m1 : m2);
|
||||
|
||||
|
||||
#warning PICK UP CALENDAR TIME HERE
|
||||
if (meeting != null)// && NextMeetingWarningDismissedTime != null
|
||||
//&& (DateTime.Now - NextMeetingWarningDismissedTime).Minutes > 5) // && meeting.Joinable)
|
||||
{
|
||||
TriList.SetString(UIStringJoin.NextMeetingRibbonStartText, meeting.StartTime.ToShortTimeString());
|
||||
TriList.SetString(UIStringJoin.NextMeetingRibbonEndText, meeting.EndTime.ToShortTimeString());
|
||||
@@ -443,7 +457,6 @@ namespace PepperDash.Essentials
|
||||
}
|
||||
|
||||
ShowNextMeetingPopup();
|
||||
|
||||
}
|
||||
}
|
||||
}, null, 0, 60000);
|
||||
@@ -919,10 +932,10 @@ namespace PepperDash.Essentials
|
||||
TriList.SetBool(UIBoolJoin.TopBarHabaneroDynamicVisible, true);
|
||||
|
||||
var roomConf = CurrentRoom.Config;
|
||||
//
|
||||
HeaderGearButton = new HeaderListButton(HeaderButtonsList, 5);
|
||||
HeaderGearButton.SetIcon(HeaderListButton.Gear);
|
||||
HeaderGearButton.OutputSig.SetSigHeldAction(2000,
|
||||
|
||||
// Gear
|
||||
TriList.SetString(UIStringJoin.HeaderButtonIcon5, "Gear");
|
||||
TriList.SetSigHeldAction(UIBoolJoin.HeaderIcon5Press, 2000,
|
||||
ShowTech,
|
||||
null,
|
||||
() =>
|
||||
@@ -932,10 +945,23 @@ namespace PepperDash.Essentials
|
||||
else
|
||||
PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.VolumesPagePowerOffVisible);
|
||||
});
|
||||
|
||||
TriList.SetSigFalseAction(UIBoolJoin.TechExitButton, () =>
|
||||
PopupInterlock.HideAndClear());
|
||||
|
||||
//HeaderGearButton = new HeaderListButton(HeaderButtonsList, 5);
|
||||
//HeaderGearButton.SetIcon(HeaderListButton.Gear);
|
||||
//HeaderGearButton.OutputSig.SetSigHeldAction(2000,
|
||||
// ShowTech,
|
||||
// null,
|
||||
// () =>
|
||||
// {
|
||||
// if (CurrentRoom.OnFeedback.BoolValue)
|
||||
// PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.VolumesPageVisible);
|
||||
// else
|
||||
// PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.VolumesPagePowerOffVisible);
|
||||
// });
|
||||
|
||||
|
||||
// Help button and popup
|
||||
if (CurrentRoom.Config.Help != null)
|
||||
{
|
||||
@@ -954,9 +980,8 @@ namespace PepperDash.Essentials
|
||||
TriList.SetString(UIStringJoin.HelpPageCallButtonText, null);
|
||||
TriList.ClearBoolSigAction(UIBoolJoin.HelpPageShowCallButtonPress);
|
||||
}
|
||||
var helpButton = new HeaderListButton(HeaderButtonsList, 4);
|
||||
helpButton.SetIcon(HeaderListButton.Help);
|
||||
helpButton.OutputSig.SetSigFalseAction(() =>
|
||||
TriList.SetString(UIStringJoin.HeaderButtonIcon4, "Help");
|
||||
TriList.SetSigFalseAction(UIBoolJoin.HeaderIcon4Press, () =>
|
||||
{
|
||||
string message = null;
|
||||
var room = DeviceManager.GetDeviceForKey(Config.DefaultRoomKey)
|
||||
@@ -968,7 +993,21 @@ namespace PepperDash.Essentials
|
||||
//TriList.StringInput[UIStringJoin.HelpMessage].StringValue = message;
|
||||
PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.HelpPageVisible);
|
||||
});
|
||||
uint nextIndex = 3;
|
||||
//var helpButton = new HeaderListButton(HeaderButtonsList, 4);
|
||||
//helpButton.SetIcon(HeaderListButton.Help);
|
||||
//helpButton.OutputSig.SetSigFalseAction(() =>
|
||||
//{
|
||||
// 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 nextJoin = 3993;
|
||||
|
||||
// Lights button
|
||||
//if (WHATEVER MAKES LIGHTS WORK)
|
||||
@@ -980,36 +1019,47 @@ namespace PepperDash.Essentials
|
||||
// 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.OutputSig.SetSigFalseAction(CalendarPress);
|
||||
nextIndex--;
|
||||
//var calBut = new HeaderListButton(HeaderButtonsList, nextIndex);
|
||||
//calBut.SetIcon(HeaderListButton.Calendar);
|
||||
//calBut.OutputSig.SetSigFalseAction(CalendarPress);
|
||||
|
||||
TriList.SetString(nextJoin, "Calendar");
|
||||
TriList.SetSigFalseAction(nextJoin, CalendarPress);
|
||||
|
||||
nextJoin--;
|
||||
}
|
||||
|
||||
// Call button
|
||||
HeaderCallButton = new HeaderListButton(HeaderButtonsList, nextIndex);
|
||||
HeaderCallButton.SetIcon(HeaderListButton.OnHook);
|
||||
HeaderCallButton.OutputSig.SetSigFalseAction(ShowActiveCallsList);
|
||||
|
||||
nextIndex--;
|
||||
//HeaderCallButton = new HeaderListButton(HeaderButtonsList, nextJoin);
|
||||
//HeaderCallButton.SetIcon(HeaderListButton.OnHook);
|
||||
//HeaderCallButton.OutputSig.SetSigFalseAction(ShowActiveCallsList);
|
||||
|
||||
TriList.SetString(nextJoin, "DND");
|
||||
TriList.SetSigFalseAction(nextJoin, ShowActiveCallsList);
|
||||
HeaderCallButtonIconSig = TriList.StringInput[nextJoin];
|
||||
|
||||
nextJoin--;
|
||||
|
||||
// blank any that remain
|
||||
for (var i = nextIndex; i > 0; i--)
|
||||
for (var i = nextJoin; i > 3990; i--)
|
||||
{
|
||||
var blankBut = new HeaderListButton(HeaderButtonsList, i);
|
||||
blankBut.ClearIcon();
|
||||
blankBut.OutputSig.SetSigFalseAction(() => { });
|
||||
//var blankBut = new HeaderListButton(HeaderButtonsList, i);
|
||||
//blankBut.ClearIcon();
|
||||
//blankBut.OutputSig.SetSigFalseAction(() => { });
|
||||
|
||||
TriList.SetString(i, "Blank");
|
||||
TriList.SetSigFalseAction(i, () => { });
|
||||
}
|
||||
|
||||
// Set Call Status Subpage Position
|
||||
|
||||
if (nextIndex == 1)
|
||||
if (nextJoin == 1)
|
||||
{
|
||||
// Set to right position
|
||||
TriList.SetBool(UIBoolJoin.HeaderCallStatusLeftPositionVisible, false);
|
||||
TriList.SetBool(UIBoolJoin.HeaderCallStatusRightPositionVisible, true);
|
||||
}
|
||||
else if (nextIndex == 0)
|
||||
else if (nextJoin == 0)
|
||||
{
|
||||
// Set to left position
|
||||
TriList.SetBool(UIBoolJoin.HeaderCallStatusLeftPositionVisible, true);
|
||||
@@ -1026,13 +1076,16 @@ namespace PepperDash.Essentials
|
||||
// Set mode of header button
|
||||
if (!codec.IsInCall)
|
||||
{
|
||||
HeaderCallButton.SetIcon(HeaderListButton.OnHook);
|
||||
HeaderCallButtonIconSig.StringValue = "DND";
|
||||
//HeaderCallButton.SetIcon(HeaderListButton.OnHook);
|
||||
}
|
||||
else if (codec.ActiveCalls.Any(c => c.Type == eCodecCallType.Video))
|
||||
HeaderCallButton.SetIcon(HeaderListButton.Camera);
|
||||
HeaderCallButtonIconSig.StringValue = "Camera";
|
||||
//HeaderCallButton.SetIcon(HeaderListButton.Camera);
|
||||
//TriList.SetUshort(UIUshortJoin.CallHeaderButtonMode, 2);
|
||||
else
|
||||
HeaderCallButton.SetIcon(HeaderListButton.Phone);
|
||||
HeaderCallButtonIconSig.StringValue = "Phone";
|
||||
//HeaderCallButton.SetIcon(HeaderListButton.Phone);
|
||||
//TriList.SetUshort(UIUshortJoin.CallHeaderButtonMode, 1);
|
||||
|
||||
// Set the call status text
|
||||
|
||||
@@ -160,7 +160,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||
else
|
||||
{
|
||||
Parent.Keyboard.DisableGoButton();
|
||||
return "Tap For Search Keyboard";
|
||||
return "Tap for keyboard";
|
||||
}
|
||||
});
|
||||
SearchStringFeedback.LinkInputSig(triList.StringInput[UIStringJoin.CodecDirectorySearchEntryText]);
|
||||
@@ -1112,7 +1112,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||
{
|
||||
if (DialStringBuilder.Length == 0 && !Codec.IsInCall)
|
||||
{
|
||||
return "Dial or Tap to Show Keyboard";
|
||||
return "Tap for keyboard";
|
||||
}
|
||||
if(Regex.Match(ds, @"^\d{4,7}$").Success) // 456-7890
|
||||
return string.Format("{0}-{1}", ds.Substring(0, 3), ds.Substring(3));
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user