diff --git a/Essentials Core/PepperDashEssentialsBase/Global.cs b/Essentials Core/PepperDashEssentialsBase/Global/Global.cs similarity index 100% rename from Essentials Core/PepperDashEssentialsBase/Global.cs rename to Essentials Core/PepperDashEssentialsBase/Global/Global.cs diff --git a/Essentials Core/PepperDashEssentialsBase/Global/JobTimer.cs b/Essentials Core/PepperDashEssentialsBase/Global/JobTimer.cs new file mode 100644 index 00000000..9f98dd9f --- /dev/null +++ b/Essentials Core/PepperDashEssentialsBase/Global/JobTimer.cs @@ -0,0 +1,79 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; + +namespace PepperDash.Essentials.Core +{ + public static class JobTimer + { + static CTimer MinuteTimer; + + static List Items = new List(); + + /// + /// + /// + /// + public static void AddAction(Action act) + { + + } + + /// + /// + /// + /// + /// + public static void AddJobTimerItem(JobTimerItem item) + { + var existing = Items.FirstOrDefault(i => i.Key == item.Key); + if (existing != null) + { + Items.Remove(existing); + } + Items.Add(item); + } + + static void CheckAndRunTimer() + { + if (Items.Count > 0 && MinuteTimer == null) + { + MinuteTimer = new CTimer(o => MinuteTimerCallback(), null, 60000, 60000); + } + } + + static void MinuteTimerCallback() + { + + + } + } + + /// + /// + /// + public class JobTimerItem + { + public string Key { get; private set; } + public Action JobAction { get; private set; } + public eJobTimerCycleTypes CycleType { get; private set; } + /// + /// + /// + public DateTime RunNextAt { get; set; } + + public JobTimerItem(string key, eJobTimerCycleTypes cycle, Action act) + { + + } + } + + public enum eJobTimerCycleTypes + { + RunEveryHour, + RunEveryHalfHour, + RunEveryMinute + } +} \ No newline at end of file diff --git a/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj b/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj index ab03ff44..bfaa8114 100644 --- a/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj +++ b/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj @@ -105,6 +105,7 @@ + @@ -163,7 +164,7 @@ - + diff --git a/Essentials Devices Common/Essentials Devices Common/Codec/CodecActiveCallItem.cs b/Essentials Devices Common/Essentials Devices Common/Codec/CodecActiveCallItem.cs index 17b39bc9..e0389093 100644 --- a/Essentials Devices Common/Essentials Devices Common/Codec/CodecActiveCallItem.cs +++ b/Essentials Devices Common/Essentials Devices Common/Codec/CodecActiveCallItem.cs @@ -33,6 +33,7 @@ namespace PepperDash.Essentials.Devices.Common.Codec { return !(Status == eCodecCallStatus.Disconnected || Status == eCodecCallStatus.Disconnecting + || Status == eCodecCallStatus.Idle || Status == eCodecCallStatus.Unknown); } } diff --git a/Essentials Devices Common/Essentials Devices Common/VideoCodec/MockVC/MockVC.cs b/Essentials Devices Common/Essentials Devices Common/VideoCodec/MockVC/MockVC.cs index 24441891..6640db49 100644 --- a/Essentials Devices Common/Essentials Devices Common/VideoCodec/MockVC/MockVC.cs +++ b/Essentials Devices Common/Essentials Devices Common/VideoCodec/MockVC/MockVC.cs @@ -43,13 +43,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec VolumeLevelFeedback.OutputChange += (o, a) => Debug.Console(1, this, "Volume={0}", _VolumeLevel); CodecOsdIn = new RoutingInputPort(RoutingPortNames.CodecOsd, eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Hdmi, 0, this); - HdmiIn1 = new RoutingInputPort(RoutingPortNames.HdmiIn1, eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Hdmi, 1, this); - HdmiIn2 = new RoutingInputPort(RoutingPortNames.HdmiIn2, eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Hdmi, 2, this); - HdmiOut = new RoutingOutputPort(RoutingPortNames.HdmiOut, eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Hdmi, null, this); - InputPorts.Add(CodecOsdIn); + HdmiIn1 = new RoutingInputPort(RoutingPortNames.HdmiIn1, eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Hdmi, 1, this); InputPorts.Add(HdmiIn1); + HdmiIn2 = new RoutingInputPort(RoutingPortNames.HdmiIn2, eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Hdmi, 2, this); InputPorts.Add(HdmiIn2); + HdmiOut = new RoutingOutputPort(RoutingPortNames.HdmiOut, eRoutingSignalType.AudioVideo, eRoutingPortConnectionType.Hdmi, null, this); OutputPorts.Add(HdmiOut); CallHistory = new CodecCallHistory(); diff --git a/Essentials/PepperDashEssentials/UI/CrestronTouchpanelPropertiesConfig.cs b/Essentials/PepperDashEssentials/UI/CrestronTouchpanelPropertiesConfig.cs index a79ef0b9..cfa8e996 100644 --- a/Essentials/PepperDashEssentials/UI/CrestronTouchpanelPropertiesConfig.cs +++ b/Essentials/PepperDashEssentials/UI/CrestronTouchpanelPropertiesConfig.cs @@ -12,7 +12,7 @@ public bool ShowDate { get; set; } public bool ShowTime { get; set; } public UiSetupPropertiesConfig Setup { get; set; } - public UiHeaderStyle HeaderStyle { get; set; } + public string HeaderStyle { get; set; } /// /// The count of sources that will trigger the "additional" arrows to show on the SRL. @@ -23,8 +23,17 @@ public CrestronTouchpanelPropertiesConfig() { SourcesOverflowCount = 5; - HeaderStyle = UiHeaderStyle.Habanero; + HeaderStyle = CrestronTouchpanelPropertiesConfig.Habanero; } + + /// + /// "habanero" + /// + public const string Habanero = "habanero"; + /// + /// "verbose" + /// + public const string Verbose = "verbose"; } /// @@ -34,14 +43,4 @@ { public bool IsVisible { get; set; } } - - /// - /// - /// - public enum UiHeaderStyle - { - Habanero = 0, - Verbose - } - } \ No newline at end of file diff --git a/Essentials/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs b/Essentials/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs index 3765e437..e15ef94e 100644 --- a/Essentials/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs +++ b/Essentials/PepperDashEssentials/UIDrivers/EssentialsHuddleVTC/EssentialsHuddleVtc1PanelAvFunctionsDriver.cs @@ -234,25 +234,25 @@ namespace PepperDash.Essentials var roomConf = CurrentRoom.Config; - if (Config.HeaderStyle == UiHeaderStyle.Habanero) + TriList.SetString(UIStringJoin.CurrentRoomName, CurrentRoom.Name); + + if (Config.HeaderStyle.ToLower() == CrestronTouchpanelPropertiesConfig.Habanero) { - TriList.SetString(UIStringJoin.CurrentRoomName, CurrentRoom.Name); TriList.SetSigFalseAction(UIBoolJoin.HeaderRoomButtonPress, () => PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.RoomHeaderPageVisible)); } - else if (Config.HeaderStyle == UiHeaderStyle.Verbose) + else if (Config.HeaderStyle.ToLower() == CrestronTouchpanelPropertiesConfig.Verbose) { // room name on join 1, concat phone and sip on join 2, no button method - TriList.SetString(UIStringJoin.CurrentRoomName, CurrentRoom.Name); - var addr = roomConf.Addresses; - if (addr == null) // protect from missing values by using default empties - addr = new EssentialsRoomAddressPropertiesConfig(); - // empty string when either missing, pipe when both showing - TriList.SetString(UIStringJoin.RoomAddressPipeText, - (string.IsNullOrEmpty(addr.PhoneNumber.Trim()) - || string.IsNullOrEmpty(addr.SipAddress.Trim())) ? "" : " | "); - TriList.SetString(UIStringJoin.RoomPhoneText, addr.PhoneNumber); - TriList.SetString(UIStringJoin.RoomSipText, addr.SipAddress); + //var addr = roomConf.Addresses; + //if (addr == null) // protect from missing values by using default empties + // addr = new EssentialsRoomAddressPropertiesConfig(); + //// empty string when either missing, pipe when both showing + //TriList.SetString(UIStringJoin.RoomAddressPipeText, + // (string.IsNullOrEmpty(addr.PhoneNumber.Trim()) + // || string.IsNullOrEmpty(addr.SipAddress.Trim())) ? "" : " | "); + //TriList.SetString(UIStringJoin.RoomPhoneText, addr.PhoneNumber); + //TriList.SetString(UIStringJoin.RoomSipText, addr.SipAddress); } TriList.SetBool(UIBoolJoin.DateAndTimeVisible, Config.ShowDate && Config.ShowTime); @@ -621,16 +621,22 @@ namespace PepperDash.Essentials /// void ShowCurrentSource() { - if (CurrentRoom.CurrentSourceInfo == null) - return; + if (CurrentRoom.CurrentSourceInfo == null) + return; + if (CurrentRoom.CurrentSourceInfo.SourceDevice == null) + { + TriList.SetBool(UIBoolJoin.SelectASourceVisible, true); + return; + } + var uiDev = CurrentRoom.CurrentSourceInfo.SourceDevice as IUiDisplayInfo; PageManager pm = null; // If we need a page manager, get an appropriate one if (uiDev != null) { - TriList.BooleanInput[UIBoolJoin.SelectASourceVisible].BoolValue = false; - // Got an existing page manager, get it + TriList.SetBool(UIBoolJoin.SelectASourceVisible, false); + // Got an existing page manager, get it if (PageManagers.ContainsKey(uiDev)) pm = PageManagers[uiDev]; // Otherwise make an apporiate one @@ -1192,12 +1198,12 @@ namespace PepperDash.Essentials Parent.Show(); return; } - else if (CurrentRoom.CurrentSourceInfo != null) + else if (routeInfo != null) { TriList.StringInput[UIStringJoin.CurrentSourceName].StringValue = routeInfo.PreferredName; TriList.StringInput[UIStringJoin.CurrentSourceIcon].StringValue = routeInfo.Icon; // defaults to "blank" } - else + else // This never gets hit???!!! { TriList.StringInput[UIStringJoin.CurrentSourceName].StringValue = "---"; TriList.StringInput[UIStringJoin.CurrentSourceIcon].StringValue = "Blank"; diff --git a/Essentials/PepperDashEssentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs b/Essentials/PepperDashEssentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs index bac49df9..8db74bb5 100644 --- a/Essentials/PepperDashEssentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs +++ b/Essentials/PepperDashEssentials/UIDrivers/VC/EssentialsVideoCodecUiDriver.cs @@ -417,8 +417,10 @@ namespace PepperDash.Essentials.UIDrivers.VC TriList.SetString(textOffset + i, c.Name); // if it's today, show a simpler string string timeText = null; - if (c.StartTime.Date == DateTime.Now.Date) + if (c.StartTime.Date == DateTime.Now.Date) timeText = c.StartTime.ToShortTimeString(); + else if (c.StartTime == DateTime.MinValue) + timeText = ""; else timeText = c.StartTime.ToString(); TriList.SetString(timeTextOffset + i, timeText); diff --git a/Release Package/PepperDashEssentials.cpz b/Release Package/PepperDashEssentials.cpz index 683d6421..c5997a8f 100644 Binary files a/Release Package/PepperDashEssentials.cpz and b/Release Package/PepperDashEssentials.cpz differ diff --git a/Release Package/PepperDashEssentials.dll b/Release Package/PepperDashEssentials.dll index 76ea5391..82545ad0 100644 Binary files a/Release Package/PepperDashEssentials.dll and b/Release Package/PepperDashEssentials.dll differ