mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-02 06:14:52 +00:00
Working on next meeting notification
This commit is contained in:
@@ -45,6 +45,10 @@ namespace PepperDash.Essentials
|
||||
/// 1005
|
||||
/// </summary>
|
||||
public const uint CallSharedSourceInfoEnable = 1005;
|
||||
/// <summary>
|
||||
/// 1006
|
||||
/// </summary>
|
||||
public const uint CallEndAllConfirmVisible = 1006;
|
||||
|
||||
|
||||
|
||||
@@ -365,27 +369,28 @@ namespace PepperDash.Essentials
|
||||
/// 3891
|
||||
/// </summary>
|
||||
public const uint VolumeDefaultPress = 3891;
|
||||
/// <summary>
|
||||
/// 3951
|
||||
/// </summary
|
||||
|
||||
public const uint HeaderIcon1Press = 3951;
|
||||
/// <summary>
|
||||
/// 3952
|
||||
/// </summary>
|
||||
public const uint HeaderIcon2Press = 3952;
|
||||
/// <summary>
|
||||
/// 3953
|
||||
/// </summary>
|
||||
public const uint HeaderIcon3Press = 3953;
|
||||
/// <summary>
|
||||
/// 3954
|
||||
/// </summary>
|
||||
public const uint HeaderIcon4Press = 3954;
|
||||
/// <summary>
|
||||
/// 3955
|
||||
/// </summary>
|
||||
public const uint HeaderIcon5Press = 3955;
|
||||
|
||||
/// <summary>
|
||||
/// 3991
|
||||
/// </summary>
|
||||
public const uint HeaderIcon1Press = 3991;
|
||||
/// <summary>
|
||||
/// 3992
|
||||
/// </summary>
|
||||
public const uint HeaderIcon2Press = 3992;
|
||||
/// <summary>
|
||||
/// 3993
|
||||
/// </summary>
|
||||
public const uint HeaderIcon3Press = 3993;
|
||||
/// <summary>
|
||||
/// 3994
|
||||
/// </summary>
|
||||
public const uint HeaderIcon4Press = 3994;
|
||||
/// <summary>
|
||||
/// 3995
|
||||
/// </summary>
|
||||
public const uint HeaderIcon5Press = 3995;
|
||||
/// <summary>
|
||||
/// 3999
|
||||
/// </summary>
|
||||
@@ -457,6 +462,10 @@ namespace PepperDash.Essentials
|
||||
/// 15018 The Header with dynamic buttons
|
||||
/// </summary>
|
||||
public const uint TopBarHabaneroDynamicVisible = 15018;
|
||||
/// <summary>
|
||||
/// 15019 Shown when system is starting and not ready for use
|
||||
/// </summary>
|
||||
public const uint SystemInitializingVisible = 15019;
|
||||
/// <summary>
|
||||
/// 15020
|
||||
/// </summary>
|
||||
@@ -560,7 +569,7 @@ namespace PepperDash.Essentials
|
||||
/// <summary>
|
||||
/// 15047 The "Join" button on the next meeting ribbon
|
||||
/// </summary>
|
||||
public const uint NextMeetingRibbonJoinPress = 15047;
|
||||
public const uint NextMeetingJoinPress = 15047;
|
||||
/// <summary>
|
||||
/// 15048 Dismisses the ribbon
|
||||
/// </summary>
|
||||
|
||||
@@ -168,7 +168,10 @@ namespace PepperDash.Essentials
|
||||
/// 3916 The "active call" label
|
||||
/// </summary>
|
||||
public const uint HeaderCallStatusLabel = 3916;
|
||||
|
||||
/// <summary>
|
||||
/// 3919 Mesage on init page
|
||||
/// </summary>
|
||||
public const uint SystemInitializingMessage = 3919;
|
||||
/// <summary>
|
||||
/// 3922
|
||||
/// </summary>
|
||||
@@ -182,6 +185,27 @@ namespace PepperDash.Essentials
|
||||
/// </summary>
|
||||
public const uint HelpPageCallButtonText = 3924;
|
||||
|
||||
/// <summary>
|
||||
/// 3951
|
||||
/// </summary>
|
||||
public const uint HeaderButtonIcon1 = 3951;
|
||||
/// <summary>
|
||||
/// 3952
|
||||
/// </summary>
|
||||
public const uint HeaderButtonIcon2 = 3952;
|
||||
/// <summary>
|
||||
/// 3953
|
||||
/// </summary>
|
||||
public const uint HeaderButtonIcon3 = 3953;
|
||||
/// <summary>
|
||||
/// 3954
|
||||
/// </summary>
|
||||
public const uint HeaderButtonIcon4 = 3954;
|
||||
/// <summary>
|
||||
/// 3955
|
||||
/// </summary>
|
||||
public const uint HeaderButtonIcon5 = 3955;
|
||||
|
||||
/// <summary>
|
||||
/// 3961 Name of source on display 1
|
||||
/// </summary>
|
||||
@@ -202,23 +226,23 @@ namespace PepperDash.Essentials
|
||||
/// <summary>
|
||||
/// 3966
|
||||
/// </summary>
|
||||
public const uint NextMeetingRibbonStartText = 3966;
|
||||
public const uint NextMeetingStartTimeText = 3966;
|
||||
/// <summary>
|
||||
/// 3967
|
||||
/// </summary>
|
||||
public const uint NextMeetingRibbonEndText = 3967;
|
||||
public const uint NextMeetingEndTimeText = 3967;
|
||||
/// <summary>
|
||||
/// 3968
|
||||
/// </summary>
|
||||
public const uint NextMeetingRibbonTitleText = 3968;
|
||||
public const uint NextMeetingTitleText = 3968;
|
||||
/// <summary>
|
||||
/// 3969
|
||||
/// </summary>
|
||||
public const uint NextMettingRibbonNameText = 3969;
|
||||
public const uint NextMeetingNameText = 3969;
|
||||
/// <summary>
|
||||
/// 3970
|
||||
/// </summary>
|
||||
public const uint NextMeetingRibbonButtonLabel = 3970;
|
||||
public const uint NextMeetingButtonLabel = 3970;
|
||||
/// <summary>
|
||||
/// 3971
|
||||
/// </summary>
|
||||
@@ -227,37 +251,19 @@ namespace PepperDash.Essentials
|
||||
/// 3972
|
||||
/// </summary>
|
||||
public const uint NextMeetingFollowingMeetingText = 3972;
|
||||
|
||||
/// <summary>
|
||||
/// 3991
|
||||
/// </summary>
|
||||
public const uint HeaderButtonIcon1 = 3991;
|
||||
/// <summary>
|
||||
/// 3992
|
||||
/// </summary>
|
||||
public const uint HeaderButtonIcon2 = 3992;
|
||||
/// <summary>
|
||||
/// 3993
|
||||
/// </summary>
|
||||
public const uint HeaderButtonIcon3 = 3993;
|
||||
/// <summary>
|
||||
/// 3994
|
||||
/// </summary>
|
||||
public const uint HeaderButtonIcon4 = 3994;
|
||||
/// <summary>
|
||||
/// 3995
|
||||
/// </summary>
|
||||
public const uint HeaderButtonIcon5 = 3995;
|
||||
|
||||
/// <summary>
|
||||
/// 3996
|
||||
/// 3976
|
||||
/// </summary>
|
||||
public const uint MeetingsOrContactMethodListIcon = 3996;
|
||||
public const uint MeetingsOrContactMethodListIcon = 3976;
|
||||
/// <summary>
|
||||
/// 3977
|
||||
/// </summary>
|
||||
public const uint MeetingsOrContactMethodListTitleText = 3977;
|
||||
|
||||
/// <summary>
|
||||
/// 3997
|
||||
/// </summary>
|
||||
public const uint MeetingsOrContactMethodListTitleText = 3997;
|
||||
|
||||
// ------------------------------------
|
||||
//
|
||||
// MODAL JOINS 3991 - 3999
|
||||
//
|
||||
// ------------------------------------
|
||||
}
|
||||
}
|
||||
@@ -184,7 +184,11 @@ namespace PepperDash.Essentials
|
||||
/// Tracks whether the user dismissed the meeting popup, while the system was on. Always false when
|
||||
/// system is off.
|
||||
/// </summary>
|
||||
DateTime NextMeetingWarningDismissedTime;
|
||||
bool NextMeetingWarningWasDismissed;
|
||||
/// <summary>
|
||||
/// Tracks the last meeting that was cancelled
|
||||
/// </summary>
|
||||
Meeting LastMeetingDismissed;
|
||||
|
||||
|
||||
|
||||
@@ -326,6 +330,7 @@ namespace PepperDash.Essentials
|
||||
/// </summary>
|
||||
void ShowActiveCallsList()
|
||||
{
|
||||
TriList.SetBool(UIBoolJoin.CallEndAllConfirmVisible, true);
|
||||
if(PopupInterlock.CurrentJoin == UIBoolJoin.HeaderActiveCallsListVisible)
|
||||
PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.HeaderActiveCallsListVisible);
|
||||
else
|
||||
@@ -417,59 +422,78 @@ namespace PepperDash.Essentials
|
||||
var ss = CurrentRoom.ScheduleSource;
|
||||
if (ss != null)
|
||||
{
|
||||
NextMeetingTimer = new CTimer(o =>
|
||||
{
|
||||
if (CurrentRoom.OnFeedback.BoolValue)
|
||||
return;
|
||||
// Every 60 seconds, check meetings list for the closest, joinable meeting
|
||||
var meetings = ss.CodecSchedule.Meetings;
|
||||
if (meetings.Count > 0)
|
||||
{
|
||||
var meeting = meetings.FirstOrDefault(m => m.Joinable);
|
||||
|
||||
//var meeting = meetings.Aggregate((m1, m2) => m1.StartTime < m2.StartTime ? m1 : m2);
|
||||
|
||||
|
||||
#warning PICK UP CALENDAR TIME HERE
|
||||
if (meeting != null)// && NextMeetingWarningDismissedTime != null
|
||||
//&& (DateTime.Now - NextMeetingWarningDismissedTime).Minutes > 5) // && 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, () =>
|
||||
{
|
||||
HideNextMeetingPopup();
|
||||
RoomOnAndDialMeeting(meeting);
|
||||
});
|
||||
TriList.SetString(UIStringJoin.NextMeetingSecondaryButtonLabel, "Show Schedule");
|
||||
TriList.SetSigFalseAction(UIBoolJoin.CalendarHeaderButtonPress, () =>
|
||||
{
|
||||
HideNextMeetingPopup();
|
||||
CalendarPress();
|
||||
});
|
||||
if (meetings.Count > 1)
|
||||
{
|
||||
TriList.SetString(UIStringJoin.NextMeetingFollowingMeetingText,
|
||||
meetings[1].StartTime.ToShortTimeString());
|
||||
}
|
||||
|
||||
ShowNextMeetingPopup();
|
||||
}
|
||||
}
|
||||
}, null, 0, 60000);
|
||||
NextMeetingTimer = new CTimer(o => ShowNextMeetingCallback(), null, 0, 60000);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
void ShowNextMeetingPopup()
|
||||
void ShowNextMeetingCallback()
|
||||
{
|
||||
TriList.SetSigFalseAction(UIBoolJoin.NextMeetingModalClosePress, HideNextMeetingPopup);
|
||||
TriList.SetBool(UIBoolJoin.NextMeetingModalVisible, true);
|
||||
// Every 60 seconds, check meetings list for the closest, joinable meeting
|
||||
var ss = CurrentRoom.ScheduleSource;
|
||||
var meetings = ss.CodecSchedule.Meetings;
|
||||
Debug.Console(0, "***** Checking meetings *****");
|
||||
foreach (var m in meetings)
|
||||
Debug.Console(0, "****** {0} {1} ******", m.StartTime.ToShortTimeString(), m.Joinable);
|
||||
|
||||
if (meetings.Count > 0)
|
||||
{
|
||||
var meeting = meetings.FirstOrDefault(m => m.Joinable);
|
||||
|
||||
// If the room is off pester the user
|
||||
// If the room is on, and the meeting is joinable
|
||||
// and the LastMeetingDismissed != this meeting
|
||||
|
||||
if (CurrentRoom.OnFeedback.BoolValue
|
||||
&& LastMeetingDismissed == meeting)
|
||||
//|| (LastMeetingDismissed != null && !LastMeetingDismissed.Joinable)))
|
||||
{
|
||||
Debug.Console(0, "****** Ignoring previously cancelled meeting warning ******");
|
||||
return;
|
||||
}
|
||||
|
||||
LastMeetingDismissed = null;
|
||||
if (meeting != null)
|
||||
{
|
||||
Debug.Console(0, "***** First joinable meeting: {0} {1}", meeting.StartTime.ToShortTimeString(), meeting.Joinable);
|
||||
TriList.SetString(UIStringJoin.MeetingsOrContactMethodListTitleText, "Upcoming meeting");
|
||||
TriList.SetString(UIStringJoin.NextMeetingStartTimeText, meeting.StartTime.ToShortTimeString());
|
||||
TriList.SetString(UIStringJoin.NextMeetingEndTimeText, meeting.EndTime.ToShortTimeString());
|
||||
TriList.SetString(UIStringJoin.NextMeetingTitleText, meeting.Title);
|
||||
TriList.SetString(UIStringJoin.NextMeetingNameText, meeting.Organizer);
|
||||
TriList.SetString(UIStringJoin.NextMeetingButtonLabel, "Join");
|
||||
TriList.SetSigFalseAction(UIBoolJoin.NextMeetingJoinPress, () =>
|
||||
{
|
||||
HideNextMeetingPopup();
|
||||
RoomOnAndDialMeeting(meeting);
|
||||
});
|
||||
TriList.SetString(UIStringJoin.NextMeetingSecondaryButtonLabel, "Show Schedule");
|
||||
TriList.SetSigFalseAction(UIBoolJoin.CalendarHeaderButtonPress, () =>
|
||||
{
|
||||
HideNextMeetingPopup();
|
||||
CalendarPress();
|
||||
});
|
||||
var indexOfNext = meetings.IndexOf(meeting) + 1;
|
||||
|
||||
// indexOf = 3, 4 meetings :
|
||||
if (indexOfNext < meetings.Count)
|
||||
{
|
||||
TriList.SetString(UIStringJoin.NextMeetingFollowingMeetingText,
|
||||
meetings[indexOfNext].StartTime.ToShortTimeString());
|
||||
}
|
||||
TriList.SetSigFalseAction(UIBoolJoin.NextMeetingModalClosePress, () =>
|
||||
{
|
||||
// Mark the meeting to not re-harass the user
|
||||
if(CurrentRoom.OnFeedback.BoolValue)
|
||||
LastMeetingDismissed = meeting;
|
||||
HideNextMeetingPopup();
|
||||
});
|
||||
|
||||
TriList.SetBool(UIBoolJoin.NextMeetingModalVisible, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -478,6 +502,7 @@ namespace PepperDash.Essentials
|
||||
void HideNextMeetingPopup()
|
||||
{
|
||||
TriList.SetBool(UIBoolJoin.NextMeetingModalVisible, false);
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -1007,7 +1032,7 @@ namespace PepperDash.Essentials
|
||||
// //TriList.StringInput[UIStringJoin.HelpMessage].StringValue = message;
|
||||
// PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.HelpPageVisible);
|
||||
//});
|
||||
uint nextJoin = 3993;
|
||||
uint nextJoin = 3953;
|
||||
|
||||
// Lights button
|
||||
//if (WHATEVER MAKES LIGHTS WORK)
|
||||
@@ -1041,7 +1066,7 @@ namespace PepperDash.Essentials
|
||||
nextJoin--;
|
||||
|
||||
// blank any that remain
|
||||
for (var i = nextJoin; i > 3990; i--)
|
||||
for (var i = nextJoin; i > 3950; i--)
|
||||
{
|
||||
//var blankBut = new HeaderListButton(HeaderButtonsList, i);
|
||||
//blankBut.ClearIcon();
|
||||
@@ -1053,13 +1078,13 @@ namespace PepperDash.Essentials
|
||||
|
||||
// Set Call Status Subpage Position
|
||||
|
||||
if (nextJoin == 1)
|
||||
if (nextJoin == 3951)
|
||||
{
|
||||
// Set to right position
|
||||
TriList.SetBool(UIBoolJoin.HeaderCallStatusLeftPositionVisible, false);
|
||||
TriList.SetBool(UIBoolJoin.HeaderCallStatusRightPositionVisible, true);
|
||||
}
|
||||
else if (nextJoin == 0)
|
||||
else if (nextJoin == 3950)
|
||||
{
|
||||
// Set to left position
|
||||
TriList.SetBool(UIBoolJoin.HeaderCallStatusLeftPositionVisible, true);
|
||||
@@ -1080,11 +1105,11 @@ namespace PepperDash.Essentials
|
||||
//HeaderCallButton.SetIcon(HeaderListButton.OnHook);
|
||||
}
|
||||
else if (codec.ActiveCalls.Any(c => c.Type == eCodecCallType.Video))
|
||||
HeaderCallButtonIconSig.StringValue = "Camera";
|
||||
HeaderCallButtonIconSig.StringValue = "Misc-06_Dark";
|
||||
//HeaderCallButton.SetIcon(HeaderListButton.Camera);
|
||||
//TriList.SetUshort(UIUshortJoin.CallHeaderButtonMode, 2);
|
||||
else
|
||||
HeaderCallButtonIconSig.StringValue = "Phone";
|
||||
HeaderCallButtonIconSig.StringValue = "Misc-09_Dark";
|
||||
//HeaderCallButton.SetIcon(HeaderListButton.Phone);
|
||||
//TriList.SetUshort(UIUshortJoin.CallHeaderButtonMode, 1);
|
||||
|
||||
@@ -1180,6 +1205,8 @@ namespace PepperDash.Essentials
|
||||
SetActivityFooterFeedbacks();
|
||||
TriList.BooleanInput[UIBoolJoin.VolumeDualMute1Visible].BoolValue = false;
|
||||
TriList.BooleanInput[UIBoolJoin.SourceStagingBarVisible].BoolValue = false;
|
||||
// Clear this so that the pesky meeting warning can resurface every minute when off
|
||||
LastMeetingDismissed = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -829,7 +829,6 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||
else if (e.SpecialKey == KeyboardSpecialKey.GoButton)
|
||||
{
|
||||
ConnectPress();
|
||||
Parent.Keyboard.Hide();
|
||||
}
|
||||
}
|
||||
DialStringFeedback.FireUpdate();
|
||||
@@ -935,6 +934,8 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||
/// </summary>
|
||||
void ConnectPress()
|
||||
{
|
||||
if (Parent.Keyboard != null)
|
||||
Parent.Keyboard.Hide();
|
||||
Codec.Dial(DialStringBuilder.ToString());
|
||||
}
|
||||
|
||||
@@ -957,6 +958,7 @@ namespace PepperDash.Essentials.UIDrivers.VC
|
||||
DialStringFeedback.FireUpdate();
|
||||
// no delete key in this mode!
|
||||
}
|
||||
DialStringTextCheckEnables();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user