mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-12 19:24:53 +00:00
Combining repos
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
using Crestron.SimplSharpPro.DeviceSupport;
|
||||
using PepperDash.Essentials.Core;
|
||||
|
||||
namespace PepperDash.Essentials.Core.PageManagers
|
||||
{
|
||||
public class DiscPlayerMediumPageManager : MediumLeftSwitchablePageManager
|
||||
{
|
||||
IDiscPlayerControls Player;
|
||||
|
||||
public DiscPlayerMediumPageManager(IDiscPlayerControls player, BasicTriListWithSmartObject trilist)
|
||||
: base(player.DisplayUiType)
|
||||
{
|
||||
Player = player;
|
||||
TriList = trilist;
|
||||
}
|
||||
|
||||
public override void Show()
|
||||
{
|
||||
uint offset = GetOffsetJoin();
|
||||
BackingPageJoin = offset + 1;
|
||||
AllLeftSubpages = new uint[] { 7, 8 };
|
||||
|
||||
if (LeftSubpageJoin == 0)
|
||||
LeftSubpageJoin = offset + 8; // default to transport
|
||||
TriList.BooleanInput[BackingPageJoin].BoolValue = true;
|
||||
TriList.BooleanInput[LeftSubpageJoin].BoolValue = true;
|
||||
|
||||
// Attach buttons to interlock
|
||||
foreach(var p in AllLeftSubpages)
|
||||
{
|
||||
var p2 = p; // scope
|
||||
TriList.SetSigFalseAction(10000 + p2, () => InterlockLeftSubpage(p2));
|
||||
}
|
||||
}
|
||||
|
||||
public override void Hide()
|
||||
{
|
||||
TriList.BooleanInput[BackingPageJoin].BoolValue = false;
|
||||
TriList.BooleanInput[LeftSubpageJoin].BoolValue = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user