mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-01-28 11:54:57 +00:00
Calendar; ribbon with meeting info; fire up from either
This commit is contained in:
@@ -521,6 +521,18 @@ namespace PepperDash.Essentials
|
||||
/// 15046
|
||||
/// </summary>
|
||||
public const uint MeetingsListVisible = 15046;
|
||||
/// <summary>
|
||||
/// 15047 The "Join" button on the next meeting ribbon
|
||||
/// </summary>
|
||||
public const uint NextMeetingRibbonJoinPress = 15047;
|
||||
/// <summary>
|
||||
/// 15048 Dismisses the ribbon
|
||||
/// </summary>
|
||||
public const uint NextMeetingRibbonClosePress = 15048;
|
||||
/// <summary>
|
||||
/// 15049
|
||||
/// </summary>
|
||||
public const uint NextMeetingRibbonVisible = 15049;
|
||||
/// <summary>
|
||||
/// 15051
|
||||
/// </summary>
|
||||
|
||||
@@ -145,5 +145,26 @@ namespace PepperDash.Essentials
|
||||
/// 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;
|
||||
}
|
||||
}
|
||||
@@ -222,7 +222,6 @@ namespace PepperDash.Essentials
|
||||
() => PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.TechPanelSetupVisible));// ShowInterlockedModal(UIBoolJoin.TechPanelSetupVisible));
|
||||
TriList.SetSigFalseAction(UIBoolJoin.TechExitButton, () =>
|
||||
PopupInterlock.HideAndClear()); // HideCurrentInterlockedModal());
|
||||
#warning This gets overridden by config after NYU demo
|
||||
if(TriList is CrestronApp)
|
||||
TriList.BooleanInput[UIBoolJoin.GearButtonVisible].BoolValue = false;
|
||||
else
|
||||
|
||||
@@ -150,7 +150,7 @@ namespace PepperDash.Essentials
|
||||
get
|
||||
{
|
||||
if (_TechDriver == null)
|
||||
#warning Make PIN come from config!
|
||||
#warning HLV-Make PIN come from config!
|
||||
_TechDriver = new PepperDash.Essentials.UIDrivers.EssentialsHuddleTechPageDriver(TriList, this, "1234");
|
||||
return _TechDriver;
|
||||
}
|
||||
@@ -172,6 +172,8 @@ namespace PepperDash.Essentials
|
||||
/// </summary>
|
||||
UiDisplayMode CurrentMode = UiDisplayMode.Start;
|
||||
|
||||
CTimer NextMeetingTimer;
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
@@ -275,50 +277,8 @@ namespace PepperDash.Essentials
|
||||
|
||||
// *** Header Buttons ***
|
||||
|
||||
// Generic "close" button for these modals
|
||||
// Generic "close" button for popup modals
|
||||
TriList.SetSigFalseAction(UIBoolJoin.InterlockedModalClosePress, PopupInterlock.HideAndClear);
|
||||
|
||||
//// Help button and popup
|
||||
//if (CurrentRoom.Config.Help != null)
|
||||
//{
|
||||
// TriList.SetString(UIStringJoin.HelpMessage, roomConf.Help.Message);
|
||||
// TriList.SetBool(UIBoolJoin.HelpPageShowCallButtonVisible, roomConf.Help.ShowCallButton);
|
||||
// TriList.SetString(UIStringJoin.HelpPageCallButtonText, roomConf.Help.CallButtonText);
|
||||
// if(roomConf.Help.ShowCallButton)
|
||||
// TriList.SetSigFalseAction(UIBoolJoin.HelpPageShowCallButtonPress, () => { }); // ************ FILL IN
|
||||
// else
|
||||
// TriList.ClearBoolSigAction(UIBoolJoin.HelpPageShowCallButtonPress);
|
||||
//}
|
||||
//else // older config
|
||||
//{
|
||||
// TriList.SetString(UIStringJoin.HelpMessage, CurrentRoom.Config.HelpMessage);
|
||||
// TriList.SetBool(UIBoolJoin.HelpPageShowCallButtonVisible, false);
|
||||
// TriList.SetString(UIStringJoin.HelpPageCallButtonText, null);
|
||||
// TriList.ClearBoolSigAction(UIBoolJoin.HelpPageShowCallButtonPress);
|
||||
//}
|
||||
//TriList.SetSigFalseAction(UIBoolJoin.HelpPress, () =>
|
||||
//{
|
||||
// string message = null;
|
||||
// var room = DeviceManager.GetDeviceForKey(Config.DefaultRoomKey)
|
||||
// as EssentialsHuddleSpaceRoom;
|
||||
// if (room != null)
|
||||
// message = room.Config.HelpMessage;
|
||||
// else
|
||||
// message = "Sorry, no help message available. No room connected.";
|
||||
// //TriList.StringInput[UIStringJoin.HelpMessage].StringValue = message;
|
||||
// PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.HelpPageVisible);
|
||||
//});
|
||||
|
||||
//// Lights button
|
||||
//TriList.SetSigFalseAction(UIBoolJoin.HeaderLightsButtonPress, () => // ******************** FILL IN
|
||||
// { });
|
||||
|
||||
//// Setup button - shows volumes with default button OR hold for tech page
|
||||
//TriList.SetSigHeldAction(UIBoolJoin.HeaderGearButtonPress, 2000,
|
||||
// ShowTech,
|
||||
// () => PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.VolumesPageVisible));
|
||||
//TriList.SetSigFalseAction(UIBoolJoin.TechExitButton, () =>
|
||||
// PopupInterlock.HideAndClear());
|
||||
|
||||
// Volume related things
|
||||
TriList.SetSigFalseAction(UIBoolJoin.VolumeDefaultPress, () => CurrentRoom.SetDefaultLevels());
|
||||
@@ -340,6 +300,8 @@ namespace PepperDash.Essentials
|
||||
(CurrentRoom.DefaultDisplay as IPower).PowerToggle();
|
||||
});
|
||||
|
||||
SetupNextMeetingTimer();
|
||||
|
||||
base.Show();
|
||||
}
|
||||
|
||||
@@ -381,6 +343,9 @@ namespace PepperDash.Essentials
|
||||
TriList.BooleanInput[UIBoolJoin.StartPageVisible].BoolValue = false;
|
||||
TriList.BooleanInput[UIBoolJoin.TapToBeginVisible].BoolValue = false;
|
||||
TriList.BooleanInput[UIBoolJoin.SelectASourceVisible].BoolValue = false;
|
||||
if (NextMeetingTimer != null)
|
||||
NextMeetingTimer.Stop();
|
||||
HideNextMeetingRibbon();
|
||||
base.Hide();
|
||||
}
|
||||
|
||||
@@ -417,6 +382,52 @@ namespace PepperDash.Essentials
|
||||
}
|
||||
}
|
||||
|
||||
void SetupNextMeetingTimer()
|
||||
{
|
||||
var ss = CurrentRoom.ScheduleSource;
|
||||
if (ss != null)
|
||||
{
|
||||
#warning HLV-Add some sort of every-minute "cron" thing to run these.
|
||||
NextMeetingTimer = new CTimer(o =>
|
||||
{
|
||||
// Every 60 seconds, check meetings list for the closest, joinable meeting
|
||||
var meeting = ss.CodecSchedule.Meetings
|
||||
.Aggregate((m1, m2) => m1.StartTime < m2.StartTime ? m1 : m2);
|
||||
if (meeting != null && meeting.Joinable)
|
||||
{
|
||||
TriList.SetString(UIStringJoin.NextMeetingRibbonStartText, meeting.StartTime.ToShortTimeString());
|
||||
TriList.SetString(UIStringJoin.NextMeetingRibbonEndText, meeting.EndTime.ToShortTimeString());
|
||||
TriList.SetString(UIStringJoin.NextMeetingRibbonTitleText, meeting.Title);
|
||||
TriList.SetString(UIStringJoin.NextMettingRibbonNameText, meeting.Organizer);
|
||||
TriList.SetString(UIStringJoin.NextMeetingRibbonButtonLabel, "Join");
|
||||
TriList.SetSigFalseAction(UIBoolJoin.NextMeetingRibbonJoinPress, () =>
|
||||
{
|
||||
HideNextMeetingRibbon();
|
||||
RoomOnAndDialMeeting(meeting.ConferenceNumberToDial);
|
||||
});
|
||||
ShowNextMeetingRibbon();
|
||||
}
|
||||
}, null, 0, 60000);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
void ShowNextMeetingRibbon()
|
||||
{
|
||||
TriList.SetSigFalseAction(UIBoolJoin.NextMeetingRibbonClosePress, HideNextMeetingRibbon);
|
||||
TriList.SetBool(UIBoolJoin.NextMeetingRibbonVisible, true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
void HideNextMeetingRibbon()
|
||||
{
|
||||
TriList.SetBool(UIBoolJoin.NextMeetingRibbonVisible, false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Calendar should only be visible when it's supposed to
|
||||
/// </summary>
|
||||
@@ -426,6 +437,36 @@ namespace PepperDash.Essentials
|
||||
PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.MeetingsListVisible);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Dials a meeting after turning on room (if necessary)
|
||||
/// </summary>
|
||||
void RoomOnAndDialMeeting(string number)
|
||||
{
|
||||
Action dialAction = () =>
|
||||
{
|
||||
var d = CurrentRoom.ScheduleSource as VideoCodecBase;
|
||||
if (d != null)
|
||||
d.Dial(number);
|
||||
};
|
||||
if (CurrentRoom.OnFeedback.BoolValue)
|
||||
dialAction();
|
||||
else
|
||||
{
|
||||
// Rig a one-time handler to catch when the room is warmed and then dial call
|
||||
EventHandler<EventArgs> oneTimeHandler = null;
|
||||
oneTimeHandler = (o, a) =>
|
||||
{
|
||||
if (!CurrentRoom.IsWarmingUpFeedback.BoolValue)
|
||||
{
|
||||
CurrentRoom.IsWarmingUpFeedback.OutputChange -= oneTimeHandler;
|
||||
dialAction();
|
||||
}
|
||||
};
|
||||
CurrentRoom.IsWarmingUpFeedback.OutputChange += oneTimeHandler;
|
||||
ActivityCallButtonPressed();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reveals the tech page and puts away anything that's in the way.
|
||||
/// </summary>
|
||||
@@ -914,7 +955,7 @@ namespace PepperDash.Essentials
|
||||
PopupInterlock.Hide();
|
||||
var d = CurrentRoom.ScheduleSource as VideoCodecBase;
|
||||
if (d != null)
|
||||
d.Dial(mm.ConferenceNumberToDial);
|
||||
RoomOnAndDialMeeting(mm.ConferenceNumberToDial);
|
||||
});
|
||||
}
|
||||
MeetingsSrl.Count = i;
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||
{
|
||||
|
||||
|
||||
#warning FOR SPARK - (GFX also) we need a staging bar for in call state where there is no camera button
|
||||
#warning HLV - FOR SPARK - (GFX also) we need a staging bar for in call state where there is no camera button
|
||||
/// <summary>
|
||||
/// This fella will likely need to interact with the room's source, although that is routed via the spark...
|
||||
/// Probably needs event or FB to feed AV driver - to show two-mute volume when appropriate.
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user