public EssentialsShadeDriver(EssentialsEnvironmentDriver parent, string deviceKey, uint buttonPressJoinBase, uint stringJoinBase, uint subpageVisibleBase) : base(parent.TriList) { Parent = parent; ButtonPressJoinBase = buttonPressJoinBase; StringJoinBase = stringJoinBase; ShadeDevice = DeviceManager.GetDeviceForKey(deviceKey) as ShadeBase; SetDeviceType(); SetSubpageVisibleJoin(subpageVisibleBase); SetUpDeviceName(); SetUpButtonActions(); }
uint SetUpEnvironmentButton(EssentialsEnvironmentDriver environmentDriver, uint nextJoin) { if (environmentDriver != null) { var tempJoin = nextJoin; TriList.SetString(tempJoin, "Lights"); EnvironmentCaretVisible = tempJoin + 10; TriList.SetSigFalseAction(tempJoin, () => { environmentDriver.Toggle(); CaretInterlock.ShowInterlocked(EnvironmentCaretVisible); }); nextJoin--; return(nextJoin); } else { return(nextJoin); } }
public EssentialsLightingDriver(EssentialsEnvironmentDriver parent, string deviceKey, uint buttonPressJoinBase, uint buttonVisibleJoinBase, uint stringJoinBase, uint subpageVisibleBase) : base(parent.TriList) { Parent = parent; ButtonPressJoinBase = buttonPressJoinBase; ButtonVisibleJoinBase = buttonVisibleJoinBase; StringJoinBase = stringJoinBase; LightingDevice = DeviceManager.GetDeviceForKey(deviceKey) as LightingBase; //LightingDevice.LightingSceneChange += new EventHandler<LightingSceneChangeEventArgs>(LightingDevice_LightingSceneChange); SetDeviceType(); SetSubpageVisibleJoin(subpageVisibleBase); SetUpDeviceName(); SetUpButtonActions(); }