mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 12:44:58 +00:00
Lots of f-words
This commit is contained in:
Binary file not shown.
@@ -77,7 +77,6 @@ namespace PepperDash.Essentials.Core
|
|||||||
BasicTriList TriList;
|
BasicTriList TriList;
|
||||||
|
|
||||||
Action<uint> ModalCompleteAction;
|
Action<uint> ModalCompleteAction;
|
||||||
//CTimer Timer;
|
|
||||||
|
|
||||||
static object CompleteActionLock = new object();
|
static object CompleteActionLock = new object();
|
||||||
|
|
||||||
@@ -148,13 +147,21 @@ namespace PepperDash.Essentials.Core
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Hide dialog from elsewhere, fires no actions^
|
/// Hide dialog from elsewhere, fires CompleteAction
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void CancelDialog()
|
public void CancelDialog()
|
||||||
{
|
{
|
||||||
OnModalComplete(0);
|
OnModalComplete(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Hides dialog. Fires no action
|
||||||
|
/// </summary>
|
||||||
|
public void HideDialog()
|
||||||
|
{
|
||||||
|
TriList.BooleanInput[ModalVisibleJoin].BoolValue = false;
|
||||||
|
}
|
||||||
|
|
||||||
// When the modal is cleared or times out, clean up the various bits
|
// When the modal is cleared or times out, clean up the various bits
|
||||||
void OnModalComplete(uint buttonNum)
|
void OnModalComplete(uint buttonNum)
|
||||||
{
|
{
|
||||||
@@ -162,10 +169,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
|
|
||||||
var action = ModalCompleteAction;
|
var action = ModalCompleteAction;
|
||||||
if (action != null)
|
if (action != null)
|
||||||
{
|
|
||||||
//Debug.Console(2, "Modal complete action");
|
|
||||||
action(buttonNum);
|
action(buttonNum);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -179,9 +179,6 @@ namespace PepperDash.Essentials
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public override void Show()
|
public override void Show()
|
||||||
{
|
{
|
||||||
if(CurrentRoom != null)
|
|
||||||
CurrentRoom.OnFeedback.OutputChange += new EventHandler<EventArgs>(OnFeedback_OutputChange);
|
|
||||||
|
|
||||||
TriList.BooleanInput[UIBoolJoin.TopBarVisible].BoolValue = true;
|
TriList.BooleanInput[UIBoolJoin.TopBarVisible].BoolValue = true;
|
||||||
TriList.BooleanInput[UIBoolJoin.ActivityFooterVisible].BoolValue = true;
|
TriList.BooleanInput[UIBoolJoin.ActivityFooterVisible].BoolValue = true;
|
||||||
|
|
||||||
@@ -218,19 +215,12 @@ namespace PepperDash.Essentials
|
|||||||
// Note: some of these are not directly-related to the huddle space UI, but are held over
|
// Note: some of these are not directly-related to the huddle space UI, but are held over
|
||||||
// in case
|
// in case
|
||||||
TriList.SetSigFalseAction(UIBoolJoin.ShowPowerOffPress, PowerButtonPressed);
|
TriList.SetSigFalseAction(UIBoolJoin.ShowPowerOffPress, PowerButtonPressed);
|
||||||
TriList.SetSigFalseAction(UIBoolJoin.PowerOffCancelPress, CancelPowerOff);
|
|
||||||
TriList.SetSigFalseAction(UIBoolJoin.PowerOffConfirmPress, FinishPowerOff);
|
|
||||||
TriList.SetSigFalseAction(UIBoolJoin.PowerOffMorePress, () =>
|
TriList.SetSigFalseAction(UIBoolJoin.PowerOffMorePress, () =>
|
||||||
{
|
{
|
||||||
CancelPowerOffTimer();
|
CancelPowerOffTimer();
|
||||||
TriList.BooleanInput[UIBoolJoin.PowerOffStep1Visible].BoolValue = false;
|
TriList.BooleanInput[UIBoolJoin.PowerOffStep1Visible].BoolValue = false;
|
||||||
TriList.BooleanInput[UIBoolJoin.PowerOffStep2Visible].BoolValue = true;
|
TriList.BooleanInput[UIBoolJoin.PowerOffStep2Visible].BoolValue = true;
|
||||||
});
|
});
|
||||||
TriList.SetSigFalseAction(UIBoolJoin.AllRoomsOffPress, () =>
|
|
||||||
{
|
|
||||||
EssentialsHuddleSpaceRoom.AllRoomsOff();
|
|
||||||
CancelPowerOff();
|
|
||||||
});
|
|
||||||
TriList.SetSigFalseAction(UIBoolJoin.DisplayPowerTogglePress, () =>
|
TriList.SetSigFalseAction(UIBoolJoin.DisplayPowerTogglePress, () =>
|
||||||
{
|
{
|
||||||
if (CurrentRoom != null && CurrentRoom.DefaultDisplay is IPower)
|
if (CurrentRoom != null && CurrentRoom.DefaultDisplay is IPower)
|
||||||
@@ -245,24 +235,13 @@ namespace PepperDash.Essentials
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sender"></param>
|
/// <param name="sender"></param>
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
void OnFeedback_OutputChange(object sender, EventArgs e)
|
//void OnFeedback_OutputChange(object sender, EventArgs e)
|
||||||
{
|
//{
|
||||||
if (CurrentRoom.OnFeedback.BoolValue)
|
|
||||||
{
|
//}
|
||||||
TriList.BooleanInput[UIBoolJoin.VolumeSingleMute1Visible].BoolValue = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
TriList.BooleanInput[UIBoolJoin.VolumeSingleMute1Visible].BoolValue = false;
|
|
||||||
TriList.BooleanInput[UIBoolJoin.StagingPageVisible].BoolValue = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Hide()
|
public override void Hide()
|
||||||
{
|
{
|
||||||
if (CurrentRoom != null)
|
|
||||||
CurrentRoom.OnFeedback.OutputChange -= OnFeedback_OutputChange;
|
|
||||||
|
|
||||||
HideAndClearCurrentDisplayModeSigsInUse();
|
HideAndClearCurrentDisplayModeSigsInUse();
|
||||||
TriList.BooleanInput[UIBoolJoin.TopBarVisible].BoolValue = false;
|
TriList.BooleanInput[UIBoolJoin.TopBarVisible].BoolValue = false;
|
||||||
TriList.BooleanInput[UIBoolJoin.ActivityFooterVisible].BoolValue = false;
|
TriList.BooleanInput[UIBoolJoin.ActivityFooterVisible].BoolValue = false;
|
||||||
@@ -271,7 +250,7 @@ namespace PepperDash.Essentials
|
|||||||
TriList.BooleanInput[UIBoolJoin.SelectASourceVisible].BoolValue = false;
|
TriList.BooleanInput[UIBoolJoin.SelectASourceVisible].BoolValue = false;
|
||||||
//TriList.BooleanInput[UIBoolJoin.StagingPageVisible].BoolValue = false;
|
//TriList.BooleanInput[UIBoolJoin.StagingPageVisible].BoolValue = false;
|
||||||
VolumeButtonsPopupFeedback.ClearNow();
|
VolumeButtonsPopupFeedback.ClearNow();
|
||||||
CancelPowerOff();
|
//CancelPowerOff();
|
||||||
|
|
||||||
base.Hide();
|
base.Hide();
|
||||||
}
|
}
|
||||||
@@ -330,6 +309,7 @@ namespace PepperDash.Essentials
|
|||||||
b => { if (!b) ShareButtonPressed(); }));
|
b => { if (!b) ShareButtonPressed(); }));
|
||||||
ActivityFooterSrl.Count = 1;
|
ActivityFooterSrl.Count = 1;
|
||||||
TriList.UShortInput[UIUshortJoin.PresentationListCaretMode].UShortValue = 0;
|
TriList.UShortInput[UIUshortJoin.PresentationListCaretMode].UShortValue = 0;
|
||||||
|
ShareButtonSig.BoolValue = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -352,13 +332,13 @@ namespace PepperDash.Essentials
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
void ShareButtonPressed()
|
void ShareButtonPressed()
|
||||||
{
|
{
|
||||||
if (!_CurrentRoom.OnFeedback.BoolValue)
|
//if (!_CurrentRoom.OnFeedback.BoolValue)
|
||||||
{
|
//{
|
||||||
ShareButtonSig.BoolValue = true;
|
ShareButtonSig.BoolValue = true;
|
||||||
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;
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
uint CurrentInterlockedModalJoin;
|
uint CurrentInterlockedModalJoin;
|
||||||
@@ -486,6 +466,7 @@ namespace PepperDash.Essentials
|
|||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
void ShutdownPromptTimer_HasStarted(object sender, EventArgs e)
|
void ShutdownPromptTimer_HasStarted(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
|
||||||
// Do we need to check where the UI is? No?
|
// Do we need to check where the UI is? No?
|
||||||
var timer = CurrentRoom.ShutdownPromptTimer;
|
var timer = CurrentRoom.ShutdownPromptTimer;
|
||||||
EndMeetingButtonSig.BoolValue = true;
|
EndMeetingButtonSig.BoolValue = true;
|
||||||
@@ -495,6 +476,29 @@ namespace PepperDash.Essentials
|
|||||||
{
|
{
|
||||||
var modal = new ModalDialog(TriList);
|
var modal = 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
|
||||||
|
var gauge = CurrentRoom.ShutdownPromptTimer.PercentFeedback;
|
||||||
|
EventHandler<EventArgs> gaugeHandler = null;
|
||||||
|
gaugeHandler = (o, a) => TriList.UShortInput[ModalDialog.TimerGaugeJoin].UShortValue =
|
||||||
|
(ushort)(gauge.UShortValue * 65535 / 100);
|
||||||
|
gauge.OutputChange += gaugeHandler;
|
||||||
|
|
||||||
|
// respond to offs by cancelling dialog
|
||||||
|
var onFb = CurrentRoom.OnFeedback;
|
||||||
|
EventHandler<EventArgs> offHandler = null;
|
||||||
|
offHandler = (o, a) =>
|
||||||
|
{
|
||||||
|
if (!onFb.BoolValue)
|
||||||
|
{
|
||||||
|
EndMeetingButtonSig.BoolValue = false;
|
||||||
|
modal.HideDialog();
|
||||||
|
onFb.OutputChange -= offHandler;
|
||||||
|
gauge.OutputChange -= gaugeHandler;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
onFb.OutputChange += offHandler;
|
||||||
|
|
||||||
modal.PresentModalDialog(2, "End Meeting", "Power", message, "Cancel", "End Meeting Now", true,
|
modal.PresentModalDialog(2, "End Meeting", "Power", message, "Cancel", "End Meeting Now", true,
|
||||||
but =>
|
but =>
|
||||||
{
|
{
|
||||||
@@ -513,7 +517,8 @@ namespace PepperDash.Essentials
|
|||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
void ShutdownPromptTimer_HasFinished(object sender, EventArgs e)
|
void ShutdownPromptTimer_HasFinished(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
ShareButtonSig.BoolValue = true; // restore Share fb
|
|
||||||
|
Debug.Console(2, "UI shutdown prompt finished");
|
||||||
EndMeetingButtonSig.BoolValue = false;
|
EndMeetingButtonSig.BoolValue = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -524,6 +529,8 @@ namespace PepperDash.Essentials
|
|||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
void ShutdownPromptTimer_WasCancelled(object sender, EventArgs e)
|
void ShutdownPromptTimer_WasCancelled(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
Debug.Console(2, "UI shutdown prompt cancelled");
|
||||||
|
ShareButtonSig.BoolValue = true; // restore Share fb
|
||||||
EndMeetingButtonSig.BoolValue = false;
|
EndMeetingButtonSig.BoolValue = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -542,23 +549,23 @@ namespace PepperDash.Essentials
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Runs the power off function on the current room
|
/// Runs the power off function on the current room
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void FinishPowerOff()
|
//public void FinishPowerOff()
|
||||||
{
|
//{
|
||||||
if (CurrentRoom == null)
|
// if (CurrentRoom == null)
|
||||||
return;
|
// return;
|
||||||
CurrentRoom.RunRouteAction("roomOff");
|
// CurrentRoom.RunRouteAction("roomOff");
|
||||||
CancelPowerOff();
|
// CancelPowerOff();
|
||||||
}
|
//}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Hides power off pages and stops timer
|
/// Hides power off pages and stops timer
|
||||||
/// </summary>
|
/// </summary>
|
||||||
void CancelPowerOff()
|
//void CancelPowerOff()
|
||||||
{
|
//{
|
||||||
CancelPowerOffTimer();
|
// CancelPowerOffTimer();
|
||||||
TriList.BooleanInput[UIBoolJoin.PowerOffStep1Visible].BoolValue = false;
|
// TriList.BooleanInput[UIBoolJoin.PowerOffStep1Visible].BoolValue = false;
|
||||||
TriList.BooleanInput[UIBoolJoin.PowerOffStep2Visible].BoolValue = false;
|
// TriList.BooleanInput[UIBoolJoin.PowerOffStep2Visible].BoolValue = false;
|
||||||
}
|
//}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
@@ -612,11 +619,14 @@ namespace PepperDash.Essentials
|
|||||||
if (_CurrentRoom != null)
|
if (_CurrentRoom != null)
|
||||||
{
|
{
|
||||||
// Disconnect current room
|
// Disconnect current room
|
||||||
_CurrentRoom.OnFeedback.OutputChange -= _CurrentRoom_OnFeedback_OutputChange;
|
_CurrentRoom.OnFeedback.OutputChange -= CurrentRoom_OnFeedback_OutputChange;
|
||||||
_CurrentRoom.CurrentVolumeDeviceChange -= this._CurrentRoom_CurrentAudioDeviceChange;
|
_CurrentRoom.CurrentVolumeDeviceChange -= this.CurrentRoom_CurrentAudioDeviceChange;
|
||||||
ClearAudioDeviceConnections();
|
ClearAudioDeviceConnections();
|
||||||
_CurrentRoom.CurrentSingleSourceChange -= this._CurrentRoom_SourceInfoChange;
|
_CurrentRoom.CurrentSingleSourceChange -= this.CurrentRoom_SourceInfoChange;
|
||||||
DisconnectSource(_CurrentRoom.CurrentSourceInfo);
|
DisconnectSource(_CurrentRoom.CurrentSourceInfo);
|
||||||
|
_CurrentRoom.ShutdownPromptTimer.HasStarted -= ShutdownPromptTimer_HasStarted;
|
||||||
|
_CurrentRoom.ShutdownPromptTimer.HasFinished -= ShutdownPromptTimer_HasFinished;
|
||||||
|
_CurrentRoom.ShutdownPromptTimer.WasCancelled -= ShutdownPromptTimer_WasCancelled;
|
||||||
}
|
}
|
||||||
_CurrentRoom = room;
|
_CurrentRoom = room;
|
||||||
|
|
||||||
@@ -654,16 +664,15 @@ namespace PepperDash.Essentials
|
|||||||
TriList.StringInput[UIStringJoin.CurrentRoomName].StringValue = _CurrentRoom.Name;
|
TriList.StringInput[UIStringJoin.CurrentRoomName].StringValue = _CurrentRoom.Name;
|
||||||
|
|
||||||
// Shutdown timer
|
// Shutdown timer
|
||||||
//_CurrentRoom.ShutdownPromptTimer.IsRunningFeedback.OutputChange += Shutdown_IsRunningFeedback_OutputChange;
|
|
||||||
_CurrentRoom.ShutdownPromptTimer.HasStarted += ShutdownPromptTimer_HasStarted;
|
_CurrentRoom.ShutdownPromptTimer.HasStarted += ShutdownPromptTimer_HasStarted;
|
||||||
_CurrentRoom.ShutdownPromptTimer.HasFinished += ShutdownPromptTimer_HasFinished;
|
_CurrentRoom.ShutdownPromptTimer.HasFinished += ShutdownPromptTimer_HasFinished;
|
||||||
_CurrentRoom.ShutdownPromptTimer.WasCancelled += ShutdownPromptTimer_WasCancelled;
|
_CurrentRoom.ShutdownPromptTimer.WasCancelled += ShutdownPromptTimer_WasCancelled;
|
||||||
|
|
||||||
// Link up all the change events from the room
|
// Link up all the change events from the room
|
||||||
_CurrentRoom.OnFeedback.OutputChange += _CurrentRoom_OnFeedback_OutputChange;
|
_CurrentRoom.OnFeedback.OutputChange += CurrentRoom_OnFeedback_OutputChange;
|
||||||
_CurrentRoom.CurrentVolumeDeviceChange += _CurrentRoom_CurrentAudioDeviceChange;
|
_CurrentRoom.CurrentVolumeDeviceChange += CurrentRoom_CurrentAudioDeviceChange;
|
||||||
RefreshAudioDeviceConnections();
|
RefreshAudioDeviceConnections();
|
||||||
_CurrentRoom.CurrentSingleSourceChange += _CurrentRoom_SourceInfoChange;
|
_CurrentRoom.CurrentSingleSourceChange += CurrentRoom_SourceInfoChange;
|
||||||
RefreshSourceInfo();
|
RefreshSourceInfo();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -676,19 +685,22 @@ namespace PepperDash.Essentials
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// For room on/off changes
|
/// For room on/off changes
|
||||||
/// </summary>
|
/// </summary>
|
||||||
void _CurrentRoom_OnFeedback_OutputChange(object sender, EventArgs e)
|
void CurrentRoom_OnFeedback_OutputChange(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
var value = _CurrentRoom.OnFeedback.BoolValue;
|
var value = _CurrentRoom.OnFeedback.BoolValue;
|
||||||
TriList.BooleanInput[UIBoolJoin.RoomIsOn].BoolValue = value;
|
TriList.BooleanInput[UIBoolJoin.RoomIsOn].BoolValue = value;
|
||||||
if (value)
|
if (value) //ON
|
||||||
{
|
{
|
||||||
SetupActivityFooterWhenRoomOn();
|
SetupActivityFooterWhenRoomOn();
|
||||||
TriList.BooleanInput[UIBoolJoin.StartPageVisible].BoolValue = false;
|
TriList.BooleanInput[UIBoolJoin.StartPageVisible].BoolValue = false;
|
||||||
|
TriList.BooleanInput[UIBoolJoin.VolumeSingleMute1Visible].BoolValue = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetupActivityFooterWhenRoomOff();
|
SetupActivityFooterWhenRoomOff();
|
||||||
TriList.BooleanInput[UIBoolJoin.StartPageVisible].BoolValue = true;
|
TriList.BooleanInput[UIBoolJoin.StartPageVisible].BoolValue = true;
|
||||||
|
TriList.BooleanInput[UIBoolJoin.VolumeSingleMute1Visible].BoolValue = false;
|
||||||
|
TriList.BooleanInput[UIBoolJoin.StagingPageVisible].BoolValue = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -848,7 +860,7 @@ namespace PepperDash.Essentials
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Handler for when the room's volume control device changes
|
/// Handler for when the room's volume control device changes
|
||||||
/// </summary>
|
/// </summary>
|
||||||
void _CurrentRoom_CurrentAudioDeviceChange(object sender, VolumeDeviceChangeEventArgs args)
|
void CurrentRoom_CurrentAudioDeviceChange(object sender, VolumeDeviceChangeEventArgs args)
|
||||||
{
|
{
|
||||||
if (args.Type == ChangeType.WillChange)
|
if (args.Type == ChangeType.WillChange)
|
||||||
ClearAudioDeviceConnections();
|
ClearAudioDeviceConnections();
|
||||||
@@ -859,7 +871,7 @@ namespace PepperDash.Essentials
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Handles source change
|
/// Handles source change
|
||||||
/// </summary>
|
/// </summary>
|
||||||
void _CurrentRoom_SourceInfoChange(EssentialsRoomBase room,
|
void CurrentRoom_SourceInfoChange(EssentialsRoomBase room,
|
||||||
SourceListItem info, ChangeType change)
|
SourceListItem info, ChangeType change)
|
||||||
{
|
{
|
||||||
if (change == ChangeType.WillChange)
|
if (change == ChangeType.WillChange)
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user