mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-04 23:35:02 +00:00
Various bug fixes
This commit is contained in:
@@ -15,6 +15,8 @@ namespace PepperDash.Essentials.Devices.Common.Codec
|
||||
{
|
||||
// Add requirements for Dialer functionality
|
||||
|
||||
event EventHandler<CodecCallStatusItemChangeEventArgs> CallStatusChange;
|
||||
|
||||
void Dial(string number);
|
||||
void EndCall(CodecActiveCallItem activeCall);
|
||||
void EndAllCalls();
|
||||
@@ -22,6 +24,27 @@ namespace PepperDash.Essentials.Devices.Common.Codec
|
||||
void RejectCall(CodecActiveCallItem item);
|
||||
void SendDtmf(string digit);
|
||||
|
||||
BoolFeedback IncomingCallFeedback { get; }
|
||||
//BoolFeedback IncomingCallFeedback { get; }
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class CodecCallStatusItemChangeEventArgs : EventArgs
|
||||
{
|
||||
public CodecActiveCallItem CallItem { get; private set; }
|
||||
|
||||
//public eCodecCallStatus PreviousStatus { get; private set; }
|
||||
|
||||
//public eCodecCallStatus NewStatus { get; private set; }
|
||||
|
||||
public CodecCallStatusItemChangeEventArgs(/*eCodecCallStatus previousStatus,
|
||||
eCodecCallStatus newStatus,*/ CodecActiveCallItem item)
|
||||
{
|
||||
//PreviousStatus = previousStatus;
|
||||
//NewStatus = newStatus;
|
||||
CallItem = item;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -189,9 +189,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
}
|
||||
}
|
||||
|
||||
#warning Figure out where this func is or disappeared to
|
||||
protected override Func<bool> IncomingCallFeedbackFunc { get { return () => false; } }
|
||||
|
||||
|
||||
private string CliFeedbackRegistrationExpression;
|
||||
|
||||
@@ -205,6 +202,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
|
||||
public bool CommDebuggingIsOn;
|
||||
|
||||
|
||||
string Delimiter = "\r\n";
|
||||
|
||||
int PresentationSource;
|
||||
@@ -242,8 +240,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
|
||||
Communication = comm;
|
||||
|
||||
LoginMessageReceived = new CTimer(DisconnectClientAndReconnect, 5000);
|
||||
|
||||
if (props.CommunicationMonitorProperties != null)
|
||||
{
|
||||
CommunicationMonitor = new GenericCommunicationMonitor(this, Communication, props.CommunicationMonitorProperties);
|
||||
@@ -253,6 +249,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
CommunicationMonitor = new GenericCommunicationMonitor(this, Communication, 30000, 120000, 300000, "xStatus SystemUnit Software Version\r");
|
||||
}
|
||||
|
||||
if (props.Sharing != null)
|
||||
AutoShareContentWhileInCall = props.Sharing.AutoShareContentWhileInCall;
|
||||
|
||||
ShowSelfViewByDefault = props.ShowSelfViewByDefault;
|
||||
|
||||
DeviceManager.AddDevice(CommunicationMonitor);
|
||||
|
||||
PhonebookMode = props.PhonebookMode;
|
||||
@@ -337,13 +338,13 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
/// <returns></returns>
|
||||
public override bool CustomActivate()
|
||||
{
|
||||
//CrestronConsole.AddNewConsoleCommand(SendText, "send" + Key, "", ConsoleAccessLevelEnum.AccessOperator);
|
||||
CrestronConsole.AddNewConsoleCommand(SetCommDebug, "SetCodecCommDebug", "0 for Off, 1 for on", ConsoleAccessLevelEnum.AccessOperator);
|
||||
CrestronConsole.AddNewConsoleCommand(GetPhonebook, "GetCodecPhonebook", "Triggers a refresh of the codec phonebook", ConsoleAccessLevelEnum.AccessOperator);
|
||||
CrestronConsole.AddNewConsoleCommand(GetBookings, "GetCodecBookings", "Triggers a refresh of the booking data for today", ConsoleAccessLevelEnum.AccessOperator);
|
||||
|
||||
//CommDebuggingIsOn = true;
|
||||
Communication.Connect();
|
||||
LoginMessageReceived = new CTimer(DisconnectClientAndReconnect, 5000);
|
||||
|
||||
var socket = Communication as ISocketStatus;
|
||||
if (socket != null)
|
||||
{
|
||||
@@ -550,22 +551,18 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
{
|
||||
bool changeDetected = false;
|
||||
|
||||
eCodecCallStatus newStatus = eCodecCallStatus.Unknown;
|
||||
|
||||
// Update properties of ActiveCallItem
|
||||
if(call.Status != null)
|
||||
if (!string.IsNullOrEmpty(call.Status.Value))
|
||||
{
|
||||
eCodecCallStatus newStatus = eCodecCallStatus.Unknown;
|
||||
|
||||
newStatus = CodecCallStatus.ConvertToStatusEnum(call.Status.Value);
|
||||
|
||||
if (newStatus != eCodecCallStatus.Unknown)
|
||||
{
|
||||
changeDetected = true;
|
||||
SetNewCallStatusAndFireCallStatusChange(newStatus, tempActiveCall);
|
||||
}
|
||||
tempActiveCall.Status = CodecCallStatus.ConvertToStatusEnum(call.Status.Value);
|
||||
|
||||
if (newStatus == eCodecCallStatus.Connected)
|
||||
GetCallHistory();
|
||||
|
||||
changeDetected = true;
|
||||
}
|
||||
if (call.CallType != null)
|
||||
if (!string.IsNullOrEmpty(call.CallType.Value))
|
||||
@@ -590,6 +587,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
|
||||
if (changeDetected)
|
||||
{
|
||||
SetSelfViewMode();
|
||||
OnCallStatusChange(tempActiveCall);
|
||||
ListCalls();
|
||||
}
|
||||
}
|
||||
@@ -611,7 +610,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
|
||||
ListCalls();
|
||||
|
||||
SetNewCallStatusAndFireCallStatusChange(newCallItem.Status, newCallItem);
|
||||
SetSelfViewMode();
|
||||
OnCallStatusChange(newCallItem);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -756,6 +756,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
|
||||
ListCalls();
|
||||
|
||||
SetSelfViewMode();
|
||||
// Notify of the call disconnection
|
||||
SetNewCallStatusAndFireCallStatusChange(eCodecCallStatus.Disconnected, tempActiveCall);
|
||||
|
||||
@@ -1100,6 +1101,24 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
||||
SendText("xCommand SystemUnit Boot Action: Restart");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets SelfView Mode based on config
|
||||
/// </summary>
|
||||
void SetSelfViewMode()
|
||||
{
|
||||
if (!IsInCall)
|
||||
{
|
||||
SelfviewModeOff();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ShowSelfViewByDefault)
|
||||
SelfviewModeOn();
|
||||
else
|
||||
SelfviewModeOff();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Turns on Selfview Mode
|
||||
/// </summary>
|
||||
|
||||
@@ -13,8 +13,6 @@ namespace PepperDash.Essentials.Devices.Common.Codec
|
||||
{
|
||||
public CommunicationMonitorConfig CommunicationMonitorProperties { get; set; }
|
||||
|
||||
//public ControlPropertiesConfig Control { get; set; }
|
||||
|
||||
public List<CodecActiveCallItem> Favorites { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@@ -22,5 +20,14 @@ namespace PepperDash.Essentials.Devices.Common.Codec
|
||||
/// </summary>
|
||||
public string PhonebookMode { get; set; }
|
||||
|
||||
public bool ShowSelfViewByDefault { get; set; }
|
||||
|
||||
public SharingProperties Sharing { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class SharingProperties
|
||||
{
|
||||
public bool AutoShareContentWhileInCall { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
{
|
||||
BoolFeedback SelfviewIsOnFeedback { get; }
|
||||
|
||||
bool ShowSelfViewByDefault { get; }
|
||||
|
||||
void SelfviewModeOn();
|
||||
|
||||
void SelfviewModeOff();
|
||||
|
||||
@@ -36,7 +36,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
}
|
||||
|
||||
// Debug helpers
|
||||
IncomingCallFeedback.OutputChange += (o, a) => Debug.Console(1, this, "IncomingCall={0}", _IncomingCall);
|
||||
MuteFeedback.OutputChange += (o, a) => Debug.Console(1, this, "Mute={0}", _IsMuted);
|
||||
PrivacyModeIsOnFeedback.OutputChange += (o, a) => Debug.Console(1, this, "Privacy={0}", _PrivacyModeIsOn);
|
||||
SharingSourceFeedback.OutputChange += (o, a) => Debug.Console(1, this, "SharingSource={0}", _SharingSource);
|
||||
@@ -64,12 +63,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
SetIsReady();
|
||||
}
|
||||
|
||||
protected override Func<bool> IncomingCallFeedbackFunc
|
||||
{
|
||||
get { return () => _IncomingCall; }
|
||||
}
|
||||
bool _IncomingCall;
|
||||
|
||||
protected override Func<bool> MuteFeedbackFunc
|
||||
{
|
||||
get { return () => _IsMuted; }
|
||||
@@ -102,7 +95,7 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
Debug.Console(1, this, "Dial: {0}", number);
|
||||
var call = new CodecActiveCallItem() { Name = number, Number = number, Id = number, Status = eCodecCallStatus.Dialing };
|
||||
ActiveCalls.Add(call);
|
||||
OnCallStatusChange(eCodecCallStatus.Unknown, call.Status, call);
|
||||
OnCallStatusChange(call);
|
||||
//ActiveCallCountFeedback.FireUpdate();
|
||||
// Simulate 2-second ring, then connecting, then connected
|
||||
new CTimer(o =>
|
||||
@@ -299,8 +292,9 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
var call = new CodecActiveCallItem() { Name = url, Id = url, Number = url, Type= eCodecCallType.Video, Direction = eCodecCallDirection.Incoming };
|
||||
ActiveCalls.Add(call);
|
||||
SetNewCallStatusAndFireCallStatusChange(eCodecCallStatus.Ringing, call);
|
||||
_IncomingCall = true;
|
||||
IncomingCallFeedback.FireUpdate();
|
||||
|
||||
//OnCallStatusChange(eCodecCallStatus.Unknown, eCodecCallStatus.Ringing, call);
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -313,8 +307,8 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
var call = new CodecActiveCallItem() { Name = url, Id = url, Number = url, Type = eCodecCallType.Audio, Direction = eCodecCallDirection.Incoming };
|
||||
ActiveCalls.Add(call);
|
||||
SetNewCallStatusAndFireCallStatusChange(eCodecCallStatus.Ringing, call);
|
||||
_IncomingCall = true;
|
||||
IncomingCallFeedback.FireUpdate();
|
||||
|
||||
//OnCallStatusChange(eCodecCallStatus.Unknown, eCodecCallStatus.Ringing, call);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -40,9 +40,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
/// </summary>
|
||||
public bool IsInCall { get { return ActiveCalls.Any(c => c.IsActiveCall); } }
|
||||
|
||||
public BoolFeedback IncomingCallFeedback { get; private set; }
|
||||
|
||||
abstract protected Func<bool> IncomingCallFeedbackFunc { get; }
|
||||
abstract protected Func<bool> PrivacyModeIsOnFeedbackFunc { get; }
|
||||
abstract protected Func<int> VolumeLevelFeedbackFunc { get; }
|
||||
abstract protected Func<bool> MuteFeedbackFunc { get; }
|
||||
@@ -52,12 +49,15 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
|
||||
public VideoCodecInfo CodecInfo { get; protected set; }
|
||||
|
||||
public bool ShowSelfViewByDefault { get; protected set; }
|
||||
|
||||
public bool AutoShareContentWhileInCall { get; protected set; }
|
||||
|
||||
public bool IsReady { get; protected set; }
|
||||
|
||||
public VideoCodecBase(string key, string name)
|
||||
: base(key, name)
|
||||
{
|
||||
IncomingCallFeedback = new BoolFeedback(IncomingCallFeedbackFunc);
|
||||
PrivacyModeIsOnFeedback = new BoolFeedback(PrivacyModeIsOnFeedbackFunc);
|
||||
VolumeLevelFeedback = new IntFeedback(VolumeLevelFeedbackFunc);
|
||||
MuteFeedback = new BoolFeedback(MuteFeedbackFunc);
|
||||
@@ -87,7 +87,6 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
{
|
||||
return new List<Feedback>
|
||||
{
|
||||
IncomingCallFeedback,
|
||||
PrivacyModeIsOnFeedback,
|
||||
SharingSourceFeedback
|
||||
};
|
||||
@@ -101,9 +100,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
/// </summary>
|
||||
protected void SetNewCallStatusAndFireCallStatusChange(eCodecCallStatus newStatus, CodecActiveCallItem call)
|
||||
{
|
||||
var prevStatus = call.Status;
|
||||
call.Status = newStatus;
|
||||
OnCallStatusChange(prevStatus, newStatus, call);
|
||||
|
||||
OnCallStatusChange(call);
|
||||
|
||||
if (AutoShareContentWhileInCall)
|
||||
StartSharing();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -112,11 +114,11 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
/// <param name="previousStatus"></param>
|
||||
/// <param name="newStatus"></param>
|
||||
/// <param name="item"></param>
|
||||
protected void OnCallStatusChange(eCodecCallStatus previousStatus, eCodecCallStatus newStatus, CodecActiveCallItem item)
|
||||
protected void OnCallStatusChange(CodecActiveCallItem item)
|
||||
{
|
||||
var handler = CallStatusChange;
|
||||
if (handler != null)
|
||||
handler(this, new CodecCallStatusItemChangeEventArgs(previousStatus, newStatus, item));
|
||||
handler(this, new CodecCallStatusItemChangeEventArgs(item));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -174,31 +176,12 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
foreach (var c in ActiveCalls)
|
||||
sb.AppendFormat("{0} {1} -- {2} {3}\r", c.Id, c.Number, c.Name, c.Status);
|
||||
Debug.Console(1, "{0}", sb.ToString());
|
||||
sb.AppendFormat("{0} {1} -- {2} {3}\n", c.Id, c.Number, c.Name, c.Status);
|
||||
Debug.Console(1, this, "\n{0}\n", sb.ToString());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class CodecCallStatusItemChangeEventArgs : EventArgs
|
||||
{
|
||||
public CodecActiveCallItem CallItem { get; private set; }
|
||||
|
||||
public eCodecCallStatus PreviousStatus { get; private set; }
|
||||
|
||||
public eCodecCallStatus NewStatus { get; private set; }
|
||||
|
||||
public CodecCallStatusItemChangeEventArgs(eCodecCallStatus previousStatus,
|
||||
eCodecCallStatus newStatus, CodecActiveCallItem item)
|
||||
{
|
||||
PreviousStatus = previousStatus;
|
||||
NewStatus = newStatus;
|
||||
CallItem = item;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Used to track the status of syncronizing the phonebook values when connecting to a codec or refreshing the phonebook info
|
||||
|
||||
@@ -37,6 +37,15 @@ namespace PepperDash.Essentials
|
||||
/// 1003 - For tapping the text field to reveal the keyboard
|
||||
/// </summary>
|
||||
public const uint CodecDirectorySearchTextPress = 1003;
|
||||
/// <summary>
|
||||
/// 1004
|
||||
/// </summary>
|
||||
public const uint CallStopSharingPress = 1004;
|
||||
/// <summary>
|
||||
/// 1005
|
||||
/// </summary>
|
||||
public const uint CallSharedSourceInfoEnable = 1005;
|
||||
|
||||
|
||||
|
||||
// Audio Conference
|
||||
@@ -220,6 +229,7 @@ namespace PepperDash.Essentials
|
||||
/// </summary>
|
||||
public const uint VCSelfViewPipTogglePress = 1253;
|
||||
|
||||
|
||||
//******************************************************
|
||||
|
||||
// Letter joins start at 2921;
|
||||
|
||||
@@ -1,51 +1,56 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
using Crestron.SimplSharpPro;
|
||||
using Crestron.SimplSharpPro.DeviceSupport;
|
||||
|
||||
namespace PepperDash.Essentials
|
||||
{
|
||||
/// <summary>
|
||||
/// Common string join number constants
|
||||
/// </summary>
|
||||
public class UIStringJoin
|
||||
{
|
||||
//******************************************************
|
||||
// Codec
|
||||
/// <summary>
|
||||
/// 1001
|
||||
/// </summary>
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
using Crestron.SimplSharpPro;
|
||||
using Crestron.SimplSharpPro.DeviceSupport;
|
||||
|
||||
namespace PepperDash.Essentials
|
||||
{
|
||||
/// <summary>
|
||||
/// Common string join number constants
|
||||
/// </summary>
|
||||
public class UIStringJoin
|
||||
{
|
||||
//******************************************************
|
||||
// Codec
|
||||
/// <summary>
|
||||
/// 1001
|
||||
/// </summary>
|
||||
public const uint CodecAddressEntryText = 1001;
|
||||
/// <summary>
|
||||
/// 1002
|
||||
/// </summary>
|
||||
public const uint CodecDirectorySearchEntryText = 1002;
|
||||
|
||||
/// <summary>
|
||||
/// 1201 - 1230 range of joins for recents list
|
||||
/// </summary>
|
||||
public const uint VCRecentListTextStart = 1201;
|
||||
// RANGE IN USE
|
||||
public const uint VCRecentListTextEnd = 1230;
|
||||
/// <summary>
|
||||
/// 1231 - 1261 range of joins for recent list time
|
||||
/// </summary>
|
||||
public const uint CodecDirectorySearchEntryText = 1002;
|
||||
/// <summary>
|
||||
/// 1004
|
||||
/// </summary>
|
||||
public const uint CallSharedSourceNameText = 1004;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 1201 - 1230 range of joins for recents list
|
||||
/// </summary>
|
||||
public const uint VCRecentListTextStart = 1201;
|
||||
// RANGE IN USE
|
||||
public const uint VCRecentListTextEnd = 1230;
|
||||
/// <summary>
|
||||
/// 1231 - 1261 range of joins for recent list time
|
||||
/// </summary>
|
||||
public const uint VCRecentListTimeTextStart = 1231;
|
||||
// RANGE IN USE
|
||||
public const uint VCRecentListTimeTextEnd = 1260;
|
||||
/// <summary>
|
||||
/// 1291 - the current layout mode
|
||||
/// </summary>
|
||||
public const uint VCLayoutModeText = 1291;
|
||||
|
||||
/// <summary>
|
||||
/// 1301 - 1400
|
||||
/// </summary>
|
||||
public const uint VCDirectoryListTextStart = 1301;
|
||||
// RANGE IN USE
|
||||
public const uint VCRecentListTimeTextEnd = 1260;
|
||||
/// <summary>
|
||||
/// 1291 - the current layout mode
|
||||
/// </summary>
|
||||
public const uint VCLayoutModeText = 1291;
|
||||
|
||||
/// <summary>
|
||||
/// 1301 - 1400
|
||||
/// </summary>
|
||||
public const uint VCDirectoryListTextStart = 1301;
|
||||
// RANGE IN USE
|
||||
public const uint VCDirectoryListTextEnd = 1400;
|
||||
|
||||
/// <summary>
|
||||
@@ -71,156 +76,156 @@ namespace PepperDash.Essentials
|
||||
/// <summary>
|
||||
/// 1415
|
||||
/// </summary>
|
||||
public const uint VCFavorites5Text = 1415;
|
||||
|
||||
|
||||
//******************************************************
|
||||
// Keyboard
|
||||
/// <summary>
|
||||
/// 1901
|
||||
/// </summary>
|
||||
//public const uint KeypadText = 2901;
|
||||
|
||||
/// <summary>
|
||||
/// 3101 - This is the start of the range 3101 - 3120
|
||||
/// </summary>
|
||||
public const uint TechMenuButtonTextStart = 3101;
|
||||
|
||||
//----- through 3120
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 3812
|
||||
/// </summary>
|
||||
public const uint AdvancedVolumeSlider1Text = 3812;
|
||||
/// <summary>
|
||||
/// 3822
|
||||
/// </summary>
|
||||
public const uint AdvancedVolumeSlider2Text = 3822;
|
||||
/// <summary>
|
||||
/// 3832
|
||||
/// </summary>
|
||||
public const uint AdvancedVolumeSlider3Text = 3832;
|
||||
/// <summary>
|
||||
/// 3842
|
||||
/// </summary>
|
||||
public const uint AdvancedVolumeSlider4Text = 3842;
|
||||
/// <summary>
|
||||
/// 3852
|
||||
/// </summary>
|
||||
public const uint AdvancedVolumeSlider5Text = 3852;
|
||||
/// <summary>
|
||||
/// 3862
|
||||
/// </summary>
|
||||
public const uint AdvancedVolumeSlider6Text = 3862;
|
||||
|
||||
/// <summary>
|
||||
/// 3901
|
||||
/// </summary>
|
||||
public const uint CurrentRoomName = 3901;
|
||||
/// <summary>
|
||||
/// 3902
|
||||
/// </summary>
|
||||
public const uint CurrentSourceName = 3902;
|
||||
/// <summary>
|
||||
/// 3903
|
||||
/// </summary>
|
||||
public const uint CurrentSourceIcon = 3903;
|
||||
/// <summary>
|
||||
/// 3904 - Phone number for room header
|
||||
/// </summary>
|
||||
public const uint RoomPhoneText = 3904;
|
||||
/// <summary>
|
||||
/// 3905 - SIP address for room header
|
||||
/// </summary>
|
||||
public const uint RoomSipText = 3905;
|
||||
/// <summary>
|
||||
/// 3906 - The separator for verbose-header text on addresses
|
||||
/// </summary>
|
||||
public const uint RoomAddressPipeText = 3906;
|
||||
/// <summary>
|
||||
/// 3911
|
||||
/// </summary>
|
||||
public const uint PowerOffMessage = 3911;
|
||||
/// <summary>
|
||||
/// 3912
|
||||
/// </summary>
|
||||
public const uint StartPageMessage = 3912;
|
||||
/// <summary>
|
||||
/// 3913
|
||||
/// </summary>
|
||||
public const uint StartActivityText = 3913;
|
||||
/// <summary>
|
||||
/// 3914 Title bar label for source overlay
|
||||
/// </summary>
|
||||
public const uint SourceBackgroundOverlayTitle = 3914;
|
||||
|
||||
/// <summary>
|
||||
/// 3915
|
||||
/// </summary>
|
||||
public const uint NotificationRibbonText = 3915;
|
||||
/// <summary>
|
||||
/// 3916 The "active call" label
|
||||
/// </summary>
|
||||
public const uint HeaderCallStatusLabel = 3916;
|
||||
|
||||
/// <summary>
|
||||
/// 3922
|
||||
/// </summary>
|
||||
public const uint HelpMessage = 3922;
|
||||
/// <summary>
|
||||
/// 3923
|
||||
/// </summary>
|
||||
public const uint LogoUrl = 3923;
|
||||
/// <summary>
|
||||
/// 3924 - the text on the "call help desk" button
|
||||
/// </summary>
|
||||
public const uint HelpPageCallButtonText = 3924;
|
||||
|
||||
/// <summary>
|
||||
/// 3961 Name of source on display 1
|
||||
/// </summary>
|
||||
public const uint Display1SourceLabel = 3961;
|
||||
/// <summary>
|
||||
/// 3962 Title above display 1
|
||||
/// </summary>
|
||||
public const uint Display1TitleLabel = 3962;
|
||||
/// <summary>
|
||||
/// 3964 Name of source on display 2
|
||||
/// </summary>
|
||||
public const uint Display2SourceLabel = 3964;
|
||||
/// <summary>
|
||||
/// 3965 Title above display 2
|
||||
/// </summary>
|
||||
public const uint Display2TitleLabel = 3965;
|
||||
|
||||
/// <summary>
|
||||
/// 3966
|
||||
/// </summary>
|
||||
public const uint NextMeetingRibbonStartText = 3966;
|
||||
/// <summary>
|
||||
/// 3967
|
||||
/// </summary>
|
||||
public const uint NextMeetingRibbonEndText = 3967;
|
||||
/// <summary>
|
||||
/// 3968
|
||||
/// </summary>
|
||||
public const uint NextMeetingRibbonTitleText = 3968;
|
||||
/// <summary>
|
||||
/// 3969
|
||||
/// </summary>
|
||||
public const uint NextMettingRibbonNameText = 3969;
|
||||
/// <summary>
|
||||
/// 3970
|
||||
/// </summary>
|
||||
public const uint NextMeetingRibbonButtonLabel = 3970;
|
||||
/// <summary>
|
||||
/// 3971
|
||||
/// </summary>
|
||||
public const uint NextMeetingSecondaryButtonLabel = 3971;
|
||||
/// <summary>
|
||||
/// 3972
|
||||
/// </summary>
|
||||
public const uint VCFavorites5Text = 1415;
|
||||
|
||||
|
||||
//******************************************************
|
||||
// Keyboard
|
||||
/// <summary>
|
||||
/// 1901
|
||||
/// </summary>
|
||||
//public const uint KeypadText = 2901;
|
||||
|
||||
/// <summary>
|
||||
/// 3101 - This is the start of the range 3101 - 3120
|
||||
/// </summary>
|
||||
public const uint TechMenuButtonTextStart = 3101;
|
||||
|
||||
//----- through 3120
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 3812
|
||||
/// </summary>
|
||||
public const uint AdvancedVolumeSlider1Text = 3812;
|
||||
/// <summary>
|
||||
/// 3822
|
||||
/// </summary>
|
||||
public const uint AdvancedVolumeSlider2Text = 3822;
|
||||
/// <summary>
|
||||
/// 3832
|
||||
/// </summary>
|
||||
public const uint AdvancedVolumeSlider3Text = 3832;
|
||||
/// <summary>
|
||||
/// 3842
|
||||
/// </summary>
|
||||
public const uint AdvancedVolumeSlider4Text = 3842;
|
||||
/// <summary>
|
||||
/// 3852
|
||||
/// </summary>
|
||||
public const uint AdvancedVolumeSlider5Text = 3852;
|
||||
/// <summary>
|
||||
/// 3862
|
||||
/// </summary>
|
||||
public const uint AdvancedVolumeSlider6Text = 3862;
|
||||
|
||||
/// <summary>
|
||||
/// 3901
|
||||
/// </summary>
|
||||
public const uint CurrentRoomName = 3901;
|
||||
/// <summary>
|
||||
/// 3902
|
||||
/// </summary>
|
||||
public const uint CurrentSourceName = 3902;
|
||||
/// <summary>
|
||||
/// 3903
|
||||
/// </summary>
|
||||
public const uint CurrentSourceIcon = 3903;
|
||||
/// <summary>
|
||||
/// 3904 - Phone number for room header
|
||||
/// </summary>
|
||||
public const uint RoomPhoneText = 3904;
|
||||
/// <summary>
|
||||
/// 3905 - SIP address for room header
|
||||
/// </summary>
|
||||
public const uint RoomSipText = 3905;
|
||||
/// <summary>
|
||||
/// 3906 - The separator for verbose-header text on addresses
|
||||
/// </summary>
|
||||
public const uint RoomAddressPipeText = 3906;
|
||||
/// <summary>
|
||||
/// 3911
|
||||
/// </summary>
|
||||
public const uint PowerOffMessage = 3911;
|
||||
/// <summary>
|
||||
/// 3912
|
||||
/// </summary>
|
||||
public const uint StartPageMessage = 3912;
|
||||
/// <summary>
|
||||
/// 3913
|
||||
/// </summary>
|
||||
public const uint StartActivityText = 3913;
|
||||
/// <summary>
|
||||
/// 3914 Title bar label for source overlay
|
||||
/// </summary>
|
||||
public const uint SourceBackgroundOverlayTitle = 3914;
|
||||
|
||||
/// <summary>
|
||||
/// 3915
|
||||
/// </summary>
|
||||
public const uint NotificationRibbonText = 3915;
|
||||
/// <summary>
|
||||
/// 3916 The "active call" label
|
||||
/// </summary>
|
||||
public const uint HeaderCallStatusLabel = 3916;
|
||||
|
||||
/// <summary>
|
||||
/// 3922
|
||||
/// </summary>
|
||||
public const uint HelpMessage = 3922;
|
||||
/// <summary>
|
||||
/// 3923
|
||||
/// </summary>
|
||||
public const uint LogoUrl = 3923;
|
||||
/// <summary>
|
||||
/// 3924 - the text on the "call help desk" button
|
||||
/// </summary>
|
||||
public const uint HelpPageCallButtonText = 3924;
|
||||
|
||||
/// <summary>
|
||||
/// 3961 Name of source on display 1
|
||||
/// </summary>
|
||||
public const uint Display1SourceLabel = 3961;
|
||||
/// <summary>
|
||||
/// 3962 Title above display 1
|
||||
/// </summary>
|
||||
public const uint Display1TitleLabel = 3962;
|
||||
/// <summary>
|
||||
/// 3964 Name of source on display 2
|
||||
/// </summary>
|
||||
public const uint Display2SourceLabel = 3964;
|
||||
/// <summary>
|
||||
/// 3965 Title above display 2
|
||||
/// </summary>
|
||||
public const uint Display2TitleLabel = 3965;
|
||||
|
||||
/// <summary>
|
||||
/// 3966
|
||||
/// </summary>
|
||||
public const uint NextMeetingRibbonStartText = 3966;
|
||||
/// <summary>
|
||||
/// 3967
|
||||
/// </summary>
|
||||
public const uint NextMeetingRibbonEndText = 3967;
|
||||
/// <summary>
|
||||
/// 3968
|
||||
/// </summary>
|
||||
public const uint NextMeetingRibbonTitleText = 3968;
|
||||
/// <summary>
|
||||
/// 3969
|
||||
/// </summary>
|
||||
public const uint NextMettingRibbonNameText = 3969;
|
||||
/// <summary>
|
||||
/// 3970
|
||||
/// </summary>
|
||||
public const uint NextMeetingRibbonButtonLabel = 3970;
|
||||
/// <summary>
|
||||
/// 3971
|
||||
/// </summary>
|
||||
public const uint NextMeetingSecondaryButtonLabel = 3971;
|
||||
/// <summary>
|
||||
/// 3972
|
||||
/// </summary>
|
||||
public const uint NextMeetingFollowingMeetingText = 3972;
|
||||
|
||||
/// <summary>
|
||||
@@ -231,7 +236,7 @@ namespace PepperDash.Essentials
|
||||
/// <summary>
|
||||
/// 3997
|
||||
/// </summary>
|
||||
public const uint MeetingsOrContactMethodListTitleText = 3997;
|
||||
|
||||
}
|
||||
public const uint MeetingsOrContactMethodListTitleText = 3997;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -304,14 +304,27 @@ namespace PepperDash.Essentials
|
||||
(CurrentRoom.DefaultDisplay as IPower).PowerToggle();
|
||||
});
|
||||
|
||||
TriList.SetSigFalseAction(UIBoolJoin.HeaderCallStatusButtonPress, () =>
|
||||
PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.HeaderActiveCallsListVisible));
|
||||
TriList.SetSigFalseAction(UIBoolJoin.HeaderCallStatusButtonPress, ShowActiveCallsList );
|
||||
|
||||
SetupNextMeetingTimer();
|
||||
|
||||
base.Show();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Allows PopupInterlock to be toggled if the calls list is already visible, or if the codec is in a call
|
||||
/// </summary>
|
||||
void ShowActiveCallsList()
|
||||
{
|
||||
if(PopupInterlock.CurrentJoin == UIBoolJoin.HeaderActiveCallsListVisible)
|
||||
PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.HeaderActiveCallsListVisible);
|
||||
else
|
||||
{
|
||||
if((CurrentRoom.ScheduleSource as VideoCodecBase).IsInCall)
|
||||
PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.HeaderActiveCallsListVisible);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
@@ -959,8 +972,7 @@ namespace PepperDash.Essentials
|
||||
// Call button
|
||||
HeaderCallButton = new HeaderListButton(HeaderButtonsList, nextIndex);
|
||||
HeaderCallButton.SetIcon(HeaderListButton.OnHook);
|
||||
HeaderCallButton.OutputSig.SetSigFalseAction(() =>
|
||||
PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.HeaderActiveCallsListVisible));
|
||||
HeaderCallButton.OutputSig.SetSigFalseAction(ShowActiveCallsList);
|
||||
|
||||
nextIndex--;
|
||||
|
||||
|
||||
@@ -79,6 +79,9 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||
StringBuilder SearchStringBuilder = new StringBuilder();
|
||||
BoolFeedback SearchStringBackspaceVisibleFeedback;
|
||||
|
||||
BoolFeedback CallSharingInfoVisibleFeedback;
|
||||
StringFeedback CallSharingInfoTextFeedback;
|
||||
|
||||
ModalDialog IncomingCallModal;
|
||||
|
||||
eKeypadMode KeypadMode;
|
||||
@@ -107,6 +110,8 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||
|
||||
codec.CallStatusChange += new EventHandler<CodecCallStatusItemChangeEventArgs>(Codec_CallStatusChange);
|
||||
|
||||
codec.SharingSourceFeedback.OutputChange += new EventHandler<EventArgs>(SharingSourceFeedback_OutputChange);
|
||||
|
||||
// If the codec is ready, then get the values we want, otherwise wait
|
||||
if (Codec.IsReady)
|
||||
Codec_IsReady();
|
||||
@@ -153,7 +158,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||
else
|
||||
{
|
||||
Parent.Keyboard.DisableGoButton();
|
||||
return "Touch to Search";
|
||||
return "Tap For Search Keyboard";
|
||||
}
|
||||
});
|
||||
SearchStringFeedback.LinkInputSig(triList.StringInput[UIStringJoin.CodecDirectorySearchEntryText]);
|
||||
@@ -173,9 +178,46 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||
|
||||
TriList.SetSigFalseAction(UIBoolJoin.VCDirectoryBackspacePress, SearchKeypadBackspacePress);
|
||||
|
||||
CallSharingInfoVisibleFeedback = new BoolFeedback(() => !string.IsNullOrEmpty(Codec.SharingSourceFeedback.StringValue));
|
||||
CallSharingInfoVisibleFeedback.LinkInputSig(triList.BooleanInput[UIBoolJoin.CallSharedSourceInfoEnable]);
|
||||
|
||||
CallSharingInfoTextFeedback = new StringFeedback(() => GetCurrentSourceName(Codec.SharingSourceFeedback.StringValue));
|
||||
CallSharingInfoTextFeedback.LinkInputSig(triList.StringInput[UIStringJoin.CallSharedSourceNameText]);
|
||||
|
||||
TriList.SetSigFalseAction(UIBoolJoin.CallStopSharingPress, Codec.StopSharing);
|
||||
|
||||
|
||||
|
||||
// Address and number
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the name of the source that matches the specified key
|
||||
/// </summary>
|
||||
/// <param name="key"></param>
|
||||
/// <returns></returns>
|
||||
string GetCurrentSourceName(string key)
|
||||
{
|
||||
var device = DeviceManager.GetDeviceForKey(key);
|
||||
|
||||
return (device as SourceListItem).Name;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Fires when the sharing source feedback of the codec changes
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
void SharingSourceFeedback_OutputChange(object sender, EventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrEmpty((sender as IHasSharing).SharingSourceFeedback.StringValue))
|
||||
{
|
||||
// Source is being shared
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
@@ -197,7 +239,14 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||
void Codec_CallStatusChange(object sender, CodecCallStatusItemChangeEventArgs e)
|
||||
{
|
||||
var call = e.CallItem;
|
||||
switch (e.NewStatus)
|
||||
|
||||
//var newStatus = e.NewStatus;
|
||||
|
||||
//// Catch events with no status and reuse previous status if found
|
||||
//if (newStatus == eCodecCallStatus.Unknown && e.PreviousStatus != eCodecCallStatus.Unknown)
|
||||
// newStatus = e.PreviousStatus;
|
||||
|
||||
switch (e.CallItem.Status)
|
||||
{
|
||||
case eCodecCallStatus.Connected:
|
||||
// fire at SRL item
|
||||
@@ -214,7 +263,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||
Parent.ShowNotificationRibbon("Connecting", 0);
|
||||
break;
|
||||
case eCodecCallStatus.Dialing:
|
||||
Parent.ShowNotificationRibbon("Dialing", 0);
|
||||
Parent.ShowNotificationRibbon("Connecting", 0);
|
||||
break;
|
||||
case eCodecCallStatus.Disconnected:
|
||||
if (!Codec.IsInCall)
|
||||
@@ -255,14 +304,15 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||
|
||||
Parent.ComputeHeaderCallStatus(Codec);
|
||||
|
||||
// Update list of calls
|
||||
UpdateCallsHeaderList(call);
|
||||
// Update active call list
|
||||
UpdateHeaderActiveCallList();
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Redraws the calls list on the header
|
||||
/// </summary>
|
||||
void UpdateCallsHeaderList(CodecActiveCallItem call)
|
||||
void UpdateHeaderActiveCallList()
|
||||
{
|
||||
var activeList = Codec.ActiveCalls.Where(c => c.IsActiveCall).ToList();
|
||||
ActiveCallsSRL.Clear();
|
||||
@@ -279,6 +329,10 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||
i++;
|
||||
}
|
||||
ActiveCallsSRL.Count = (ushort)activeList.Count;
|
||||
|
||||
// If Active Calls list is visible and codec is not in a call, hide the list
|
||||
if (!Codec.IsInCall && Parent.PopupInterlock.CurrentJoin == UIBoolJoin.HeaderActiveCallsListVisible)
|
||||
Parent.PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.HeaderActiveCallsListVisible);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -431,7 +485,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||
else if (c.OccurenceType == eCodecOccurrenceType.Placed)
|
||||
iconName = "Misc-17_Light";
|
||||
else
|
||||
iconName = "Help";
|
||||
iconName = "Delete";
|
||||
RecentCallsList.SetItemIcon(i, iconName);
|
||||
|
||||
var call = c; // for lambda scope
|
||||
@@ -609,16 +663,25 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||
|
||||
var dc = r as DirectoryContact;
|
||||
|
||||
DirectoryList.SetItemButtonAction(i, b =>
|
||||
if (dc.ContactMethods.Count > 1)
|
||||
{
|
||||
if (!b)
|
||||
// If more than one contact method, show contact method modal dialog
|
||||
DirectoryList.SetItemButtonAction(i, b =>
|
||||
{
|
||||
// Refresh the contact methods list
|
||||
RefreshContactMethodsModalList(dc);
|
||||
Parent.PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.MeetingsOrContacMethodsListVisible);
|
||||
}
|
||||
});
|
||||
if (!b)
|
||||
{
|
||||
// Refresh the contact methods list
|
||||
RefreshContactMethodsModalList(dc);
|
||||
Parent.PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.MeetingsOrContacMethodsListVisible);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
// If only one contact method, just dial that method
|
||||
DirectoryList.SetItemButtonAction(i, b => Codec.Dial(dc.ContactMethods[0].Number));
|
||||
}
|
||||
}
|
||||
else // is DirectoryFolder
|
||||
{
|
||||
@@ -685,9 +748,6 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||
var svc = Codec as IHasCodecSelfview;
|
||||
if (svc != null)
|
||||
{
|
||||
// Default Selfview to off
|
||||
svc.SelfviewModeOff();
|
||||
|
||||
TriList.SetSigFalseAction(UIBoolJoin.VCSelfViewTogglePress, svc.SelfviewModeToggle);
|
||||
svc.SelfviewIsOnFeedback.LinkInputSig(TriList.BooleanInput[UIBoolJoin.VCSelfViewTogglePress]);
|
||||
|
||||
@@ -964,7 +1024,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||
{
|
||||
if (DialStringBuilder.Length == 0 && !Codec.IsInCall)
|
||||
{
|
||||
return "Dial or touch to enter address";
|
||||
return "Dial or Tap to Show Keyboard";
|
||||
}
|
||||
if(Regex.Match(ds, @"^\d{4,7}$").Success) // 456-7890
|
||||
return string.Format("{0}-{1}", ds.Substring(0, 3), ds.Substring(3));
|
||||
@@ -985,7 +1045,8 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||
|
||||
enum eKeypadMode
|
||||
{
|
||||
Dial, DTMF
|
||||
Dial = 0,
|
||||
DTMF
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user