mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-04-13 04:26:49 +00:00
Combining repos
This commit is contained in:
parent
e196ad0419
commit
b5444e3544
358 changed files with 17256 additions and 10215 deletions
|
|
@ -0,0 +1,49 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
using Crestron.SimplSharpPro;
|
||||
using Crestron.SimplSharpPro.DeviceSupport;
|
||||
|
||||
using PepperDash.Core;
|
||||
|
||||
|
||||
namespace PepperDash.Essentials.Core.Presets
|
||||
{
|
||||
public class PresetsListSubpageReferenceListItem : SubpageReferenceListItem
|
||||
{
|
||||
DevicePresetsView View;
|
||||
PresetChannel Channel;
|
||||
|
||||
public PresetsListSubpageReferenceListItem(PresetChannel chan, uint index,
|
||||
SubpageReferenceList owner, DevicePresetsView view)
|
||||
: base(index, owner)
|
||||
{
|
||||
View = view;
|
||||
Channel = chan;
|
||||
owner.GetBoolFeedbackSig(index, 1).UserObject = new Action<bool>(b => { if (!b) view.Model.Dial((int)index); });
|
||||
Refresh();
|
||||
}
|
||||
|
||||
public override void Clear()
|
||||
{
|
||||
Owner.GetBoolFeedbackSig(Index, 1).UserObject = null;
|
||||
Owner.StringInputSig(Index, 1).StringValue = "";
|
||||
Owner.StringInputSig(Index, 2).StringValue = "";
|
||||
Owner.StringInputSig(Index, 3).StringValue = "";
|
||||
}
|
||||
|
||||
public override void Refresh()
|
||||
{
|
||||
var name = View.ShowName ? Channel.Name : "";
|
||||
Owner.StringInputSig(Index, 1).StringValue = name;
|
||||
var chan = View.ShowNumbers ? Channel.Channel : "";
|
||||
Owner.StringInputSig(Index, 2).StringValue = chan;
|
||||
var url = View.Model.ImagesLocalHostPrefix + View.Model.ImagesPathPrefix + Channel.IconUrl;
|
||||
Debug.Console(2, "icon url={0}", url);
|
||||
var icon = View.ShowIcon ? url : "";
|
||||
Owner.StringInputSig(Index, 3).StringValue = icon;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue