Corrected issue in ShowSetupButtons method. Environment icon is displaying correctly when config defined.

This commit is contained in:
Neil Dorin
2018-05-21 22:13:07 -06:00
parent 0de4fbb69c
commit a0ebc08838
8 changed files with 23 additions and 14 deletions

View File

@@ -34,6 +34,9 @@ namespace PepperDash.Essentials
{
DeterminePlatform();
CrestronConsole.AddNewConsoleCommand(s => GoWithLoad(), "go", "Loads configuration file",
ConsoleAccessLevelEnum.AccessOperator);
CrestronConsole.AddNewConsoleCommand(s =>
{
foreach (var tl in TieLineCollection.Default)
@@ -56,7 +59,7 @@ namespace PepperDash.Essentials
"Template URL: {1}", ConfigReader.ConfigObject.SystemUrl, ConfigReader.ConfigObject.TemplateUrl);
}, "portalinfo", "Shows portal URLS from configuration", ConsoleAccessLevelEnum.AccessOperator);
GoWithLoad();
//GoWithLoad();
}
/// <summary>

View File

@@ -36,12 +36,13 @@ namespace PepperDash.Essentials
var room = DeviceManager.GetDeviceForKey(props.DefaultRoomKey);
if (room is EssentialsHuddleSpaceRoom)
{
Debug.Console(0, panelController, "Adding huddle space AV driver");
// Header Driver
Debug.Console(0, panelController, "Adding header driver");
mainDriver.HeaderDriver = new EssentialsHeaderDriver(mainDriver, props);
// AV Driver
Debug.Console(0, panelController, "Adding huddle space AV driver");
var avDriver = new EssentialsHuddlePanelAvFunctionsDriver(mainDriver, props);
avDriver.CurrentRoom = room as EssentialsHuddleSpaceRoom;
avDriver.DefaultRoomKey = props.DefaultRoomKey;
@@ -54,6 +55,8 @@ namespace PepperDash.Essentials
mainDriver.EnvironmentDriver = new EssentialsEnvironmentDriver(mainDriver, props);
}
mainDriver.HeaderDriver.SetupHeaderButtons(avDriver, avDriver.CurrentRoom);
panelController.LoadAndShowDriver(mainDriver); // This is a little convoluted.
if (panelController.Panel is TswFt5ButtonSystem)
@@ -110,6 +113,8 @@ namespace PepperDash.Essentials
mainDriver.EnvironmentDriver = new EssentialsEnvironmentDriver(mainDriver, props);
}
mainDriver.HeaderDriver.SetupHeaderButtons(avDriver, avDriver.CurrentRoom);
panelController.LoadAndShowDriver(mainDriver); // This is a little convoluted.
if (panelController.Panel is TswFt5ButtonSystem)

View File

@@ -23,4 +23,6 @@ namespace PepperDash.Essentials
}
}
}

View File

@@ -105,7 +105,8 @@ namespace PepperDash.Essentials
TriList.SetString(nextJoin, "Lights");
TriList.SetSigFalseAction(nextJoin, environmentDriver.Show);
return nextJoin--;
nextJoin--;
return nextJoin;
}
else
return nextJoin;
@@ -119,7 +120,8 @@ namespace PepperDash.Essentials
TriList.SetString(nextJoin, "Calendar");
TriList.SetSigFalseAction(nextJoin, avDriver.CalendarPress);
return nextJoin--;
nextJoin--;
return nextJoin;
}
else
return nextJoin;
@@ -132,7 +134,8 @@ namespace PepperDash.Essentials
TriList.SetSigFalseAction(nextJoin, avDriver.ShowActiveCallsList);
HeaderCallButtonIconSig = TriList.StringInput[nextJoin];
return nextJoin--;
nextJoin--;
return nextJoin;
}
/// <summary>
@@ -182,10 +185,8 @@ namespace PepperDash.Essentials
/// <summary>
/// Sets up Header Buttons for the EssentialsHuddleVtc1Room type
/// </summary>
public void SetupHeaderButtons(EssentialsHuddleVtc1Room currentRoom)
public void SetupHeaderButtons(EssentialsHuddleVtc1PanelAvFunctionsDriver avDriver, EssentialsHuddleVtc1Room currentRoom)
{
var avDriver = Parent.AvDriver as EssentialsHuddleVtc1PanelAvFunctionsDriver;
HeaderButtonsAreSetUp = false;
TriList.SetBool(UIBoolJoin.TopBarHabaneroDynamicVisible, true);
@@ -214,6 +215,7 @@ namespace PepperDash.Essentials
TriList.SetSigFalseAction(UIBoolJoin.HeaderCallStatusLabelPress, avDriver.ShowActiveCallsList);
// Set Call Status Subpage Position
#warning may need to add a new position when environment icon is displayed
if (nextJoin == 3951)
{
@@ -236,11 +238,8 @@ namespace PepperDash.Essentials
/// <summary>
/// Sets up Header Buttons for the EssentialsHuddleSpaceRoom type
/// </summary>
public void SetupHeaderButtons(EssentialsHuddleSpaceRoom currentRoom)
public void SetupHeaderButtons(EssentialsHuddlePanelAvFunctionsDriver avDriver, EssentialsHuddleSpaceRoom currentRoom)
{
#warning This is returning avDriver as null
var avDriver = Parent.AvDriver as EssentialsHuddlePanelAvFunctionsDriver;
HeaderButtonsAreSetUp = false;
TriList.SetBool(UIBoolJoin.TopBarHabaneroDynamicVisible, true);

View File

@@ -808,7 +808,7 @@ namespace PepperDash.Essentials
_CurrentRoom.CurrentSingleSourceChange += CurrentRoom_SourceInfoChange;
RefreshSourceInfo();
(Parent as EssentialsPanelMainInterfaceDriver).HeaderDriver.SetupHeaderButtons(CurrentRoom);
(Parent as EssentialsPanelMainInterfaceDriver).HeaderDriver.SetupHeaderButtons(this, CurrentRoom);
}
else
{

View File

@@ -942,7 +942,7 @@ namespace PepperDash.Essentials
TriList.SetSigFalseAction(UIBoolJoin.CallStopSharingPress, () => _CurrentRoom.RunRouteAction("codecOsd"));
(Parent as EssentialsPanelMainInterfaceDriver).HeaderDriver.SetupHeaderButtons(CurrentRoom);
(Parent as EssentialsPanelMainInterfaceDriver).HeaderDriver.SetupHeaderButtons(this, CurrentRoom);
}
else
{