mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-16 13:15:03 +00:00
fix show & hide methods
This commit is contained in:
@@ -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,38 @@ 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());
|
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()
|
||||||
|
{
|
||||||
|
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