mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-04-12 12:06:58 +00:00
#675 Adds UserPromptedForCode event and method to show code on CiscoSparkCodec
This commit is contained in:
parent
3a4737b6f6
commit
1e755df9bb
2 changed files with 12 additions and 0 deletions
|
|
@ -20,6 +20,8 @@ namespace PepperDash.Essentials.Core.DeviceTypeInterfaces
|
|||
{
|
||||
event EventHandler<EventArgs> UserCodeChanged;
|
||||
|
||||
event EventHandler<EventArgs> UserPromptedForCode;
|
||||
|
||||
string UserCode { get; }
|
||||
|
||||
string QrCodeUrl { get; }
|
||||
|
|
|
|||
|
|
@ -490,11 +490,21 @@ namespace PepperDash.Essentials.Devices.Common.VideoCodec.Cisco
|
|||
Debug.Console(2, this, "Setting QR code URL: {0}", mcBridge.QrCodeUrl);
|
||||
|
||||
mcBridge.UserCodeChanged += (o, a) => SendMcBrandingUrl(mcBridge);
|
||||
mcBridge.UserPromptedForCode += (o, a) => DisplayUserCode(mcBridge.UserCode);
|
||||
|
||||
SendMcBrandingUrl(mcBridge);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Displays the code for the specified duration
|
||||
/// </summary>
|
||||
/// <param name="code">Mobile Control user code</param>
|
||||
private void DisplayUserCode(string code)
|
||||
{
|
||||
SendText(string.Format("xcommand userinterface message alert display title:\"Mobile Control User Code:\" text:\"{0}\" duration: 30"));
|
||||
}
|
||||
|
||||
private void SendMcBrandingUrl(IMobileControlRoomBridge mcBridge)
|
||||
{
|
||||
if (mcBridge == null)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue