mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-08 09:15:06 +00:00
Merge pull request #391 from PepperDash/hotfix/fix-joinedsiginterlock-nullref
Hotfix/fix joinedsiginterlock nullref
This commit is contained in:
@@ -349,7 +349,7 @@ namespace PepperDash.Essentials
|
|||||||
// Check if the popup interlock is shown, and if one of the header popups is current, then show the carets subpage
|
// Check if the popup interlock is shown, and if one of the header popups is current, then show the carets subpage
|
||||||
if (e.IsShown)
|
if (e.IsShown)
|
||||||
{
|
{
|
||||||
if (e.NewJoin == Parent.EnvironmentDriver.BackgroundSubpageJoin)
|
if (Parent.EnvironmentDriver != null && e.NewJoin == Parent.EnvironmentDriver.BackgroundSubpageJoin)
|
||||||
headerPopupShown = true;
|
headerPopupShown = true;
|
||||||
else if (e.NewJoin == UIBoolJoin.HeaderActiveCallsListVisible)
|
else if (e.NewJoin == UIBoolJoin.HeaderActiveCallsListVisible)
|
||||||
headerPopupShown = true;
|
headerPopupShown = true;
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ namespace PepperDash.Essentials
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// The parent driver for this
|
/// The parent driver for this
|
||||||
/// </summary>
|
/// </summary>
|
||||||
EssentialsPanelMainInterfaceDriver Parent;
|
private readonly EssentialsPanelMainInterfaceDriver _parent;
|
||||||
|
|
||||||
|
|
||||||
CTimer PositionTimer;
|
CTimer PositionTimer;
|
||||||
@@ -32,34 +32,46 @@ namespace PepperDash.Essentials
|
|||||||
public ScreenSaverController(EssentialsPanelMainInterfaceDriver parent, CrestronTouchpanelPropertiesConfig config)
|
public ScreenSaverController(EssentialsPanelMainInterfaceDriver parent, CrestronTouchpanelPropertiesConfig config)
|
||||||
: base(parent.TriList)
|
: base(parent.TriList)
|
||||||
{
|
{
|
||||||
Parent = parent;
|
_parent = parent;
|
||||||
|
|
||||||
PositionTimeoutMs = config.ScreenSaverMovePositionIntervalMs;
|
PositionTimeoutMs = config.ScreenSaverMovePositionIntervalMs;
|
||||||
|
|
||||||
TriList.SetSigFalseAction(UIBoolJoin.MCScreenSaverClosePress, () => this.Hide());
|
PositionJoins = new List<uint>() { UIBoolJoin.MCScreenSaverPosition1Visible, UIBoolJoin.MCScreenSaverPosition2Visible, UIBoolJoin.MCScreenSaverPosition3Visible, UIBoolJoin.MCScreenSaverPosition4Visible };
|
||||||
|
|
||||||
|
var cmdName = String.Format("shwscrsvr-{0}", config.IpId);
|
||||||
|
|
||||||
|
CrestronConsole.AddNewConsoleCommand((o) => Show(), cmdName, "Shows Panel Screensaver", ConsoleAccessLevelEnum.AccessOperator);
|
||||||
|
|
||||||
|
TriList.SetSigFalseAction(UIBoolJoin.MCScreenSaverClosePress, Hide);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Show()
|
public override void Show()
|
||||||
{
|
{
|
||||||
TriList.SetBool(UIBoolJoin.MCScreenSaverVisible, true);
|
_parent.AvDriver.PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.MCScreenSaverVisible);
|
||||||
Parent.AvDriver.PopupInterlock.ShowInterlockedWithToggle(UIBoolJoin.MCScreenSaverVisible);
|
|
||||||
//TriList.SetBool(UIBoolJoin.MCScreenSaverVisible, true);
|
|
||||||
|
|
||||||
CurrentPositionIndex = 0;
|
CurrentPositionIndex = 0;
|
||||||
SetCurrentPosition();
|
SetCurrentPosition();
|
||||||
|
StartPositionTimer();
|
||||||
|
|
||||||
|
base.Show();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Hide()
|
||||||
|
{
|
||||||
|
if (PositionTimer != null)
|
||||||
|
{
|
||||||
|
PositionTimer.Stop();
|
||||||
|
PositionTimer.Dispose();
|
||||||
|
PositionTimer = null;
|
||||||
|
}
|
||||||
|
|
||||||
ClearAllPositions();
|
ClearAllPositions();
|
||||||
|
|
||||||
TriList.SetBool(UIBoolJoin.MCScreenSaverVisible, false);
|
_parent.AvDriver.PopupInterlock.HideAndClear();
|
||||||
Parent.AvDriver.PopupInterlock.HideAndClear();
|
|
||||||
//TriList.SetBool(UIBoolJoin.MCScreenSaverVisible, false);
|
|
||||||
|
|
||||||
base.Hide();
|
base.Hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void StartPositionTimer()
|
void StartPositionTimer()
|
||||||
{
|
{
|
||||||
if (PositionTimer == null)
|
if (PositionTimer == null)
|
||||||
|
|||||||
Reference in New Issue
Block a user