diff --git a/PepperDashEssentials/UIDrivers/EssentialsHuddle/EssentialsHuddlePanelAvFunctionsDriver.cs b/PepperDashEssentials/UIDrivers/EssentialsHuddle/EssentialsHuddlePanelAvFunctionsDriver.cs
index f22565e5..459e709b 100644
--- a/PepperDashEssentials/UIDrivers/EssentialsHuddle/EssentialsHuddlePanelAvFunctionsDriver.cs
+++ b/PepperDashEssentials/UIDrivers/EssentialsHuddle/EssentialsHuddlePanelAvFunctionsDriver.cs
@@ -2,13 +2,11 @@
using System.Collections.Generic;
using Crestron.SimplSharp;
using Crestron.SimplSharpPro;
-using Crestron.SimplSharpPro.UI;
-
using PepperDash.Core;
using PepperDash.Essentials.Core;
using PepperDash.Essentials.Core.Config;
-using PepperDash.Essentials.Core.SmartObjects;
using PepperDash.Essentials.Core.PageManagers;
+using PepperDash.Essentials.UIDrivers;
namespace PepperDash.Essentials
{
@@ -17,7 +15,7 @@ namespace PepperDash.Essentials
///
public class EssentialsHuddlePanelAvFunctionsDriver : PanelDriverBase, IAVDriver
{
- CrestronTouchpanelPropertiesConfig Config;
+ private readonly CrestronTouchpanelPropertiesConfig _config;
public enum UiDisplayMode
{
@@ -38,8 +36,8 @@ namespace PepperDash.Essentials
///
public uint VolumeButtonPopupTimeout
{
- get { return VolumeButtonsPopupFeedback.TimeoutMs; }
- set { VolumeButtonsPopupFeedback.TimeoutMs = value; }
+ get { return _volumeButtonsPopupFeedback.TimeoutMs; }
+ set { _volumeButtonsPopupFeedback.TimeoutMs = value; }
}
///
@@ -47,8 +45,8 @@ namespace PepperDash.Essentials
///
public uint VolumeGaugePopupTimeout
{
- get { return VolumeGaugeFeedback.TimeoutMs; }
- set { VolumeGaugeFeedback.TimeoutMs = value; }
+ get { return _volumeGaugeFeedback.TimeoutMs; }
+ set { _volumeGaugeFeedback.TimeoutMs = value; }
}
///
@@ -56,21 +54,12 @@ namespace PepperDash.Essentials
///
public uint PowerOffTimeout { get; set; }
- ///
- ///
- ///
- public string DefaultRoomKey
- {
- get { return _DefaultRoomKey; }
- set
- {
- _DefaultRoomKey = value;
- //CurrentRoom = DeviceManager.GetDeviceForKey(value) as EssentialsHuddleSpaceRoom;
- }
- }
- string _DefaultRoomKey;
+ ///
+ ///
+ ///
+ public string DefaultRoomKey { get; set; }
- ///
+ ///
/// Indicates that the SetHeaderButtons method has completed successfully
///
public bool HeaderButtonsAreSetUp { get; private set; }
@@ -80,13 +69,13 @@ namespace PepperDash.Essentials
///
public EssentialsHuddleSpaceRoom CurrentRoom
{
- get { return _CurrentRoom; }
+ get { return _currentRoom; }
set
{
SetCurrentRoom(value);
}
}
- EssentialsHuddleSpaceRoom _CurrentRoom;
+ EssentialsHuddleSpaceRoom _currentRoom;
///
///
@@ -96,88 +85,86 @@ namespace PepperDash.Essentials
///
/// For hitting feedback
///
- BoolInputSig ShareButtonSig;
- BoolInputSig EndMeetingButtonSig;
+ private readonly BoolInputSig _shareButtonSig;
+ private BoolInputSig _endMeetingButtonSig;
///
/// Controls the extended period that the volume gauge shows on-screen,
/// as triggered by Volume up/down operations
///
- BoolFeedbackPulseExtender VolumeGaugeFeedback;
+ private readonly BoolFeedbackPulseExtender _volumeGaugeFeedback;
///
/// Controls the period that the volume buttons show on non-hard-button
/// interfaces
///
- BoolFeedbackPulseExtender VolumeButtonsPopupFeedback;
+ private readonly BoolFeedbackPulseExtender _volumeButtonsPopupFeedback;
///
/// The parent driver for this
///
- public PanelDriverBase Parent { get; private set; }
+ private readonly PanelDriverBase _parent;
///
/// All children attached to this driver. For hiding and showing as a group.
///
- List ChildDrivers = new List();
+ private List _childDrivers = new List();
- List CurrentDisplayModeSigsInUse = new List();
+ private readonly List _currentDisplayModeSigsInUse = new List();
//// Important smart objects
///
/// Smart Object 3200
///
- SubpageReferenceList SourcesSrl;
+ private readonly SubpageReferenceList _sourcesSrl;
///
/// Smart Object 15022
///
- SubpageReferenceList ActivityFooterSrl;
+ private readonly SubpageReferenceList _activityFooterSrl;
///
/// Tracks which audio page group the UI is in
///
- UiDisplayMode CurrentDisplayMode;
+ private UiDisplayMode _currentDisplayMode;
///
/// The AV page mangagers that have been used, to keep them alive for later
///
- Dictionary
void ShowCurrentDisplayModeSigsInUse()
{
- foreach (var sig in CurrentDisplayModeSigsInUse)
+ foreach (var sig in _currentDisplayModeSigsInUse)
sig.BoolValue = true;
}
@@ -516,9 +511,9 @@ namespace PepperDash.Essentials
///
void HideAndClearCurrentDisplayModeSigsInUse()
{
- foreach (var sig in CurrentDisplayModeSigsInUse)
+ foreach (var sig in _currentDisplayModeSigsInUse)
sig.BoolValue = false;
- CurrentDisplayModeSigsInUse.Clear();
+ _currentDisplayModeSigsInUse.Clear();
}
///
@@ -526,7 +521,7 @@ namespace PepperDash.Essentials
///
public override void BackButtonPressed()
{
- switch (CurrentDisplayMode)
+ switch (_currentDisplayMode)
{
case UiDisplayMode.PresentationMode:
//CancelReturnToSourceTimer();
@@ -541,7 +536,7 @@ namespace PepperDash.Essentials
void BackToHome()
{
Hide();
- Parent.Show();
+ _parent.Show();
}
///
@@ -553,26 +548,28 @@ namespace PepperDash.Essentials
return;
var uiDev = CurrentRoom.CurrentSourceInfo.SourceDevice as IUiDisplayInfo;
- PageManager pm = null;
- // If we need a page manager, get an appropriate one
- if (uiDev != null)
- {
- TriList.BooleanInput[UIBoolJoin.SelectASourceVisible].BoolValue = false;
- // Got an existing page manager, get it
- if (PageManagers.ContainsKey(uiDev))
- pm = PageManagers[uiDev];
- // Otherwise make an apporiate one
- else if (uiDev is ISetTopBoxControls)
- //pm = new SetTopBoxMediumPageManager(uiDev as ISetTopBoxControls, TriList);
- pm = new SetTopBoxThreePanelPageManager(uiDev as ISetTopBoxControls, TriList);
- else if (uiDev is IDiscPlayerControls)
- pm = new DiscPlayerMediumPageManager(uiDev as IDiscPlayerControls, TriList);
- else
- pm = new DefaultPageManager(uiDev, TriList);
- PageManagers[uiDev] = pm;
- CurrentSourcePageManager = pm;
- pm.Show();
- }
+ // If we need a page manager, get an appropriate one
+ if (uiDev == null)
+ {
+ return;
+ }
+
+ TriList.BooleanInput[UIBoolJoin.SelectASourceVisible].BoolValue = false;
+ // Got an existing page manager, get it
+ PageManager pm;
+ if (_pageManagers.ContainsKey(uiDev))
+ pm = _pageManagers[uiDev];
+ // Otherwise make an apporiate one
+ else if (uiDev is ISetTopBoxControls)
+ //pm = new SetTopBoxMediumPageManager(uiDev as ISetTopBoxControls, TriList);
+ pm = new SetTopBoxThreePanelPageManager(uiDev as ISetTopBoxControls, TriList);
+ else if (uiDev is IDiscPlayerControls)
+ pm = new DiscPlayerMediumPageManager(uiDev as IDiscPlayerControls, TriList);
+ else
+ pm = new DefaultPageManager(uiDev, TriList);
+ _pageManagers[uiDev] = pm;
+ _currentSourcePageManager = pm;
+ pm.Show();
}
///
@@ -583,7 +580,7 @@ namespace PepperDash.Essentials
void UiSelectSource(string key)
{
// Run the route and when it calls back, show the source
- CurrentRoom.RunRouteAction(key, new Action(() => { }));
+ CurrentRoom.RunRouteAction(key, () => { });
}
///
@@ -607,12 +604,12 @@ namespace PepperDash.Essentials
{
// Do we need to check where the UI is? No?
var timer = CurrentRoom.ShutdownPromptTimer;
- EndMeetingButtonSig.BoolValue = true;
- ShareButtonSig.BoolValue = false;
+ _endMeetingButtonSig.BoolValue = true;
+ _shareButtonSig.BoolValue = false;
if (CurrentRoom.ShutdownType == eShutdownType.Manual || CurrentRoom.ShutdownType == eShutdownType.Vacancy)
{
- PowerDownModal = new ModalDialog(TriList);
+ _powerDownModal = new ModalDialog(TriList);
var message = string.Format("Meeting will end in {0} seconds", CurrentRoom.ShutdownPromptSeconds);
// Attach timer things to modal
@@ -626,15 +623,15 @@ namespace PepperDash.Essentials
{
if (!onFb.BoolValue)
{
- EndMeetingButtonSig.BoolValue = false;
- PowerDownModal.HideDialog();
+ _endMeetingButtonSig.BoolValue = false;
+ _powerDownModal.HideDialog();
onFb.OutputChange -= offHandler;
//gauge.OutputChange -= gaugeHandler;
}
};
onFb.OutputChange += offHandler;
- PowerDownModal.PresentModalDialog(2, "End Meeting", "Power", message, "Cancel", "End Meeting Now", true, true,
+ _powerDownModal.PresentModalDialog(2, "End Meeting", "Power", message, "Cancel", "End Meeting Now", true, true,
but =>
{
if (but != 2) // any button except for End cancels
@@ -652,7 +649,7 @@ namespace PepperDash.Essentials
///
void ShutdownPromptTimer_HasFinished(object sender, EventArgs e)
{
- EndMeetingButtonSig.BoolValue = false;
+ _endMeetingButtonSig.BoolValue = false;
CurrentRoom.ShutdownPromptTimer.TimeRemainingFeedback.OutputChange -= ShutdownPromptTimer_TimeRemainingFeedback_OutputChange;
CurrentRoom.ShutdownPromptTimer.PercentFeedback.OutputChange -= ShutdownPromptTimer_PercentFeedback_OutputChange;
}
@@ -664,10 +661,10 @@ namespace PepperDash.Essentials
///
void ShutdownPromptTimer_WasCancelled(object sender, EventArgs e)
{
- if (PowerDownModal != null)
- PowerDownModal.HideDialog();
- EndMeetingButtonSig.BoolValue = false;
- ShareButtonSig.BoolValue = CurrentRoom.OnFeedback.BoolValue;
+ if (_powerDownModal != null)
+ _powerDownModal.HideDialog();
+ _endMeetingButtonSig.BoolValue = false;
+ _shareButtonSig.BoolValue = CurrentRoom.OnFeedback.BoolValue;
CurrentRoom.ShutdownPromptTimer.TimeRemainingFeedback.OutputChange += ShutdownPromptTimer_TimeRemainingFeedback_OutputChange;
CurrentRoom.ShutdownPromptTimer.PercentFeedback.OutputChange -= ShutdownPromptTimer_PercentFeedback_OutputChange;
@@ -675,27 +672,38 @@ namespace PepperDash.Essentials
void ShutdownPromptTimer_TimeRemainingFeedback_OutputChange(object sender, EventArgs e)
{
+ var stringFeedback = sender as StringFeedback;
+ if (stringFeedback == null)
+ {
+ return;
+ }
- var message = string.Format("Meeting will end in {0} seconds", (sender as StringFeedback).StringValue);
+ var message = string.Format("Meeting will end in {0} seconds", stringFeedback.StringValue);
TriList.StringInput[ModalDialog.MessageTextJoin].StringValue = message;
}
- void ShutdownPromptTimer_PercentFeedback_OutputChange(object sender, EventArgs e)
- {
- var value = (ushort)((sender as IntFeedback).UShortValue * 65535 / 100);
- TriList.UShortInput[ModalDialog.TimerGaugeJoin].UShortValue = value;
- }
+ void ShutdownPromptTimer_PercentFeedback_OutputChange(object sender, EventArgs e)
+ {
+ var intFeedback = sender as IntFeedback;
+ if (intFeedback == null)
+ {
+ return;
+ }
+ var value = (ushort)(intFeedback.UShortValue * 65535 / 100);
+ TriList.UShortInput[ModalDialog.TimerGaugeJoin].UShortValue = value;
+ }
- ///
+ ///
///
///
void CancelPowerOffTimer()
{
- if (PowerOffTimer != null)
- {
- PowerOffTimer.Stop();
- PowerOffTimer = null;
- }
+ if (_powerOffTimer == null)
+ {
+ return;
+ }
+ _powerOffTimer.Stop();
+ _powerOffTimer = null;
}
///
@@ -703,13 +711,13 @@ namespace PepperDash.Essentials
///
void VolumeButtonsTogglePress()
{
- if (VolumeButtonsPopupFeedback.BoolValue)
- VolumeButtonsPopupFeedback.ClearNow();
+ if (_volumeButtonsPopupFeedback.BoolValue)
+ _volumeButtonsPopupFeedback.ClearNow();
else
{
// Trigger the popup
- VolumeButtonsPopupFeedback.BoolValue = true;
- VolumeButtonsPopupFeedback.BoolValue = false;
+ _volumeButtonsPopupFeedback.BoolValue = true;
+ _volumeButtonsPopupFeedback.BoolValue = false;
}
}
@@ -721,8 +729,8 @@ namespace PepperDash.Essentials
{
// extend timeouts
if (ShowVolumeGauge)
- VolumeGaugeFeedback.BoolValue = state;
- VolumeButtonsPopupFeedback.BoolValue = state;
+ _volumeGaugeFeedback.BoolValue = state;
+ _volumeButtonsPopupFeedback.BoolValue = state;
if (CurrentRoom.CurrentVolumeControls != null)
CurrentRoom.CurrentVolumeControls.VolumeUp(state);
}
@@ -735,8 +743,8 @@ namespace PepperDash.Essentials
{
// extend timeouts
if (ShowVolumeGauge)
- VolumeGaugeFeedback.BoolValue = state;
- VolumeButtonsPopupFeedback.BoolValue = state;
+ _volumeGaugeFeedback.BoolValue = state;
+ _volumeButtonsPopupFeedback.BoolValue = state;
if (CurrentRoom.CurrentVolumeControls != null)
CurrentRoom.CurrentVolumeControls.VolumeDown(state);
}
@@ -747,31 +755,31 @@ namespace PepperDash.Essentials
///
public void RefreshCurrentRoom(EssentialsHuddleSpaceRoom room)
{
- if (_CurrentRoom != null)
+ if (_currentRoom != null)
{
// Disconnect current room
- _CurrentRoom.CurrentVolumeDeviceChange -= this.CurrentRoom_CurrentAudioDeviceChange;
+ _currentRoom.CurrentVolumeDeviceChange -= CurrentRoom_CurrentAudioDeviceChange;
ClearAudioDeviceConnections();
- _CurrentRoom.CurrentSourceChange -= this.CurrentRoom_SourceInfoChange;
- DisconnectSource(_CurrentRoom.CurrentSourceInfo);
- _CurrentRoom.ShutdownPromptTimer.HasStarted -= ShutdownPromptTimer_HasStarted;
- _CurrentRoom.ShutdownPromptTimer.HasFinished -= ShutdownPromptTimer_HasFinished;
- _CurrentRoom.ShutdownPromptTimer.WasCancelled -= ShutdownPromptTimer_WasCancelled;
+ _currentRoom.CurrentSourceChange -= CurrentRoom_SourceInfoChange;
+ DisconnectSource(_currentRoom.CurrentSourceInfo);
+ _currentRoom.ShutdownPromptTimer.HasStarted -= ShutdownPromptTimer_HasStarted;
+ _currentRoom.ShutdownPromptTimer.HasFinished -= ShutdownPromptTimer_HasFinished;
+ _currentRoom.ShutdownPromptTimer.WasCancelled -= ShutdownPromptTimer_WasCancelled;
- _CurrentRoom.OnFeedback.OutputChange -= CurrentRoom_OnFeedback_OutputChange;
- _CurrentRoom.IsWarmingUpFeedback.OutputChange -= CurrentRoom_IsWarmingFeedback_OutputChange;
- _CurrentRoom.IsCoolingDownFeedback.OutputChange -= IsCoolingDownFeedback_OutputChange;
+ _currentRoom.OnFeedback.OutputChange -= CurrentRoom_OnFeedback_OutputChange;
+ _currentRoom.IsWarmingUpFeedback.OutputChange -= CurrentRoom_IsWarmingFeedback_OutputChange;
+ _currentRoom.IsCoolingDownFeedback.OutputChange -= IsCoolingDownFeedback_OutputChange;
}
- _CurrentRoom = room;
+ _currentRoom = room;
- if (_CurrentRoom != null)
+ if (_currentRoom != null)
{
// get the source list config and set up the source list
var config = ConfigReader.ConfigObject.SourceLists;
- if (config.ContainsKey(_CurrentRoom.SourceListKey))
+ if (config.ContainsKey(_currentRoom.SourceListKey))
{
- var srcList = config[_CurrentRoom.SourceListKey];
+ var srcList = config[_currentRoom.SourceListKey];
// Setup sources list
uint i = 1; // counter for UI list
foreach (var kvp in srcList)
@@ -788,16 +796,16 @@ namespace PepperDash.Essentials
continue;
}
var routeKey = kvp.Key;
- var item = new SubpageReferenceListSourceItem(i++, SourcesSrl, srcConfig,
+ var item = new SubpageReferenceListSourceItem(i++, _sourcesSrl, srcConfig,
b => { if (!b) UiSelectSource(routeKey); });
- SourcesSrl.AddItem(item); // add to the SRL
- item.RegisterForSourceChange(_CurrentRoom);
+ _sourcesSrl.AddItem(item); // add to the SRL
+ item.RegisterForSourceChange(_currentRoom);
}
- SourcesSrl.Count = (ushort)(i - 1);
+ _sourcesSrl.Count = (ushort)(i - 1);
}
// Name and logo
- TriList.StringInput[UIStringJoin.CurrentRoomName].StringValue = _CurrentRoom.Name;
- if (_CurrentRoom.LogoUrlLightBkgnd == null)
+ TriList.StringInput[UIStringJoin.CurrentRoomName].StringValue = _currentRoom.Name;
+ if (_currentRoom.LogoUrlLightBkgnd == null)
{
TriList.BooleanInput[UIBoolJoin.LogoDefaultVisible].BoolValue = true;
TriList.BooleanInput[UIBoolJoin.LogoUrlVisible].BoolValue = false;
@@ -806,28 +814,33 @@ namespace PepperDash.Essentials
{
TriList.BooleanInput[UIBoolJoin.LogoDefaultVisible].BoolValue = false;
TriList.BooleanInput[UIBoolJoin.LogoUrlVisible].BoolValue = true;
- TriList.StringInput[UIStringJoin.LogoUrlLightBkgnd].StringValue = _CurrentRoom.LogoUrlLightBkgnd;
- TriList.StringInput[UIStringJoin.LogoUrlLightBkgnd].StringValue = _CurrentRoom.LogoUrlDarkBkgnd;
+ TriList.StringInput[UIStringJoin.LogoUrlLightBkgnd].StringValue = _currentRoom.LogoUrlLightBkgnd;
+ TriList.StringInput[UIStringJoin.LogoUrlLightBkgnd].StringValue = _currentRoom.LogoUrlDarkBkgnd;
}
// Shutdown timer
- _CurrentRoom.ShutdownPromptTimer.HasStarted += ShutdownPromptTimer_HasStarted;
- _CurrentRoom.ShutdownPromptTimer.HasFinished += ShutdownPromptTimer_HasFinished;
- _CurrentRoom.ShutdownPromptTimer.WasCancelled += ShutdownPromptTimer_WasCancelled;
+ _currentRoom.ShutdownPromptTimer.HasStarted += ShutdownPromptTimer_HasStarted;
+ _currentRoom.ShutdownPromptTimer.HasFinished += ShutdownPromptTimer_HasFinished;
+ _currentRoom.ShutdownPromptTimer.WasCancelled += ShutdownPromptTimer_WasCancelled;
// Link up all the change events from the room
- _CurrentRoom.OnFeedback.OutputChange += CurrentRoom_OnFeedback_OutputChange;
+ _currentRoom.OnFeedback.OutputChange += CurrentRoom_OnFeedback_OutputChange;
CurrentRoom_SyncOnFeedback();
- _CurrentRoom.IsWarmingUpFeedback.OutputChange += CurrentRoom_IsWarmingFeedback_OutputChange;
- _CurrentRoom.IsCoolingDownFeedback.OutputChange += IsCoolingDownFeedback_OutputChange;
+ _currentRoom.IsWarmingUpFeedback.OutputChange += CurrentRoom_IsWarmingFeedback_OutputChange;
+ _currentRoom.IsCoolingDownFeedback.OutputChange += IsCoolingDownFeedback_OutputChange;
- _CurrentRoom.CurrentVolumeDeviceChange += CurrentRoom_CurrentAudioDeviceChange;
+ _currentRoom.CurrentVolumeDeviceChange += CurrentRoom_CurrentAudioDeviceChange;
RefreshAudioDeviceConnections();
- _CurrentRoom.CurrentSourceChange += CurrentRoom_SourceInfoChange;
+ _currentRoom.CurrentSourceChange += CurrentRoom_SourceInfoChange;
RefreshSourceInfo();
- (Parent as EssentialsPanelMainInterfaceDriver).HeaderDriver.SetupHeaderButtons(this, CurrentRoom);
+ var essentialsPanelMainInterfaceDriver = _parent as EssentialsPanelMainInterfaceDriver;
+
+ if (essentialsPanelMainInterfaceDriver != null)
+ {
+ essentialsPanelMainInterfaceDriver.HeaderDriver.SetupHeaderButtons(this, CurrentRoom);
+ }
}
else
{
@@ -838,7 +851,7 @@ namespace PepperDash.Essentials
void SetCurrentRoom(EssentialsHuddleSpaceRoom room)
{
- if (_CurrentRoom == room) return;
+ if (_currentRoom == room) return;
// Disconnect current (probably never called)
if (_CurrentRoom != null)
@@ -885,7 +898,7 @@ namespace PepperDash.Essentials
///
void room_ConfigChanged(object sender, EventArgs e)
{
- RefreshCurrentRoom(_CurrentRoom);
+ RefreshCurrentRoom(_currentRoom);
}
///
@@ -898,7 +911,7 @@ namespace PepperDash.Essentials
void CurrentRoom_SyncOnFeedback()
{
- var value = _CurrentRoom.OnFeedback.BoolValue;
+ var value = _currentRoom.OnFeedback.BoolValue;
//Debug.Console(2, CurrentRoom, "UI: Is on event={0}", value);
TriList.BooleanInput[UIBoolJoin.RoomIsOn].BoolValue = value;
@@ -960,15 +973,14 @@ namespace PepperDash.Essentials
// Hide whatever is showing
if (IsVisible)
{
- if (CurrentSourcePageManager != null)
+ if (_currentSourcePageManager != null)
{
- CurrentSourcePageManager.Hide();
- CurrentSourcePageManager = null;
+ _currentSourcePageManager.Hide();
+ _currentSourcePageManager = null;
}
}
- if (previousInfo == null) return;
- var previousDev = previousInfo.SourceDevice;
+ var previousDev = previousInfo.SourceDevice;
// device type interfaces
if (previousDev is ISetTopBoxControls)
@@ -999,7 +1011,7 @@ namespace PepperDash.Essentials
{
var routeInfo = CurrentRoom.CurrentSourceInfo;
// This will show off popup too
- if (this.IsVisible)
+ if (IsVisible)
ShowCurrentSource();
if (routeInfo == null)// || !CurrentRoom.OnFeedback.BoolValue)
@@ -1007,22 +1019,23 @@ namespace PepperDash.Essentials
// Check for power off and insert "Room is off"
TriList.StringInput[UIStringJoin.CurrentSourceName].StringValue = "Room is off";
TriList.StringInput[UIStringJoin.CurrentSourceIcon].StringValue = "Power";
- this.Hide();
- Parent.Show();
+ Hide();
+ _parent.Show();
return;
}
- else if (CurrentRoom.CurrentSourceInfo != null)
- {
- TriList.StringInput[UIStringJoin.CurrentSourceName].StringValue = routeInfo.PreferredName;
- TriList.StringInput[UIStringJoin.CurrentSourceIcon].StringValue = routeInfo.Icon; // defaults to "blank"
- }
- else
- {
- TriList.StringInput[UIStringJoin.CurrentSourceName].StringValue = "---";
- TriList.StringInput[UIStringJoin.CurrentSourceIcon].StringValue = "Blank";
- }
-
- // Connect controls
+
+ if (CurrentRoom.CurrentSourceInfo != null)
+ {
+ TriList.StringInput[UIStringJoin.CurrentSourceName].StringValue = routeInfo.PreferredName;
+ TriList.StringInput[UIStringJoin.CurrentSourceIcon].StringValue = routeInfo.Icon; // defaults to "blank"
+ }
+ else
+ {
+ TriList.StringInput[UIStringJoin.CurrentSourceName].StringValue = "---";
+ TriList.StringInput[UIStringJoin.CurrentSourceIcon].StringValue = "Blank";
+ }
+
+ // Connect controls
if (routeInfo.SourceDevice != null)
ConnectControlDeviceMethods(routeInfo.SourceDevice);
}