mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-04-12 03:57:27 +00:00
Countdown timer seconds on modal 390; 359 auto-on source
This commit is contained in:
parent
057d8ac5f5
commit
de8c7477b8
10 changed files with 49 additions and 8 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -78,6 +78,8 @@ namespace PepperDash.Essentials
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string SourceListKey { get; set; }
|
public string SourceListKey { get; set; }
|
||||||
|
|
||||||
|
public string DefaultSourceItem { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// If room is off, enables power on to last source. Default true
|
/// If room is off, enables power on to last source. Default true
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -191,6 +193,15 @@ namespace PepperDash.Essentials
|
||||||
RunRouteAction("roomOff");
|
RunRouteAction("roomOff");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Routes the default source item, if any
|
||||||
|
/// </summary>
|
||||||
|
public void RunDefaultRoute()
|
||||||
|
{
|
||||||
|
if (DefaultSourceItem != null)
|
||||||
|
RunRouteAction(DefaultSourceItem);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,7 @@ namespace PepperDash.Essentials
|
||||||
var audio = DeviceManager.GetDeviceForKey(props.DefaultAudioKey) as IRoutingSinkNoSwitching;
|
var audio = DeviceManager.GetDeviceForKey(props.DefaultAudioKey) as IRoutingSinkNoSwitching;
|
||||||
var huddle = new EssentialsHuddleSpaceRoom(Key, Name, disp, audio, props);
|
var huddle = new EssentialsHuddleSpaceRoom(Key, Name, disp, audio, props);
|
||||||
huddle.SourceListKey = props.SourceListKey;
|
huddle.SourceListKey = props.SourceListKey;
|
||||||
|
huddle.DefaultSourceItem = props.DefaultSourceItem;
|
||||||
return huddle;
|
return huddle;
|
||||||
}
|
}
|
||||||
else if (typeName == "presentation")
|
else if (typeName == "presentation")
|
||||||
|
|
@ -85,6 +86,7 @@ namespace PepperDash.Essentials
|
||||||
public string DefaultDisplayKey { get; set; }
|
public string DefaultDisplayKey { get; set; }
|
||||||
public string DefaultAudioKey { get; set; }
|
public string DefaultAudioKey { get; set; }
|
||||||
public string SourceListKey { get; set; }
|
public string SourceListKey { get; set; }
|
||||||
|
public string DefaultSourceItem { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
|
|
@ -349,6 +349,9 @@ namespace PepperDash.Essentials
|
||||||
TriList.BooleanInput[UIBoolJoin.StartPageVisible].BoolValue = false;
|
TriList.BooleanInput[UIBoolJoin.StartPageVisible].BoolValue = false;
|
||||||
TriList.BooleanInput[UIBoolJoin.StagingPageVisible].BoolValue = true;
|
TriList.BooleanInput[UIBoolJoin.StagingPageVisible].BoolValue = true;
|
||||||
TriList.BooleanInput[UIBoolJoin.SelectASourceVisible].BoolValue = true;
|
TriList.BooleanInput[UIBoolJoin.SelectASourceVisible].BoolValue = true;
|
||||||
|
// Run default source when room is off and share is pressed
|
||||||
|
if (!CurrentRoom.OnFeedback.BoolValue)
|
||||||
|
CurrentRoom.RunDefaultRoute();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ShowInterlockedModal(uint join)
|
void ShowInterlockedModal(uint join)
|
||||||
|
|
@ -486,13 +489,17 @@ namespace PepperDash.Essentials
|
||||||
PowerDownModal = new ModalDialog(TriList);
|
PowerDownModal = new ModalDialog(TriList);
|
||||||
var message = string.Format("Meeting will end in {0} seconds", CurrentRoom.ShutdownPromptSeconds);
|
var message = string.Format("Meeting will end in {0} seconds", CurrentRoom.ShutdownPromptSeconds);
|
||||||
|
|
||||||
// figure out a cleaner way to update gauge
|
//// figure out a cleaner way to update gauge
|
||||||
var gauge = CurrentRoom.ShutdownPromptTimer.PercentFeedback;
|
//var gauge = CurrentRoom.ShutdownPromptTimer.PercentFeedback;
|
||||||
EventHandler<EventArgs> gaugeHandler = null;
|
//EventHandler<EventArgs> gaugeHandler = null;
|
||||||
gaugeHandler = (o, a) => TriList.UShortInput[ModalDialog.TimerGaugeJoin].UShortValue =
|
//gaugeHandler = (o, a) => TriList.UShortInput[ModalDialog.TimerGaugeJoin].UShortValue =
|
||||||
(ushort)(gauge.UShortValue * 65535 / 100);
|
// (ushort)(gauge.UShortValue * 65535 / 100);
|
||||||
gauge.OutputChange += gaugeHandler;
|
//gauge.OutputChange += gaugeHandler;
|
||||||
|
|
||||||
|
// Attach timer things to modal
|
||||||
|
CurrentRoom.ShutdownPromptTimer.TimeRemainingFeedback.OutputChange += ShutdownPromptTimer_TimeRemainingFeedback_OutputChange;
|
||||||
|
CurrentRoom.ShutdownPromptTimer.PercentFeedback.OutputChange += ShutdownPromptTimer_PercentFeedback_OutputChange;
|
||||||
|
|
||||||
// respond to offs by cancelling dialog
|
// respond to offs by cancelling dialog
|
||||||
var onFb = CurrentRoom.OnFeedback;
|
var onFb = CurrentRoom.OnFeedback;
|
||||||
EventHandler<EventArgs> offHandler = null;
|
EventHandler<EventArgs> offHandler = null;
|
||||||
|
|
@ -503,7 +510,7 @@ namespace PepperDash.Essentials
|
||||||
EndMeetingButtonSig.BoolValue = false;
|
EndMeetingButtonSig.BoolValue = false;
|
||||||
PowerDownModal.HideDialog();
|
PowerDownModal.HideDialog();
|
||||||
onFb.OutputChange -= offHandler;
|
onFb.OutputChange -= offHandler;
|
||||||
gauge.OutputChange -= gaugeHandler;
|
//gauge.OutputChange -= gaugeHandler;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
onFb.OutputChange += offHandler;
|
onFb.OutputChange += offHandler;
|
||||||
|
|
@ -528,6 +535,9 @@ namespace PepperDash.Essentials
|
||||||
{
|
{
|
||||||
Debug.Console(2, "*#*UI shutdown prompt finished");
|
Debug.Console(2, "*#*UI shutdown prompt finished");
|
||||||
EndMeetingButtonSig.BoolValue = false;
|
EndMeetingButtonSig.BoolValue = false;
|
||||||
|
CurrentRoom.ShutdownPromptTimer.TimeRemainingFeedback.OutputChange -= ShutdownPromptTimer_TimeRemainingFeedback_OutputChange;
|
||||||
|
CurrentRoom.ShutdownPromptTimer.PercentFeedback.OutputChange -= ShutdownPromptTimer_PercentFeedback_OutputChange;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -541,6 +551,22 @@ namespace PepperDash.Essentials
|
||||||
if (PowerDownModal != null)
|
if (PowerDownModal != null)
|
||||||
PowerDownModal.HideDialog();
|
PowerDownModal.HideDialog();
|
||||||
EndMeetingButtonSig.BoolValue = false;
|
EndMeetingButtonSig.BoolValue = false;
|
||||||
|
|
||||||
|
CurrentRoom.ShutdownPromptTimer.TimeRemainingFeedback.OutputChange += ShutdownPromptTimer_TimeRemainingFeedback_OutputChange;
|
||||||
|
CurrentRoom.ShutdownPromptTimer.PercentFeedback.OutputChange -= ShutdownPromptTimer_PercentFeedback_OutputChange;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ShutdownPromptTimer_TimeRemainingFeedback_OutputChange(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
var message = string.Format("Meeting will end in {0} seconds", (sender as StringFeedback).StringValue);
|
||||||
|
TriList.StringInput[ModalDialog.MessageTextJoin].StringValue = message;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ShutdownPromptTimer_PercentFeedback_OutputChange(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var value = (ushort)((sender as IntFeedback).UShortValue * 65535 / 100);
|
||||||
|
TriList.UShortInput[ModalDialog.TimerGaugeJoin].UShortValue = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
|
|
@ -6,4 +6,6 @@ devjson:1 {"deviceKey":"timer","methodName":"Start" }
|
||||||
|
|
||||||
devjson:1 {"deviceKey":"timer","methodName":"Cancel" }
|
devjson:1 {"deviceKey":"timer","methodName":"Cancel" }
|
||||||
|
|
||||||
devjson:1 {"deviceKey":"timer","methodName":"Reset" }
|
devjson:1 {"deviceKey":"timer","methodName":"Reset" }
|
||||||
|
|
||||||
|
devjson:1 {"deviceKey":"room1","methodName":"Shutdown" }
|
||||||
Loading…
Add table
Add a link
Reference in a new issue