diff --git a/PepperDashEssentials/Configuration Original/Factories/MAYBE SetTopBoxFactory.cs b/PepperDashEssentials/Configuration Original/Factories/MAYBE SetTopBoxFactory.cs deleted file mode 100644 index d3345762..00000000 --- a/PepperDashEssentials/Configuration Original/Factories/MAYBE SetTopBoxFactory.cs +++ /dev/null @@ -1,52 +0,0 @@ -//using System; -//using Crestron.SimplSharpPro; - -//using Newtonsoft.Json.Linq; - -//using PepperDash.Essentials.Core; -//using PepperDash.Essentials.Devices; - -//using PepperDash.Core; - -//namespace PepperDash.Essentials -//{ -// public class SetTopBoxFactory -// { -// public static Device Create(JToken devToken) -// { -// Device dev = null; -// try -// { -// var devType = devToken.Value("type"); -// var devKey = devToken.Value("key"); -// var devName = devToken.Value("name"); -// var props = devToken["properties"]; -// var portConfig = FactoryHelper.GetIrPort(props); -// if (portConfig != null) -// { -// if (devType.EndsWith("-generic")) -// { -// var stb = new IrSetTopBoxBase(devKey, devName, portConfig.Port, portConfig.FileName); -// // Do this a better way? -// stb.HasDpad = props["hasDpad"].Value(); -// stb.HasDvr = props["hasDvr"].Value(); -// stb.HasNumbers = props["hasNumbers"].Value(); -// stb.HasPreset = props["hasPresets"].Value(); -// dev = stb; -// } -// else -// FactoryHelper.HandleUnknownType(devToken, devType); - -// var preDev = dev as IHasSetTopBoxProperties; -// if(preDev.HasPreset) -// preDev.LoadPresets(props["presetListName"].Value()); -// } -// } -// catch (Exception e) -// { -// FactoryHelper.HandleDeviceCreationError(devToken, e); -// } -// return dev; -// } -// } -//} \ No newline at end of file diff --git a/PepperDashEssentials/Configuration Original/Factories/REMOVE DiscPlayerFactory.cs b/PepperDashEssentials/Configuration Original/Factories/REMOVE DiscPlayerFactory.cs deleted file mode 100644 index d19dc0c7..00000000 --- a/PepperDashEssentials/Configuration Original/Factories/REMOVE DiscPlayerFactory.cs +++ /dev/null @@ -1,46 +0,0 @@ -//using System; -//using Crestron.SimplSharpPro; - -//using Newtonsoft.Json.Linq; - -//using PepperDash.Essentials.Core; -//using PepperDash.Essentials.Devices; -//using PepperDash.Core; - -//namespace PepperDash.Essentials -//{ -// public class DiscPlayerFactory -// { -// public static Device Create(JToken devToken) -// { -// Device dev = null; -// try -// { -// var devType = devToken.Value("type"); -// var devKey = devToken.Value("key"); -// var devName = devToken.Value("name"); - -// // Filter out special (Pioneer -// //(devType.Equals("genericIr", StringComparison.OrdinalIgnoreCase)) - -// var props = devToken["properties"]; -// var portConfig = FactoryHelper.GetIrPort(props); -// if (portConfig != null) -// { -// if (devType.EndsWith("-generic")) -// dev = new IrDvdBase(devKey, devName, portConfig.Port, portConfig.FileName); -// else -// FactoryHelper.HandleUnknownType(devToken, devType); -// } - -// // NO PORT ERROR HERE?? - -// } -// catch (Exception e) -// { -// FactoryHelper.HandleDeviceCreationError(devToken, e); -// } -// return dev; -// } -// } -//} \ No newline at end of file diff --git a/PepperDashEssentials/ControlSystem.cs b/PepperDashEssentials/ControlSystem.cs index af3754fd..6903c1ba 100644 --- a/PepperDashEssentials/ControlSystem.cs +++ b/PepperDashEssentials/ControlSystem.cs @@ -25,8 +25,6 @@ namespace PepperDash.Essentials { HttpLogoServer LogoServer; - List FactoryObjects = new List(); - public ControlSystem() : base() { @@ -36,7 +34,7 @@ namespace PepperDash.Essentials } /// - /// Git 'er goin' + /// Entry point for the program /// public override void InitializeSystem() { @@ -144,7 +142,7 @@ namespace PepperDash.Essentials } /// - /// Do it, yo + /// Begins the process of loading resources including plugins and configuration data /// public void GoWithLoad() { @@ -171,23 +169,21 @@ namespace PepperDash.Essentials else { Debug.Console(0, - "------------------------------------------------\r" + - "------------------------------------------------\r" + - "------------------------------------------------\r" + - "Essentials file structure setup completed.\r" + - "Please load config, sgd and ir files and\r" + - "restart program.\r" + - "------------------------------------------------\r" + - "------------------------------------------------\r" + - "------------------------------------------------"); + @"---------------------------------------------- + ------------------------------------------------ + ------------------------------------------------ + Essentials file structure setup completed. + Please load config, sgd and ir files and + restart program. + ------------------------------------------------ + ------------------------------------------------ + ------------------------------------------------"); } } catch (Exception e) { Debug.Console(0, "FATAL INITIALIZE ERROR. System is in an inconsistent state:\r{0}", e); - - } // Notify the OS that the program intitialization has completed @@ -196,7 +192,7 @@ namespace PepperDash.Essentials } /// - /// Initial simple implementation. Reads user/programN/plugins folder and + /// Initial simple implementation. Reads user/programXX/plugins folder and /// use /// void LoadPlugins() @@ -320,18 +316,6 @@ namespace PepperDash.Essentials return configExists; } - ///// - ///// - ///// - ///// - //public void EnablePortalSync(string s) - //{ - // if (s.ToLower() == "enable") - // { - // CrestronConsole.ConsoleCommandResponse("Portal Sync features enabled"); - // } - //} - /// /// /// diff --git a/PepperDashEssentials/Devices/DiscPlayer/OppoExtendedBdp.cs b/PepperDashEssentials/Devices/DiscPlayer/OppoExtendedBdp.cs deleted file mode 100644 index e57e34a3..00000000 --- a/PepperDashEssentials/Devices/DiscPlayer/OppoExtendedBdp.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System; -using System.Linq; -using System.Collections.Generic; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.DeviceSupport; - -using PepperDash.Essentials.Core; - -namespace PepperDash.Essentials.Devices -{ - ///// - ///// This DVD class should cover most IR, one-way DVD and Bluray fuctions - ///// - //public class OppoBluray : IrDvdBase, IDvdControls, IExtendedOutputs - //{ - // public OppoBluray(string key, string name, IROutputPort port, string irDriverFilepath) : base(key, name, port, irDriverFilepath) { } - - - - // public OutputsToTriListBridge GetExtendedOutputsToTriListBridge() - // { - // return new ExtendedDvdTriListBridge(); - // } - - - //} - - //public class ExtendedDvdTriListBridge : OutputsToTriListBridge - //{ - - // public override void Link() - // { - // throw new NotImplementedException(); - // } - - // public override void UnLink() - // { - // throw new NotImplementedException(); - // } - //} -} \ No newline at end of file diff --git a/PepperDashEssentials/Devices/NUMERIC AppleTV.cs b/PepperDashEssentials/Devices/NUMERIC AppleTV.cs deleted file mode 100644 index 9ce4e5de..00000000 --- a/PepperDashEssentials/Devices/NUMERIC AppleTV.cs +++ /dev/null @@ -1,45 +0,0 @@ -//using System; -//using System.Collections.Generic; -//using System.Linq; -//using Crestron.SimplSharp; -//using Crestron.SimplSharpPro; -//using Crestron.SimplSharpPro.DeviceSupport; - -//using PepperDash.Essentials.Core; - -//namespace PepperDash.Essentials.Devices -//{ -// public class AppleTV : Device, IHasCueActionList -// { -// public IrOutputPortController IrPort { get; private set; } - -// public AppleTV(string key, string name, IROutputPort port, string irDriverFilepath) -// : base(key, name) -// { -// IrPort = new IrOutputPortController("ir" + key, port, irDriverFilepath); -// } - -// #region IFunctionList Members -// public List CueActionList -// { -// get -// { -// var numToIr = new Dictionary -// { -// { CommonBoolCue.Menu, IROutputStandardCommands.IROut_MENU }, -// { CommonBoolCue.Up, IROutputStandardCommands.IROut_UP_ARROW }, -// { CommonBoolCue.Down, IROutputStandardCommands.IROut_DN_ARROW }, -// { CommonBoolCue.Left, IROutputStandardCommands.IROut_LEFT_ARROW }, -// { CommonBoolCue.Right, IROutputStandardCommands.IROut_RIGHT_ARROW }, -// { CommonBoolCue.Select, IROutputStandardCommands.IROut_ENTER } -// }; -// var funcs = new List(numToIr.Count); - -// foreach (var kvp in numToIr) -// funcs.Add(new BoolCueActionPair(kvp.Key, b => IrPort.PressRelease(kvp.Value, b))); -// return funcs; -// } -// } -// #endregion -// } -//} \ No newline at end of file diff --git a/PepperDashEssentials/FOR REFERENCE UI/PageControllers/DevicePageControllerBase.cs b/PepperDashEssentials/FOR REFERENCE UI/PageControllers/DevicePageControllerBase.cs deleted file mode 100644 index 700a32d5..00000000 --- a/PepperDashEssentials/FOR REFERENCE UI/PageControllers/DevicePageControllerBase.cs +++ /dev/null @@ -1,47 +0,0 @@ -//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; -//using PepperDash.Essentials.Core; -//using PepperDash.Essentials.Core.Presets; - -//namespace PepperDash.Essentials -//{ -// /// -// /// -// /// -// public abstract class DevicePageControllerBase -// { - -// protected BasicTriListWithSmartObject TriList; -// protected List FixedObjectSigs; - -// public DevicePageControllerBase(BasicTriListWithSmartObject triList) -// { -// TriList = triList; -// } - -// public void SetVisible(bool state) -// { -// foreach (var sig in FixedObjectSigs) -// { -// Debug.Console(2, "set visible {0}={1}", sig.Number, state); -// sig.BoolValue = state; -// } -// CustomSetVisible(state); -// } - -// /// -// /// Add any specialized show/hide logic here - beyond FixedObjectSigs. Overriding -// /// methods do not need to call this base method -// /// -// protected virtual void CustomSetVisible(bool state) -// { -// } -// } -//} \ No newline at end of file diff --git a/PepperDashEssentials/FOR REFERENCE UI/PageControllers/LargeTouchpanelControllerBase.cs b/PepperDashEssentials/FOR REFERENCE UI/PageControllers/LargeTouchpanelControllerBase.cs deleted file mode 100644 index 6f0345f5..00000000 --- a/PepperDashEssentials/FOR REFERENCE UI/PageControllers/LargeTouchpanelControllerBase.cs +++ /dev/null @@ -1,308 +0,0 @@ -//using System; -//using System.Collections.Generic; -//using System.Linq; -//using Crestron.SimplSharp; -//using Crestron.SimplSharpPro; -//using Crestron.SimplSharpPro.DeviceSupport; -//using Crestron.SimplSharpPro.UI; - -//using PepperDash.Core; - - -//namespace PepperDash.Essentials.Core -//{ -// /// -// /// -// /// -// public class LargeTouchpanelControllerBase : SmartGraphicsTouchpanelControllerBase -// { -// public string PresentationShareButtonInVideoText = "Share"; -// public string PresentationShareButtonNotInVideoText = "Presentation"; - -// SourceListSubpageReferenceList SourceSelectSRL; -// DevicePageControllerBase CurrentPresentationSourcePageController; - -// public LargeTouchpanelControllerBase(string key, string name, -// BasicTriListWithSmartObject triList, string sgdFilePath) -// : base(key, name, triList, sgdFilePath) -// { -// } - -// /// -// /// Static factory method -// /// -// public static LargeTouchpanelControllerBase GetController(string key, string name, -// string type, CrestronTswPropertiesConfig props) -// { -// var id = Convert.ToUInt32(props.IpId, 16); -// type = type.ToLower(); -// Tswx52ButtonVoiceControl tsw = null; -// if (type == "tsw752") -// tsw = new Tsw752(id, Global.ControlSystem); -// else if (type == "tsw1052") -// tsw = new Tsw1052(id, Global.ControlSystem); -// else -// { -// Debug.Console(0, "WARNING: Cannot create TSW controller with type '{0}'", type); -// return null; -// } - -// var sgdPath = string.Format(@"\NVRAM\Program{0}\SGD\{1}", -// InitialParametersClass.ApplicationNumber, props.SgdFile); -// var controller = new LargeTouchpanelControllerBase(key, name, tsw, sgdPath); -// controller.UsesSplashPage = props.UsesSplashPage; - -// // Get the room and add it after everthing is ready -// var room = DeviceManager.GetDeviceForKey(props.DefaultRoomKey) as EssentialsRoom; -// controller.AddPostActivationAction(() => -// { -// controller.SetCurrentRoom(room); - -// }); - -// return controller; -// } - -// public override bool CustomActivate() -// { -// var baseSuccess = base.CustomActivate(); -// if (!baseSuccess) return false; - -// SourceSelectSRL = new SourceListSubpageReferenceList(this.TriList, n => -// { if (CurrentRoom != null) CurrentRoom.SelectSource(n); }); - -// var lm = Global.LicenseManager; -// if (lm != null) -// { -// lm.LicenseIsValid.LinkInputSig(TriList.BooleanInput[UiCue.ShowLicensed.Number]); -// //others -// } - -// // Wire up buttons -// TriList.SetSigFalseAction(15003, () => SetMainMode(eMainModeType.Presentation)); -// TriList.SetSigFalseAction(15008, PowerOffWithConfirmPressed); -// TriList.SetSigFalseAction(15101, () => SetMainMode(eMainModeType.Presentation)); -// TriList.SetSigFalseAction(15013, ShowHelp); -// TriList.SetSigFalseAction(15014, () => SetMainMode(eMainModeType.Tech)); - -// // Temp things ----------------------------------------------------------------------- -// TriList.StringInput[UiCue.SplashMessage.Number].StringValue = SplashMessage; -// //------------------------------------------------------------------------------------ - -// // Initialize initial view -// ShowSplashOrMain(); -// return true; -// } - -// /// -// /// In Essentials, this should NEVER be called, since it's a one-room solution -// /// -// protected override void HideRoomUI() -// { -// // UI Cleanup here???? - -// //SwapAudioDeviceControls(CurrentRoom.CurrentAudioDevice, null); -// //CurrentRoom.AudioDeviceWillChange -= CurrentRoom_AudioDeviceWillChange; - -// CurrentRoom.IsCoolingDownFeedback.OutputChange -= CurrentRoom_IsCoolingDown_OutputChange; -// CurrentRoom.IsWarmingUpFeedback.OutputChange -= CurrentRoom_IsWarmingUp_OutputChange; - -// SourceSelectSRL.DetachFromCurrentRoom(); -// } - -// /// -// /// Ties this panel controller to the Room and gets updates. -// /// -// protected override void ShowRoomUI() -// { -// Debug.Console(1, this, "connecting to system '{0}'", CurrentRoom.Key); - -// TriList.StringInput[RoomCue.Name.Number].StringValue = CurrentRoom.Name; -// TriList.StringInput[RoomCue.Description.Number].StringValue = CurrentRoom.Description; - -// CurrentRoom.IsCoolingDownFeedback.OutputChange -= CurrentRoom_IsCoolingDown_OutputChange; -// CurrentRoom.IsWarmingUpFeedback.OutputChange -= CurrentRoom_IsWarmingUp_OutputChange; -// CurrentRoom.IsCoolingDownFeedback.OutputChange += CurrentRoom_IsCoolingDown_OutputChange; -// CurrentRoom.IsWarmingUpFeedback.OutputChange += CurrentRoom_IsWarmingUp_OutputChange; - -// SourceSelectSRL.AttachToRoom(CurrentRoom); -// } - -// void CurrentRoom_IsCoolingDown_OutputChange(object sender, EventArgs e) -// { -// Debug.Console(2, this, "Received room in cooldown={0}", CurrentRoom.IsCoolingDownFeedback.BoolValue); -// if (CurrentRoom.IsCoolingDownFeedback.BoolValue) // When entering cooldown -// { -// // Do we need to check for an already-running cooldown - like in the case of room switches? -// new ModalDialog(TriList).PresentModalTimerDialog(0, "Power Off", "Power", "Please wait, shutting down", -// "", "", CurrentRoom.CooldownTime, true, b => -// { -// ShowSplashOrMain(); -// }); -// } -// } - -// void CurrentRoom_IsWarmingUp_OutputChange(object sender, EventArgs e) -// { -// Debug.Console(2, this, "Received room in warmup={0}", CurrentRoom.IsWarmingUpFeedback.BoolValue); -// if (CurrentRoom.IsWarmingUpFeedback.BoolValue) // When entering warmup -// { -// // Do we need to check for an already-running cooldown - like in the case of room switches? -// new ModalDialog(TriList).PresentModalTimerDialog(0, "Power On", "Power", "Please wait, powering on", -// "", "", CurrentRoom.WarmupTime, false, b => -// { -// // Reveal sources - or has already been done behind modal -// }); -// } -// } - -// // Handler for source change events. -// void CurrentRoom_PresentationSourceChange(object sender, EssentialsRoomSourceChangeEventArgs args) -// { -// // Put away the old source and set up the new source. -// Debug.Console(2, this, "Received source change={0}", args.NewSource != null ? args.NewSource.SourceKey : "none"); - -// // If we're in tech, don't switch screen modes. Add any other modes we may want to switch away from -// // inside the if below. -// if (MainMode == eMainModeType.Splash) -// SetMainMode(eMainModeType.Presentation); -// SetControlSource(args.NewSource); -// } - -// //*********************************************************************** -// //** UI Manipulation -// //*********************************************************************** - -// /// -// /// Shows the splash page or the main presentation page, depending on config setting -// /// -// void ShowSplashOrMain() -// { -// if (UsesSplashPage) -// SetMainMode(eMainModeType.Splash); -// else -// SetMainMode(eMainModeType.Presentation); -// } - -// /// -// /// Switches between main modes -// /// -// void SetMainMode(eMainModeType mode) -// { -// MainMode = mode; -// switch (mode) -// { -// case eMainModeType.Presentation: -// TriList.BooleanInput[UiCue.VisibleCommonFooter.Number].BoolValue = true; -// TriList.BooleanInput[UiCue.VisibleCommonHeader.Number].BoolValue = true; -// TriList.BooleanInput[UiCue.VisibleSplash.Number].BoolValue = false; -// TriList.BooleanInput[UiCue.VisiblePresentationSourceList.Number].BoolValue = true; -// ShowCurrentPresentationSourceUi(); -// break; -// case eMainModeType.Splash: -// TriList.BooleanInput[UiCue.VisibleCommonFooter.Number].BoolValue = false; -// TriList.BooleanInput[UiCue.VisibleCommonHeader.Number].BoolValue = false; -// TriList.BooleanInput[UiCue.VisiblePresentationSourceList.Number].BoolValue = false; -// TriList.BooleanInput[UiCue.VisibleSplash.Number].BoolValue = true; -// HideCurrentPresentationSourceUi(); -// break; -// case eMainModeType.Tech: -// new ModalDialog(TriList).PresentModalTimerDialog(1, "Tech page", "Info", -// "Tech page will be here soon!
I promise", -// "Bueno!", "", 0, false, null); -// MainMode = eMainModeType.Presentation; -// break; -// default: -// break; -// } -// } - -// /// -// /// -// /// -// void PowerOffWithConfirmPressed() -// { -// if (CurrentRoom == null) -// return; -// if (!CurrentRoom.RoomIsOnFeedback.BoolValue) -// return; -// // Timeout or button 1 press will shut down -// var modal = new ModalDialog(TriList); -// uint seconds = CurrentRoom.UnattendedShutdownTimeMs / 1000; -// var message = string.Format("Meeting will end in {0} seconds", seconds); -// modal.PresentModalTimerDialog(2, "End Meeting", "Info", message, -// "End Meeting Now", "Cancel", CurrentRoom.UnattendedShutdownTimeMs, true, -// but => { if (but != 2) CurrentRoom.RoomOff(); }); -// } - -// /// -// /// Reveals the basic UI for the current device -// /// -// protected override void ShowCurrentPresentationSourceUi() -// { -// if (MainMode == eMainModeType.Splash && CurrentRoom.RoomIsOnFeedback.BoolValue) -// SetMainMode(eMainModeType.Presentation); - -// if (CurrentPresentationControlDevice == null) -// { -// // If system is off, do one thing - -// // Otherwise, do something else - shouldn't be in this condition - -// return; -// } - -// // If a controller is already loaded, use it -// if (LoadedPageControllers.ContainsKey(CurrentPresentationControlDevice)) -// CurrentPresentationSourcePageController = LoadedPageControllers[CurrentPresentationControlDevice]; -// else -// { -// // This is by no means optimal, but for now.... -// if (CurrentPresentationControlDevice.Type == PresentationSourceType.SetTopBox -// && CurrentPresentationControlDevice is ISetTopBoxControls) -// CurrentPresentationSourcePageController = new PageControllerLargeSetTopBoxGeneric(TriList, -// CurrentPresentationControlDevice as ISetTopBoxControls); - -// else if (CurrentPresentationControlDevice.Type == PresentationSourceType.Laptop) -// CurrentPresentationSourcePageController = new PageControllerLaptop(TriList); - -// // separate these... -// else if (CurrentPresentationControlDevice.Type == PresentationSourceType.Dvd) -// CurrentPresentationSourcePageController = -// new PageControllerLargeDvd(TriList, CurrentPresentationControlDevice as IDiscPlayerControls); - -// else -// CurrentPresentationSourcePageController = null; - -// // Save it. -// if (CurrentPresentationSourcePageController != null) -// LoadedPageControllers[CurrentPresentationControlDevice] = CurrentPresentationSourcePageController; -// } - -// if (CurrentPresentationSourcePageController != null) -// CurrentPresentationSourcePageController.SetVisible(true); -// } - -// protected override void HideCurrentPresentationSourceUi() -// { -// if (CurrentPresentationControlDevice != null && CurrentPresentationSourcePageController != null) -// CurrentPresentationSourcePageController.SetVisible(false); -// } - - - -// void ShowHelp() -// { -// new ModalDialog(TriList).PresentModalTimerDialog(1, "Help", "Help", CurrentRoom.HelpMessage, -// "OK", "", 0, false, null); -// } - -// protected void ListSmartObjects() -// { -// Debug.Console(0, this, "Smart objects IDs:"); -// var list = TriList.SmartObjects.OrderBy(s => s.Key); -// foreach (var kvp in list) -// Debug.Console(0, " {0}", kvp.Key); -// } -// } -//} \ No newline at end of file diff --git a/PepperDashEssentials/FOR REFERENCE UI/PageControllers/PageControllerLaptop.cs b/PepperDashEssentials/FOR REFERENCE UI/PageControllers/PageControllerLaptop.cs deleted file mode 100644 index dace5dfb..00000000 --- a/PepperDashEssentials/FOR REFERENCE UI/PageControllers/PageControllerLaptop.cs +++ /dev/null @@ -1,28 +0,0 @@ -//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; -//using PepperDash.Essentials.Core; -//using PepperDash.Essentials.Core.Presets; - - -//namespace PepperDash.Essentials -//{ -// public class PageControllerLaptop : DevicePageControllerBase -// { -// public PageControllerLaptop(BasicTriListWithSmartObject tl) -// : base(tl) -// { -// FixedObjectSigs = new List -// { -// tl.BooleanInput[10092], // well -// tl.BooleanInput[11001] // Laptop info -// }; -// } -// } -//} \ No newline at end of file diff --git a/PepperDashEssentials/FOR REFERENCE UI/PageControllers/PageControllerLargeDvd.cs b/PepperDashEssentials/FOR REFERENCE UI/PageControllers/PageControllerLargeDvd.cs deleted file mode 100644 index 46db1f39..00000000 --- a/PepperDashEssentials/FOR REFERENCE UI/PageControllers/PageControllerLargeDvd.cs +++ /dev/null @@ -1,46 +0,0 @@ -//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; -//using PepperDash.Essentials.Core; -//using PepperDash.Essentials.Core.Presets; - -//namespace PepperDash.Essentials -//{ -// /// -// /// -// /// -// public class PageControllerLargeDvd : DevicePageControllerBase -// { -// IDiscPlayerControls Device; - -// public PageControllerLargeDvd(BasicTriListWithSmartObject tl, IDiscPlayerControls device) -// : base(tl) -// { - -// Device = device; -// FixedObjectSigs = new List -// { -// tl.BooleanInput[10093], // well -// tl.BooleanInput[10411], // DVD Dpad -// tl.BooleanInput[10412] // everything else -// }; -// } - -// protected override void CustomSetVisible(bool state) -// { -// // Hook up smart objects if applicable -// if (Device != null) -// { -//#warning rewire this -// //var uos = (Device as IHasCueActionList).CueActionList; -// //SmartObjectHelper.LinkDpadWithUserObjects(TriList, 10411, uos, state); -// } -// } -// } -//} \ No newline at end of file diff --git a/PepperDashEssentials/FOR REFERENCE UI/PageControllers/PageControllerLargeSetTopBoxGeneric.cs b/PepperDashEssentials/FOR REFERENCE UI/PageControllers/PageControllerLargeSetTopBoxGeneric.cs deleted file mode 100644 index eb869108..00000000 --- a/PepperDashEssentials/FOR REFERENCE UI/PageControllers/PageControllerLargeSetTopBoxGeneric.cs +++ /dev/null @@ -1,139 +0,0 @@ -//using System; -//using System.Collections.Generic; -//using System.Linq; -//using System.Text; -//using Crestron.SimplSharp; -//using Crestron.SimplSharpPro; -//using Crestron.SimplSharpPro.DeviceSupport; - -//using PepperDash.Essentials.Core.Presets; - -//using PepperDash.Core; -//using PepperDash.Essentials.Core; - -//namespace PepperDash.Essentials -//{ - -// public class PageControllerLargeSetTopBoxGeneric : DevicePageControllerBase -// { -// // To-DO: Add properties for component subpage names. DpadPos1, DpadPos2... -// // Derived classes can then insert special subpages for variations on given -// // device types. Like DirecTV vs Comcast - -// public uint DpadSmartObjectId { get; set; } -// public uint NumberPadSmartObjectId { get; set; } -// public uint PresetsSmartObjectId { get; set; } -// public uint Position5TabsId { get; set; } - -// ISetTopBoxControls Device; -// DevicePresetsView PresetsView; - - -// bool ShowPosition5Tabs; -// uint CurrentVisiblePosition5Item = 1; -// Dictionary Position5SubpageJoins = new Dictionary -// { -// { 1, 10053 }, -// { 2, 10054 } -// }; - -// public PageControllerLargeSetTopBoxGeneric(BasicTriListWithSmartObject tl, ISetTopBoxControls device) -// : base(tl) -// { -// Device = device; -// DpadSmartObjectId = 10011; -// NumberPadSmartObjectId = 10014; -// PresetsSmartObjectId = 10012; -// Position5TabsId = 10081; - -// bool dpad = device is IDPad; -// bool preset = device.HasPresets; -// bool dvr = device.HasDvr; -// bool numbers = device is INumericKeypad; -// uint[] joins = null; - -// if (dpad && !preset && !dvr && !numbers) joins = new uint[] { 10031, 10091 }; -// else if (!dpad && preset && !dvr && !numbers) joins = new uint[] { 10032, 10091 }; -// else if (!dpad && !preset && dvr && !numbers) joins = new uint[] { 10033, 10091 }; -// else if (!dpad && !preset && !dvr && numbers) joins = new uint[] { 10034, 10091 }; - -// else if (dpad && preset && !dvr && !numbers) joins = new uint[] { 10042, 10021, 10092 }; -// else if (dpad && !preset && dvr && !numbers) joins = new uint[] { 10043, 10021, 10092 }; -// else if (dpad && !preset && !dvr && numbers) joins = new uint[] { 10044, 10021, 10092 }; -// else if (!dpad && preset && dvr && !numbers) joins = new uint[] { 10043, 10022, 10092 }; -// else if (!dpad && preset && !dvr && numbers) joins = new uint[] { 10044, 10022, 10092 }; -// else if (!dpad && !preset && dvr && numbers) joins = new uint[] { 10044, 10023, 10092 }; - -// else if (dpad && preset && dvr && !numbers) joins = new uint[] { 10053, 10032, 10011, 10093 }; -// else if (dpad && preset && !dvr && numbers) joins = new uint[] { 10054, 10032, 10011, 10093 }; -// else if (dpad && !preset && dvr && numbers) joins = new uint[] { 10054, 10033, 10011, 10093 }; -// else if (!dpad && preset && dvr && numbers) joins = new uint[] { 10054, 10033, 10012, 10093 }; - -// else if (dpad && preset && dvr && numbers) -// { -// joins = new uint[] { 10081, 10032, 10011, 10093 }; // special case -// ShowPosition5Tabs = true; -// } -// // Project the joins into corresponding sigs. -// FixedObjectSigs = joins.Select(u => TriList.BooleanInput[u]).ToList(); - -// // Build presets -// if (device.HasPresets) -// { -// PresetsView = new DevicePresetsView(tl, device.PresetsModel); -// } -// } - -// protected override void CustomSetVisible(bool state) -// { -// if (ShowPosition5Tabs) -// { -// // Show selected tab -// TriList.BooleanInput[Position5SubpageJoins[CurrentVisiblePosition5Item]].BoolValue = state; - -// var tabSo = TriList.SmartObjects[Position5TabsId]; -// if (state) // Link up the tab object -// { -// tabSo.BooleanOutput["Tab Button 1 Press"].UserObject = new Action(b => ShowTab(1)); -// tabSo.BooleanOutput["Tab Button 2 Press"].UserObject = new Action(b => ShowTab(2)); -// } -// else // Disco tab object -// { -// tabSo.BooleanOutput["Tab Button 1 Press"].UserObject = null; -// tabSo.BooleanOutput["Tab Button 2 Press"].UserObject = null; -// } -// } - -// // Hook up smart objects if applicable -//#warning hook these up -// //if (Device is IHasCueActionList) -// //{ -// // var uos = (Device as IHasCueActionList).CueActionList; -// // SmartObjectHelper.LinkDpadWithUserObjects(TriList, DpadSmartObjectId, uos, state); -// // SmartObjectHelper.LinkNumpadWithUserObjects(TriList, NumberPadSmartObjectId, -// // uos, CommonBoolCue.Dash, CommonBoolCue.Last, state); -// //} - - -// // Link, unlink presets -// if (Device.HasPresets && state) -// PresetsView.Attach(); -// else if (Device.HasPresets && !state) -// PresetsView.Detach(); -// } - -// void ShowTab(uint number) -// { -// // Ignore re-presses -// if (CurrentVisiblePosition5Item == number) return; -// // Swap subpage -// var bi = TriList.BooleanInput; -// if (CurrentVisiblePosition5Item > 0) -// bi[Position5SubpageJoins[CurrentVisiblePosition5Item]].BoolValue = false; -// CurrentVisiblePosition5Item = number; -// bi[Position5SubpageJoins[CurrentVisiblePosition5Item]].BoolValue = true; - -// // Show feedback on buttons -// } -// } -//} \ No newline at end of file diff --git a/PepperDashEssentials/FOR REFERENCE UI/Panels/REMOVE UiCue.cs b/PepperDashEssentials/FOR REFERENCE UI/Panels/REMOVE UiCue.cs deleted file mode 100644 index 1bfaa2bb..00000000 --- a/PepperDashEssentials/FOR REFERENCE UI/Panels/REMOVE UiCue.cs +++ /dev/null @@ -1,43 +0,0 @@ -//using System; -//using System.Collections.Generic; -//using System.Linq; -//using System.Text; -//using Crestron.SimplSharp; - -//namespace PepperDash.Essentials.Core -//{ -// public class UiCue -// { -// public static readonly Cue VisibleSystemInit = Cue.BoolCue("VisibleSystemInit", 15001); -// public static readonly Cue VisibleSplash = Cue.BoolCue("VisibleSplash", 15002); -// public static readonly Cue PressSplash = Cue.BoolCue("PressSplash", 15003); -// public static readonly Cue PressRoomOn = Cue.BoolCue("PressRoomOn", 15006); -// public static readonly Cue PressRoomOff = Cue.BoolCue("PressRoomOff", 15007); -// public static readonly Cue PressRoomOffWithConfirm = Cue.BoolCue("PressRoomOffWithConfirm", 15008); -// public static readonly Cue VisibleCommonHeader = Cue.BoolCue("PressPowerOffConfirm", 15011); -// public static readonly Cue VisibleCommonFooter = Cue.BoolCue("VisibleCommonFooter", 15012); -// public static readonly Cue PressHelp = Cue.BoolCue("PressHelp", 15013); -// public static readonly Cue PressSettings = Cue.BoolCue("PressSettings", 15014); - -// public static readonly Cue ShowDate = Cue.BoolCue("PressSettings", 15015); -// public static readonly Cue ShowTime = Cue.BoolCue("PressSettings", 15016); -// public static readonly Cue ShowLicensed = Cue.BoolCue("PressSettings", 15017); -// public static readonly Cue ShowUnLicensed = Cue.BoolCue("PressSettings", 15018); - -// public static readonly Cue PressModePresentationShare = Cue.BoolCue("PressModePresentationShare", 15101); -// public static readonly Cue PressModeVideoConf = Cue.BoolCue("PressModeVideoConf", 15102); -// public static readonly Cue PressModeAudioConf = Cue.BoolCue("PressModeAudioConf", 15103); - -// public static readonly Cue VisiblePresentationSourceList = Cue.BoolCue("VisiblePresentationSourceList", 15111); -// public static readonly Cue VisibleSystemIsOff = Cue.BoolCue("VisibleSystemIsOff", 15112); - -// public static readonly Cue VisibleAudioConfPopover = Cue.BoolCue("VisibleAudioConfPopover", 15201); - -// public static readonly Cue VisibleVideoConfPopover = Cue.BoolCue("VisibleVideoConfPopover", 15251); - -// public static readonly Cue TextRoomName = Cue.BoolCue("TextRoomName", 4001); -// public static readonly Cue TextPresentationShareButton = Cue.BoolCue("TextPresentationShareButton", 4011); - -// public static readonly Cue SplashMessage = Cue.StringCue("SplashMessage", 2101); -// } -//} \ No newline at end of file diff --git a/PepperDashEssentials/FOR REFERENCE UI/Panels/SmartGraphicsTouchpanelControllerBase.cs b/PepperDashEssentials/FOR REFERENCE UI/Panels/SmartGraphicsTouchpanelControllerBase.cs deleted file mode 100644 index 8e8b9192..00000000 --- a/PepperDashEssentials/FOR REFERENCE UI/Panels/SmartGraphicsTouchpanelControllerBase.cs +++ /dev/null @@ -1,318 +0,0 @@ -//using System; -//using System.Collections.Generic; -//using System.Linq; -//using Crestron.SimplSharp; -//using Crestron.SimplSharpPro; -//using Crestron.SimplSharpPro.DeviceSupport; - - -//namespace PepperDash.Essentials.Core -//{ -// public abstract class SmartGraphicsTouchpanelControllerBase : CrestronGenericBaseDevice -// { -// public BasicTriListWithSmartObject TriList { get; protected set; } -// public bool UsesSplashPage { get; set; } -// public string SplashMessage { get; set; } -// public bool ShowDate -// { -// set { TriList.BooleanInput[UiCue.ShowDate.Number].BoolValue = value; } -// } -// public bool ShowTime -// { -// set { TriList.BooleanInput[UiCue.ShowTime.Number].BoolValue = value; } -// } - -// //public abstract List FunctionList { get; } - - -// protected eMainModeType MainMode; -// protected SourceListItem CurrentPresentationControlDevice; - -// /// -// /// Defines the signal offset for the presentation device. Defaults to 100 -// /// -// public uint PresentationControlDeviceJoinOffset { get { return 100; } } - -// public enum eMainModeType -// { -// Presentation, Splash, Tech -// } - -// protected string SgdFilePath; -// public EssentialsRoom CurrentRoom { get; protected set; } -// protected Dictionary LoadedPageControllers -// = new Dictionary(); - -// static object RoomChangeLock = new object(); - -// /// -// /// Constructor -// /// -// public SmartGraphicsTouchpanelControllerBase(string key, string name, BasicTriListWithSmartObject triList, -// string sgdFilePath) -// : base(key, name, triList) -// { -// TriList = triList; -// if (string.IsNullOrEmpty(key)) throw new ArgumentNullException("key"); -// if (string.IsNullOrEmpty(sgdFilePath)) throw new ArgumentNullException("sgdFilePath"); -// SgdFilePath = sgdFilePath; -// TriList.LoadSmartObjects(SgdFilePath); -// UsesSplashPage = true; -// SplashMessage = "Welcome"; -// TriList.SigChange += Tsw_AnySigChange; -// foreach (var kvp in TriList.SmartObjects) -// kvp.Value.SigChange += this.Tsw_AnySigChange; -// } - -//#warning wire UI manipulating presses up here, typically in child classes... -// //public override bool CustomActivate() -// //{ -// // var baseSuccess = base.CustomActivate(); -// // if (!baseSuccess) return false; - - -// // // Wiring up the buttons with UOs -// // foreach (var uo in this.FunctionList) -// // { -// // if (uo.Cue.Number == 0) continue; -// // //if (uo is BoolCueActionPair) -// // // TriList.BooleanOutput[uo.Cue.Number].UserObject = uo; -// // //else if (uo is UShortCueActionPair) -// // // TriList.UShortOutput[uo.Cue.Number].UserObject = uo; -// // //else if (uo is StringCueActionPair) -// // // TriList.StringOutput[uo.Cue.Number].UserObject = uo; -// // } - -// // return true; -// //} - -// //public void SetCurrentRoom(EssentialsRoom room) -// //{ -// // if (CurrentRoom != null) -// // HideRoomUI(); -// // CurrentRoom = room; -// // ShowRoomUI(); -// //} - -// /// -// /// -// /// -// /// -// public void SetCurrentRoom(EssentialsRoom room) -// { -// if (CurrentRoom == room) return; - -// IBasicVolumeControls oldAudio = null; -// //Disconnect current room and audio device -// if (CurrentRoom != null) -// { -// HideRoomUI(); -// CurrentRoom.AudioDeviceWillChange -= CurrentRoom_AudioDeviceWillChange; -// CurrentRoom.PresentationSourceChange -= CurrentRoom_PresentationSourceChange; -// oldAudio = CurrentRoom.CurrentAudioDevice; -// } - -// CurrentRoom = room; -// IBasicVolumeControls newAudio = null; -// if (CurrentRoom != null) -// { -// CurrentRoom.AudioDeviceWillChange += this.CurrentRoom_AudioDeviceWillChange; -// CurrentRoom.PresentationSourceChange += this.CurrentRoom_PresentationSourceChange; -// SetControlSource(CurrentRoom.CurrentPresentationSourceInfo); -// newAudio = CurrentRoom.CurrentAudioDevice; -// ShowRoomUI(); -// } - -// SwapAudioDeviceControls(oldAudio, newAudio); -// } - -// /// -// /// Detaches and attaches an IVolumeFunctions device to the appropriate TP TriList signals. -// /// This will also add IVolumeNumeric if the device implements it. -// /// Overriding classes should call this. Overriding classes are responsible for -// /// linking up to hard keys, etc. -// /// -// /// May be null -// /// May be null -// protected virtual void SwapAudioDeviceControls(IBasicVolumeControls oldDev, IBasicVolumeControls newDev) -// { -// // Disconnect -// if (oldDev != null) -// { -// TriList.BooleanOutput[CommonBoolCue.VolumeDown.Number].UserObject = null; -// TriList.BooleanOutput[CommonBoolCue.VolumeUp.Number].UserObject = null; -// TriList.BooleanOutput[CommonBoolCue.MuteToggle.Number].UserObject = null; -// TriList.BooleanInput[CommonBoolCue.ShowVolumeButtons.Number].BoolValue = false; -// TriList.BooleanInput[CommonBoolCue.ShowVolumeSlider.Number].BoolValue = false; -// if (oldDev is IBasicVolumeWithFeedback) -// { -// var fbDev = oldDev as IBasicVolumeWithFeedback; -// TriList.UShortOutput[401].UserObject = null; -// fbDev.MuteFeedback.UnlinkInputSig(TriList.BooleanInput[403]); -// fbDev.VolumeLevelFeedback.UnlinkInputSig(TriList.UShortInput[401]); -// } -// } -// if (newDev != null) -// { -// TriList.BooleanInput[CommonBoolCue.ShowVolumeSlider.Number].BoolValue = true; -// TriList.SetBoolSigAction(401, newDev.VolumeUp); -// TriList.SetBoolSigAction(402, newDev.VolumeDown); -// TriList.SetSigFalseAction(405, newDev.MuteToggle); - -// if (newDev is IBasicVolumeWithFeedback) // Show slider -// { -// var fbDev = newDev as IBasicVolumeWithFeedback; -// TriList.BooleanInput[406].BoolValue = false; -// TriList.BooleanInput[407].BoolValue = true; -// TriList.UShortOutput[401].UserObject = new Action(fbDev.SetVolume); -// fbDev.VolumeLevelFeedback.LinkInputSig(TriList.UShortInput[401]); -// } -// else // Show buttons only -// { -// TriList.BooleanInput[406].BoolValue = true; -// TriList.BooleanInput[407].BoolValue = false; -// } - -// } -// } - - -// /// -// /// Does nothing. Override to add functionality when calling SetCurrentRoom -// /// -// protected virtual void HideRoomUI() { } - -// /// -// /// Does nothing. Override to add functionality when calling SetCurrentRoom -// /// -// protected virtual void ShowRoomUI() { } - -// /// -// /// Sets up the current presentation device and updates statuses if the device is capable. -// /// -// protected void SetControlSource(SourceListItem newSource) -// { -// if (CurrentPresentationControlDevice != null) -// { -// HideCurrentPresentationSourceUi(); -//#warning Get button methods from RESI, and find a more-well-defined way to wire up feedbacks - -// // Unhook presses and things -// //if (CurrentPresentationControlDevice is IHasCueActionList) -// //{ -// // foreach (var uo in (CurrentPresentationControlDevice as IHasCueActionList).CueActionList) -// // { -// // if (uo.Cue.Number == 0) continue; -// // if (uo is BoolCueActionPair) -// // { -// // var bSig = TriList.BooleanOutput[uo.Cue.Number]; -// // // Disconnection should also clear bool sigs in case they are pressed and -// // // might be orphaned -// // if (bSig.BoolValue) -// // (bSig.UserObject as BoolCueActionPair).Invoke(false); -// // bSig.UserObject = null; -// // } -// // else if (uo is UShortCueActionPair) -// // TriList.UShortOutput[uo.Cue.Number].UserObject = null; -// // else if (uo is StringCueActionPair) -// // TriList.StringOutput[uo.Cue.Number].UserObject = null; -// // } -// //} -// // unhook outputs -// if (CurrentPresentationControlDevice is IHasFeedback) -// { -// foreach (var fb in (CurrentPresentationControlDevice as IHasFeedback).Feedbacks) -// { -// if (fb.Cue.Number == 0) continue; -// if (fb is BoolFeedback) -// (fb as BoolFeedback).UnlinkInputSig(TriList.BooleanInput[fb.Cue.Number]); -// else if (fb is IntFeedback) -// (fb as IntFeedback).UnlinkInputSig(TriList.UShortInput[fb.Cue.Number]); -// else if (fb is StringFeedback) -// (fb as StringFeedback).UnlinkInputSig(TriList.StringInput[fb.Cue.Number]); -// } -// } -// } -// CurrentPresentationControlDevice = newSource; -// //connect presses and things -// //if (newSource is IHasCueActionList) // This has functions, get 'em -// //{ -// // foreach (var ao in (newSource as IHasCueActionList).CueActionList) -// // { -// // if (ao.Cue.Number == 0) continue; -// // if (ao is BoolCueActionPair) -// // TriList.BooleanOutput[ao.Cue.Number].UserObject = ao; -// // else if (ao is UShortCueActionPair) -// // TriList.UShortOutput[ao.Cue.Number].UserObject = ao; -// // else if (ao is StringCueActionPair) -// // TriList.StringOutput[ao.Cue.Number].UserObject = ao; -// // } -// //} -// // connect outputs (addInputSig should update sig) -// if (CurrentPresentationControlDevice is IHasFeedback) -// { -// foreach (var fb in (CurrentPresentationControlDevice as IHasFeedback).Feedbacks) -// { -// if (fb.Cue.Number == 0) continue; -// if (fb is BoolFeedback) -// (fb as BoolFeedback).LinkInputSig(TriList.BooleanInput[fb.Cue.Number]); -// else if (fb is IntFeedback) -// (fb as IntFeedback).LinkInputSig(TriList.UShortInput[fb.Cue.Number]); -// else if (fb is StringFeedback) -// (fb as StringFeedback).LinkInputSig(TriList.StringInput[fb.Cue.Number]); -// } -// } -// ShowCurrentPresentationSourceUi(); -// } - -// /// -// /// Reveals the basic UI for the current device -// /// -// protected virtual void ShowCurrentPresentationSourceUi() -// { -// } - -// /// -// /// Hides the UI for the current device and calls for a feedback signal cleanup -// /// -// protected virtual void HideCurrentPresentationSourceUi() -// { -// } - - -// /// -// /// -// /// -// void CurrentRoom_PresentationSourceChange(object sender, EssentialsRoomSourceChangeEventArgs args) -// { -// SetControlSource(args.NewSource); -// } - - -// /// -// /// -// /// -// void CurrentRoom_AudioDeviceWillChange(object sender, EssentialsRoomAudioDeviceChangeEventArgs e) -// { -// SwapAudioDeviceControls(e.OldDevice, e.NewDevice); -// } - - - -// /// -// /// Panel event handler -// /// -// void Tsw_AnySigChange(object currentDevice, SigEventArgs args) -// { -// // plugged in commands -// object uo = args.Sig.UserObject; - -// if (uo is Action) -// (uo as Action)(args.Sig.BoolValue); -// else if (uo is Action) -// (uo as Action)(args.Sig.UShortValue); -// else if (uo is Action) -// (uo as Action)(args.Sig.StringValue); -// } -// } -//} \ No newline at end of file diff --git a/PepperDashEssentials/FOR REFERENCE UI/SRL/SourceListSubpageReferenceList.cs b/PepperDashEssentials/FOR REFERENCE UI/SRL/SourceListSubpageReferenceList.cs deleted file mode 100644 index 6eee8bd6..00000000 --- a/PepperDashEssentials/FOR REFERENCE UI/SRL/SourceListSubpageReferenceList.cs +++ /dev/null @@ -1,164 +0,0 @@ -//using System; -//using System.Collections.Generic; -//using System.Linq; -//using System.Text; -//using Crestron.SimplSharp; -//using Crestron.SimplSharpPro; -//using Crestron.SimplSharpPro.DeviceSupport; -//using Crestron.SimplSharpPro.UI; - -//using PepperDash.Core; -//using PepperDash.Essentials.Core; - -//namespace PepperDash.Essentials -//{ - -// //***************************************************************************** -// /// -// /// Wrapper class for subpage reference list. Contains helpful methods to get at the various signal groupings -// /// and to get individual signals using an index and a join. -// /// -// public class SourceListSubpageReferenceList : SubpageReferenceList -// { -// public const uint SmartObjectJoin = 3801; - -// Action SourceSelectCallback; - -// EssentialsRoom CurrentRoom; - -// public SourceListSubpageReferenceList(BasicTriListWithSmartObject tl, -// Action sourceSelectCallback) -// : base(tl, SmartObjectJoin, 3, 1, 3) -// { -// SourceSelectCallback = sourceSelectCallback; -// } - -// void SetSourceList(Dictionary dict) -// { -// // Iterate all positions, including ones missing from the dict. -// var max = dict.Keys.Max(); -// for (uint i = 1; i <= max; i++) -// { -// // Add the source if it's in the dict -// if (dict.ContainsKey(i)) -// { -// Items.Add(new SourceListSubpageReferenceListItem(i, dict[i], this, SourceSelectCallback)); -// // Plug the callback function into the buttons -// } -// // Blank the line -// else -// Items.Add(new SourceListSubpageReferenceListItem(i, null, -// this, SourceSelectCallback)); -// } -// Count = (ushort)max; -// } - -// /// -// /// Links the SRL to the Room's PresentationSourceChange event for updating of the UI -// /// -// /// -// public void AttachToRoom(EssentialsRoom room) -// { -// CurrentRoom = room; -// SetSourceList(room.Sources); -// CurrentRoom.PresentationSourceChange -= CurrentRoom_PresentationSourceChange; -// CurrentRoom.PresentationSourceChange += CurrentRoom_PresentationSourceChange; -// SetPresentationSourceFb(CurrentRoom.CurrentPresentationSource); -// } - -// /// -// /// Disconnects the SRL from a Room's PresentationSourceChange -// /// -// public void DetachFromCurrentRoom() -// { -// ClearPresentationSourceFb(CurrentRoom.CurrentPresentationSource); -// if(CurrentRoom != null) -// CurrentRoom.PresentationSourceChange -= CurrentRoom_PresentationSourceChange; -// CurrentRoom = null; -// } - -// // Handler to route source changes into list feedback -// void CurrentRoom_PresentationSourceChange(object sender, EssentialsRoomSourceChangeEventArgs args) -// { -// Debug.Console(2, "SRL received source change"); -// ClearPresentationSourceFb(args.OldSource); -// SetPresentationSourceFb(args.NewSource); -// } - -// void ClearPresentationSourceFb(IPresentationSource source) -// { -// if (source == null) return; -// var oldSourceItem = (SourceListSubpageReferenceListItem)Items.FirstOrDefault( -// i => ((SourceListSubpageReferenceListItem)i).SourceDevice == source); -// if (oldSourceItem != null) -// oldSourceItem.ClearFeedback(); -// } - -// void SetPresentationSourceFb(SourceListItem source) -// { -// if (source == null) return; -// // Now set the new source to light up -// var newSourceItem = (SourceListSubpageReferenceListItem)Items.FirstOrDefault( -// i => ((SourceListSubpageReferenceListItem)i).SourceDevice == source); -// if (newSourceItem != null) -// newSourceItem.SetFeedback(); -// } -// } - -// public class SourceListSubpageReferenceListItem : SubpageReferenceListItem -// { -// public readonly IPresentationSource SourceDevice; - -// public const uint ButtonPressJoin = 1; -// public const uint SelectedFeedbackJoin = 2; -// public const uint ButtonTextJoin = 1; -// public const uint IconNameJoin = 2; - -// public SourceListSubpageReferenceListItem(uint index, SourceListItem srcDeviceItem, -// SubpageReferenceList owner, Action sourceSelectCallback) -// : base(index, owner) -// { -// if (srcDeviceItem == null) throw new ArgumentNullException("srcDeviceItem"); -// if (owner == null) throw new ArgumentNullException("owner"); -// if (sourceSelectCallback == null) throw new ArgumentNullException("sourceSelectCallback"); - - -// SourceDevice = srcDeviceItem; -// var nameSig = owner.StringInputSig(index, ButtonTextJoin); -// // Should be able to see if there is not enough buttons right here -// if (nameSig == null) -// { -// Debug.Console(0, "ERROR: Item {0} does not exist on source list SRL", index); -// return; -// } -// nameSig.StringValue = srcDeviceItem.Name; -// owner.StringInputSig(index, IconNameJoin).StringValue = srcDeviceItem.Icon; - -// // Assign a source selection action to the appropriate button's UserObject - on release -// owner.GetBoolFeedbackSig(index, ButtonPressJoin).UserObject = new Action(b => -// { if (!b) sourceSelectCallback(index); }); - -// // hook up the video icon -// var videoDev = srcDeviceItem as IAttachVideoStatus; -// if (videoDev != null) -// { -// var status = videoDev.GetVideoStatuses(); -// if (status != null) -// { -// Debug.Console(1, "Linking {0} video status to SRL", videoDev.Key); -// videoDev.GetVideoStatuses().VideoSyncFeedback.LinkInputSig(owner.BoolInputSig(index, 3)); -// } -// } -// } - -// public void SetFeedback() -// { -// Owner.BoolInputSig(Index, SelectedFeedbackJoin).BoolValue = true; -// } - -// public void ClearFeedback() -// { -// Owner.BoolInputSig(Index, SelectedFeedbackJoin).BoolValue = false; -// } -// } -//} \ No newline at end of file diff --git a/PepperDashEssentials/PepperDashEssentials.csproj b/PepperDashEssentials/PepperDashEssentials.csproj index 14725a1b..371d2213 100644 --- a/PepperDashEssentials/PepperDashEssentials.csproj +++ b/PepperDashEssentials/PepperDashEssentials.csproj @@ -165,18 +165,13 @@ - - - - - @@ -208,12 +203,6 @@ - - - - - - @@ -243,8 +232,6 @@ - - @@ -270,9 +257,6 @@ Essentials Devices Common - - - diff --git a/PepperDashEssentials/REMOVE EssentialsApp.cs b/PepperDashEssentials/REMOVE EssentialsApp.cs deleted file mode 100644 index 3e71d576..00000000 --- a/PepperDashEssentials/REMOVE EssentialsApp.cs +++ /dev/null @@ -1,69 +0,0 @@ -//using System; -//using System.Collections.Generic; -//using System.Linq; -//using Crestron.SimplSharp; -//using Crestron.SimplSharp.CrestronIO; -//using Crestron.SimplSharpPro; -//using Crestron.SimplSharpPro.DeviceSupport; -//using Crestron.SimplSharpPro.CrestronThread; -//using Crestron.SimplSharpPro.Diagnostics; -//using Crestron.SimplSharpPro.EthernetCommunication; -//using Crestron.SimplSharpPro.UI; - -//using Crestron.SimplSharpPro.DM; -//using Crestron.SimplSharpPro.DM.Cards; -//using Crestron.SimplSharpPro.DM.Endpoints.Transmitters; - -//using PepperDash.Essentials.Core; -//using PepperDash.Essentials.Core.Devices; -////using PepperDash.Essentials.Core.Devices.Dm; - -//using PepperDash.Essentials.Displays; - -////using PepperDash.Essentials.Core.Http; -//using PepperDash.Core; - - -//namespace PepperDash.Essentials -//{ -// public class EssentialsApp -// { -// public string ConfigPath { get; set; } - -// public Dictionary Rooms { get; private set; } - -// //EssentialsHttpApiHandler ApiHandler; // MOVE ??????????????????? - -// public EssentialsApp(CrestronControlSystem cs) -// { -// // Use a fake license manager for now -// Global.LicenseManager = PepperDash.Essentials.License.MockEssentialsLicenseManager.Manager; - - -// // ---------------------------------- Make this configurable -// //var server = Global.HttpConfigServer; -// //server.Start(8081, "HttpConfigServer"); -// //ConfigPath = string.Format(@"\NVRAM\Program{0}\EssentialsConfiguration.json", -// // InitialParametersClass.ApplicationNumber); -// //ApiHandler = new EssentialsHttpApiHandler(server, ConfigPath, @"\HTML\presets\lists\"); - -// Debug.Console(0, "\r\r--------------------CONFIG BEGIN--------------------\r"); -// Configuration.Initialize(cs); -// Configuration.ReadConfiguration(ConfigPath); -// Debug.Console(0, "\r--------------------CONFIG END----------------------\r\r"); -// } -// } - -// public class ResponseToken -// { -// public string Token { get; private set; } -// public DateTime Expires { get; private set; } -// public bool IsExpired { get { return Expires < DateTime.Now; } } - -// public ResponseToken(int timeoutMinutes) -// { -// Expires = DateTime.Now.AddMinutes(timeoutMinutes); -// Token = Guid.NewGuid().ToString(); -// } -// } -//} \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Comm and IR/CecPortController.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/Comm and IR/CecPortController.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Comm and IR/CecPortController.cs rename to essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/Comm and IR/CecPortController.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Comm and IR/ComPortController.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/Comm and IR/ComPortController.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Comm and IR/ComPortController.cs rename to essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/Comm and IR/ComPortController.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Comm and IR/ComSpecJsonConverter.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/Comm and IR/ComSpecJsonConverter.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Comm and IR/ComSpecJsonConverter.cs rename to essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/Comm and IR/ComSpecJsonConverter.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Comm and IR/CommFactory.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/Comm and IR/CommFactory.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Comm and IR/CommFactory.cs rename to essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/Comm and IR/CommFactory.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Comm and IR/CommunicationExtras.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/Comm and IR/CommunicationExtras.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Comm and IR/CommunicationExtras.cs rename to essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/Comm and IR/CommunicationExtras.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Comm and IR/ConsoleCommMockDevice.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/Comm and IR/ConsoleCommMockDevice.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Comm and IR/ConsoleCommMockDevice.cs rename to essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/Comm and IR/ConsoleCommMockDevice.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Comm and IR/DELETE ComPortController.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/Comm and IR/DELETE ComPortController.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Comm and IR/DELETE ComPortController.cs rename to essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/Comm and IR/DELETE ComPortController.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Comm and IR/GenericComm.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/Comm and IR/GenericComm.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Comm and IR/GenericComm.cs rename to essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/Comm and IR/GenericComm.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Comm and IR/IRPortHelper.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/Comm and IR/IRPortHelper.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Comm and IR/IRPortHelper.cs rename to essentials-framework/Essentials Core/PepperDashEssentialsBase/Config/Comm and IR/IRPortHelper.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Constants/CommonCues.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Constants/CommonCues.cs deleted file mode 100644 index fceb9ad7..00000000 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Constants/CommonCues.cs +++ /dev/null @@ -1,127 +0,0 @@ -using Crestron.SimplSharpPro; - -namespace PepperDash.Essentials.Core -{ - public static class CommonBoolCue - { - public static readonly Cue Power = new Cue("Power", 101, eCueType.Bool); - public static readonly Cue PowerOn = new Cue("PowerOn", 102, eCueType.Bool); - public static readonly Cue PowerOff = new Cue("PowerOff", 103, eCueType.Bool); - - public static readonly Cue HasPowerFeedback = new Cue("HasPowerFeedback", 101, eCueType.Bool); - public static readonly Cue PowerOnFeedback = new Cue("PowerOnFeedback", 102, eCueType.Bool); - public static readonly Cue IsOnlineFeedback = new Cue("IsOnlineFeedback", 104, eCueType.Bool); - public static readonly Cue IsWarmingUp = new Cue("IsWarmingUp", 105, eCueType.Bool); - public static readonly Cue IsCoolingDown = new Cue("IsCoolingDown", 106, eCueType.Bool); - - public static readonly Cue Dash = new Cue("Dash", 109, eCueType.Bool); - public static readonly Cue Digit0 = new Cue("Digit0", 110, eCueType.Bool); - public static readonly Cue Digit1 = new Cue("Digit1", 111, eCueType.Bool); - public static readonly Cue Digit2 = new Cue("Digit2", 112, eCueType.Bool); - public static readonly Cue Digit3 = new Cue("Digit3", 113, eCueType.Bool); - public static readonly Cue Digit4 = new Cue("Digit4", 114, eCueType.Bool); - public static readonly Cue Digit5 = new Cue("Digit5", 115, eCueType.Bool); - public static readonly Cue Digit6 = new Cue("Digit6", 116, eCueType.Bool); - public static readonly Cue Digit7 = new Cue("Digit7", 117, eCueType.Bool); - public static readonly Cue Digit8 = new Cue("Digit8", 118, eCueType.Bool); - public static readonly Cue Digit9 = new Cue("Digit9", 119, eCueType.Bool); - public static readonly Cue KeypadMisc1 = new Cue("KeypadMisc1", 120, eCueType.Bool); - public static readonly Cue KeypadMisc2 = new Cue("KeypadMisc2", 121, eCueType.Bool); - - public static readonly Cue NumericEnter = new Cue("Enter", 122, eCueType.Bool); - public static readonly Cue ChannelUp = new Cue("ChannelUp", 123, eCueType.Bool); - public static readonly Cue ChannelDown = new Cue("ChannelDown", 124, eCueType.Bool); - public static readonly Cue Last = new Cue("Last", 125, eCueType.Bool); - public static readonly Cue OpenClose = new Cue("OpenClose", 126, eCueType.Bool); - public static readonly Cue Subtitle = new Cue("Subtitle", 127, eCueType.Bool); - public static readonly Cue Audio = new Cue("Audio", 128, eCueType.Bool); - public static readonly Cue Info = new Cue("Info", 129, eCueType.Bool); - public static readonly Cue Menu = new Cue("Menu", 130, eCueType.Bool); - public static readonly Cue DeviceMenu = new Cue("DeviceMenu", 131, eCueType.Bool); - public static readonly Cue Return = new Cue("Return", 132, eCueType.Bool); - public static readonly Cue Back = new Cue("Back", 133, eCueType.Bool); - public static readonly Cue Exit = new Cue("Exit", 134, eCueType.Bool); - public static readonly Cue Clear = new Cue("Clear", 135, eCueType.Bool); - public static readonly Cue List = new Cue("List", 136, eCueType.Bool); - public static readonly Cue Guide = new Cue("Guide", 137, eCueType.Bool); - public static readonly Cue Am = new Cue("Am", 136, eCueType.Bool); - public static readonly Cue Fm = new Cue("Fm", 137, eCueType.Bool); - public static readonly Cue Up = new Cue("Up", 138, eCueType.Bool); - public static readonly Cue Down = new Cue("Down", 139, eCueType.Bool); - public static readonly Cue Left = new Cue("Left", 140, eCueType.Bool); - public static readonly Cue Right = new Cue("Right", 141, eCueType.Bool); - public static readonly Cue Select = new Cue("Select", 142, eCueType.Bool); - public static readonly Cue SmartApps = new Cue("SmartApps", 143, eCueType.Bool); - public static readonly Cue Dvr = new Cue("Dvr", 144, eCueType.Bool); - - public static readonly Cue Play = new Cue("Play", 145, eCueType.Bool); - public static readonly Cue Pause = new Cue("Pause", 146, eCueType.Bool); - public static readonly Cue Stop = new Cue("Stop", 147, eCueType.Bool); - public static readonly Cue ChapNext = new Cue("ChapNext", 148, eCueType.Bool); - public static readonly Cue ChapPrevious = new Cue("ChapPrevious", 149, eCueType.Bool); - public static readonly Cue Rewind = new Cue("Rewind", 150, eCueType.Bool); - public static readonly Cue Ffwd = new Cue("Ffwd", 151, eCueType.Bool); - public static readonly Cue Replay = new Cue("Replay", 152, eCueType.Bool); - public static readonly Cue Advance = new Cue("Advance", 153, eCueType.Bool); - public static readonly Cue Record = new Cue("Record", 154, eCueType.Bool); - public static readonly Cue Red = new Cue("Red", 155, eCueType.Bool); - public static readonly Cue Green = new Cue("Green", 156, eCueType.Bool); - public static readonly Cue Yellow = new Cue("Yellow", 157, eCueType.Bool); - public static readonly Cue Blue = new Cue("Blue", 158, eCueType.Bool); - public static readonly Cue Home = new Cue("Home", 159, eCueType.Bool); - public static readonly Cue PopUp = new Cue("PopUp", 160, eCueType.Bool); - public static readonly Cue PageUp = new Cue("PageUp", 161, eCueType.Bool); - public static readonly Cue PageDown = new Cue("PageDown", 162, eCueType.Bool); - public static readonly Cue Search = new Cue("Search", 163, eCueType.Bool); - public static readonly Cue Setup = new Cue("Setup", 164, eCueType.Bool); - public static readonly Cue RStep = new Cue("RStep", 165, eCueType.Bool); - public static readonly Cue FStep = new Cue("FStep", 166, eCueType.Bool); - - public static readonly Cue IsConnected = new Cue("IsConnected", 281, eCueType.Bool); - public static readonly Cue IsOk = new Cue("IsOk", 282, eCueType.Bool); - public static readonly Cue InWarning = new Cue("InWarning", 283, eCueType.Bool); - public static readonly Cue InError = new Cue("InError", 284, eCueType.Bool); - public static readonly Cue StatusUnknown = new Cue("StatusUnknown", 285, eCueType.Bool); - - public static readonly Cue VolumeUp = new Cue("VolumeUp", 401, eCueType.Bool); - public static readonly Cue VolumeDown = new Cue("VolumeDown", 402, eCueType.Bool); - public static readonly Cue MuteOn = new Cue("MuteOn", 403, eCueType.Bool); - public static readonly Cue MuteOff = new Cue("MuteOff", 404, eCueType.Bool); - public static readonly Cue MuteToggle = new Cue("MuteToggle", 405, eCueType.Bool); - public static readonly Cue ShowVolumeButtons = new Cue("ShowVolumeButtons", 406, eCueType.Bool); - public static readonly Cue ShowVolumeSlider = new Cue("ShowVolumeSlider", 407, eCueType.Bool); - - public static readonly Cue Hdmi1 = new Cue("Hdmi1", 451, eCueType.Bool); - public static readonly Cue Hdmi2 = new Cue("Hdmi2", 452, eCueType.Bool); - public static readonly Cue Hdmi3 = new Cue("Hdmi3", 453, eCueType.Bool); - public static readonly Cue Hdmi4 = new Cue("Hdmi4", 454, eCueType.Bool); - public static readonly Cue Hdmi5 = new Cue("Hdmi5", 455, eCueType.Bool); - public static readonly Cue Hdmi6 = new Cue("Hdmi6", 456, eCueType.Bool); - public static readonly Cue DisplayPort1 = new Cue("DisplayPort1", 457, eCueType.Bool); - public static readonly Cue DisplayPort2 = new Cue("DisplayPort2", 458, eCueType.Bool); - public static readonly Cue Dvi1 = new Cue("Dvi1", 459, eCueType.Bool); - public static readonly Cue Dvi2 = new Cue("Dvi2", 460, eCueType.Bool); - public static readonly Cue Video1 = new Cue("Video1", 461, eCueType.Bool); - public static readonly Cue Video2 = new Cue("Video2", 462, eCueType.Bool); - public static readonly Cue Component1 = new Cue("Component1", 463, eCueType.Bool); - public static readonly Cue Component2 = new Cue("Component2", 464, eCueType.Bool); - public static readonly Cue Vga1 = new Cue("Vga1", 465, eCueType.Bool); - public static readonly Cue Vga2 = new Cue("Vga2", 466, eCueType.Bool); - public static readonly Cue Rgb1 = new Cue("Rgb1", 467, eCueType.Bool); - public static readonly Cue Rgb2 = new Cue("Rgb2", 468, eCueType.Bool); - public static readonly Cue Antenna = new Cue("Antenna", 469, eCueType.Bool); - - public static readonly Cue InCall = new Cue("InCall", 501, eCueType.Bool); - } - - public static class CommonIntCue - { - public static readonly Cue MainVolumeLevel = new Cue("MainVolumeLevel", 401, eCueType.Int); - public static readonly Cue MainVolumeLevelFeedback = new Cue("MainVolumeLevelFeedback", 401, eCueType.Int); - } - - public static class CommonStringCue - { - public static readonly Cue IpConnectionsText = new Cue("IpConnectionsText", 9999, eCueType.String); - } -} \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Cues and DevAction/Cues.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Cues and DevAction/Cues.cs deleted file mode 100644 index a3940a98..00000000 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Cues and DevAction/Cues.cs +++ /dev/null @@ -1,98 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro; - - -namespace PepperDash.Essentials.Core -{ - /// - /// Encapsulates a string-named, joined and typed command to a device - /// - [Obsolete()] - public class DevAction - { - public Cue Cue { get; private set; } - public Action Action { get; private set; } - - - public DevAction(Cue cue, Action action) - { - Cue = cue; - Action = action; - } - } - - public enum eCueType - { - Bool, Int, String, Serial, Void, Other - } - - - /// - /// The Cue class is a container to represent a name / join number / type for simplifying - /// commands coming into devices. - /// - public class Cue - { - public string Name { get; private set; } - public uint Number { get; private set; } - public eCueType Type { get; private set; } - - public Cue(string name, uint join, eCueType type) - { - Name = name; - Number = join; - Type = type; - } - - /// - /// Override that prints out the cue's data - /// - public override string ToString() - { - return string.Format("{0} Cue '{1}'-{2}", Type, Name, Number); - } - - ///// - ///// Returns a new Cue with JoinNumber offset - ///// - //public Cue GetOffsetCopy(uint offset) - //{ - // return new Cue(Name, Number + offset, Type); - //} - - /// - /// Helper method to create a Cue of Bool type - /// - /// Cue - public static Cue BoolCue(string name, uint join) - { - return new Cue(name, join, eCueType.Bool); - } - - /// - /// Helper method to create a Cue of ushort type - /// - /// Cue - public static Cue UShortCue(string name, uint join) - { - return new Cue(name, join, eCueType.Int); - } - - /// - /// Helper method to create a Cue of string type - /// - /// Cue - public static Cue StringCue(string name, uint join) - { - return new Cue(name, join, eCueType.String); - } - - public static readonly Cue DefaultBoolCue = new Cue("-none-", 0, eCueType.Bool); - public static readonly Cue DefaultIntCue = new Cue("-none-", 0, eCueType.Int); - public static readonly Cue DefaultStringCue = new Cue("-none-", 0, eCueType.String); - } -} \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/AudioInterfaces.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/AudioInterfaces.cs new file mode 100644 index 00000000..90aa4909 --- /dev/null +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/AudioInterfaces.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Crestron.SimplSharp; +using Crestron.SimplSharpPro; +using Crestron.SimplSharpPro.DeviceSupport; + +namespace PepperDash.Essentials.Core +{ + + public enum AudioChangeType + { + Mute, Volume + } + + public class AudioChangeEventArgs + { + public AudioChangeType ChangeType { get; private set; } + public IBasicVolumeControls AudioDevice { get; private set; } + + public AudioChangeEventArgs(IBasicVolumeControls device, AudioChangeType changeType) + { + ChangeType = changeType; + AudioDevice = device; + } + } +} \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/IHasFeedbacks.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/IHasFeedbacks.cs index a21d2a3a..cc5e1054 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/IHasFeedbacks.cs +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/IHasFeedbacks.cs @@ -26,9 +26,7 @@ namespace PepperDash.Essentials.Core // get the properties and set them into a new collection of NameType wrappers var props = t.GetProperties().Select(p => new PropertyNameType(p, t)); - - - var feedbacks = source.Feedbacks.OrderBy(x => x.Type); + var feedbacks = source.Feedbacks; if (feedbacks != null) { Debug.Console(0, source, "\n\nAvailable feedbacks:"); diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/IrOutputPortController.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/IrOutputPortController.cs index c67afe1c..67a74ed7 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/IrOutputPortController.cs +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/IrOutputPortController.cs @@ -120,26 +120,5 @@ namespace PepperDash.Essentials.Core Key, IrPort.IRDriverFileNameByIRDriverId(IrPortUid), command); } - - ///// - ///// When fed a dictionary of uint, string, will return UOs for each item, - ///// attached to this IrOutputPort - ///// - ///// - ///// - //public List GetUOsForIrCommands(Dictionary numStringDict) - //{ - // var funcs = new List(numStringDict.Count); - // foreach (var kvp in numStringDict) - // { - // // Have to assign these locally because of kvp's scope - // var cue = kvp.Key; - // var command = kvp.Value; - // funcs.Add(new BoolCueActionPair(cue, b => this.PressRelease(command, b))); - // } - // return funcs; - //} - - } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/NewInterfaces.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/NewInterfaces.cs deleted file mode 100644 index ca6524f4..00000000 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Devices/NewInterfaces.cs +++ /dev/null @@ -1,56 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.DeviceSupport; - -namespace PepperDash.Essentials.Core -{ - //public interface IVolumeFunctions - //{ - // BoolCueActionPair VolumeUpCueActionPair { get; } - // BoolCueActionPair VolumeDownCueActionPair { get; } - // BoolCueActionPair MuteToggleCueActionPair { get; } - //} - - //public interface IVolumeTwoWay : IVolumeFunctions - //{ - // IntFeedback VolumeLevelFeedback { get; } - // UShortCueActionPair VolumeLevelCueActionPair { get; } - // BoolFeedback IsMutedFeedback { get; } - //} - - ///// - ///// - ///// - //public static class IFunctionListExtensions - //{ - // public static string GetFunctionsConsoleList(this IHasCueActionList device) - // { - // var sb = new StringBuilder(); - // var list = device.CueActionList; - // foreach (var cap in list) - // sb.AppendFormat("{0,-15} {1,4} {2}\r", cap.Cue.Name, cap.Cue.Number, cap.GetType().Name); - // return sb.ToString(); - // } - //} - - public enum AudioChangeType - { - Mute, Volume - } - - public class AudioChangeEventArgs - { - public AudioChangeType ChangeType { get; private set; } - public IBasicVolumeControls AudioDevice { get; private set; } - - public AudioChangeEventArgs(IBasicVolumeControls device, AudioChangeType changeType) - { - ChangeType = changeType; - AudioDevice = device; - } - } -} \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Display/DELETE IRDisplayBase.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Display/DELETE IRDisplayBase.cs deleted file mode 100644 index 06b4da07..00000000 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Display/DELETE IRDisplayBase.cs +++ /dev/null @@ -1,105 +0,0 @@ -//using System; -//using System.Collections.Generic; -//using System.Linq; -//using System.Text; -//using Crestron.SimplSharp; -//using Crestron.SimplSharpPro; - -//namespace PepperDash.Essentials.Core -//{ -// public abstract class IRDisplayBase : DisplayBase, IHasCueActionList -// { -// public IrOutputPortController IrPort { get; private set; } -// /// -// /// Default to 200ms -// /// -// public ushort IrPulseTime { get; set; } -// bool _PowerIsOn; -// bool _IsWarmingUp; -// bool _IsCoolingDown; - -// /// -// /// FunctionList is pre-defined to have power commands. -// /// -// public IRDisplayBase(string key, string name, IROutputPort port, string irDriverFilepath) -// : base(key, name) -// { -// IrPort = new IrOutputPortController("ir-" + key, port, irDriverFilepath); -// IrPulseTime = 200; -// WarmupTime = 7000; -// CooldownTime = 10000; - -// CueActionList = new List -// { -// new BoolCueActionPair(CommonBoolCue.Power, b=> PowerToggle()), -// new BoolCueActionPair(CommonBoolCue.PowerOn, b=> PowerOn()), -// new BoolCueActionPair(CommonBoolCue.PowerOff, b=> PowerOff()), -// }; -// } - -// public override void PowerOn() -// { -// if (!PowerIsOnFeedback.BoolValue && !_IsWarmingUp && !_IsCoolingDown) -// { -// _IsWarmingUp = true; -// IsWarmingUpFeedback.FireUpdate(); -// // Fake power-up cycle -// WarmupTimer = new CTimer(o => -// { -// _IsWarmingUp = false; -// _PowerIsOn = true; -// IsWarmingUpFeedback.FireUpdate(); -// PowerIsOnFeedback.FireUpdate(); -// }, WarmupTime); -// } -// IrPort.Pulse(IROutputStandardCommands.IROut_POWER_ON, IrPulseTime); -// } - -// public override void PowerOff() -// { -// // If a display has unreliable-power off feedback, just override this and -// // remove this check. -// if (PowerIsOnFeedback.BoolValue && !_IsWarmingUp && !_IsCoolingDown) -// { -// _IsCoolingDown = true; -// _PowerIsOn = false; -// PowerIsOnFeedback.FireUpdate(); -// IsCoolingDownFeedback.FireUpdate(); -// // Fake cool-down cycle -// CooldownTimer = new CTimer(o => -// { -// _IsCoolingDown = false; -// IsCoolingDownFeedback.FireUpdate(); -// }, CooldownTime); -// } -// IrPort.Pulse(IROutputStandardCommands.IROut_POWER_OFF, IrPulseTime); -// } - -// public override void PowerToggle() -// { -// // Not sure how to handle the feedback, but we should default to power off fb. -// // Does this need to trigger feedback?? -// _PowerIsOn = false; -// IrPort.Pulse(IROutputStandardCommands.IROut_POWER, IrPulseTime); -// } - -// #region IFunctionList Members - -// public List CueActionList -// { -// get; -// private set; -// } - -// #endregion - -// protected override Func PowerIsOnOutputFunc { get { return () => _PowerIsOn; } } -// protected override Func IsCoolingDownOutputFunc { get { return () => _IsCoolingDown; } } -// protected override Func IsWarmingUpOutputFunc { get { return () => _IsWarmingUp; } } - -// public override void ExecuteSwitch(object selector) -// { -// IrPort.Pulse((string)selector, IrPulseTime); -// } -// } -//} \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Ethernet/EthernetStatistics.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Ethernet/EthernetStatistics.cs index 13e49b5c..cbdd0617 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Ethernet/EthernetStatistics.cs +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Ethernet/EthernetStatistics.cs @@ -30,15 +30,4 @@ namespace PepperDash.Essentials.Core.Ethernet () => CrestronEthernetHelper.GetEthernetParameter( CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_ROUTER, 0)); } - - public static class EthernetCue - { - public static readonly Cue LinkActive = Cue.BoolCue("LinkActive", 1); - public static readonly Cue DhcpActive = Cue.BoolCue("DhcpActive", 2); - - public static readonly Cue Hostname = Cue.StringCue("Hostname", 1); - public static readonly Cue IpAddress0 = Cue.StringCue("IpAddress0", 2); - public static readonly Cue SubnetMask0 = Cue.StringCue("SubnetMask0", 3); - public static readonly Cue DefaultGateway0 = Cue.StringCue("DefaultGateway0", 4); - } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Feedbacks/BoolFeedback.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Feedbacks/BoolFeedback.cs index a5be1fb4..9fb4c1e1 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Feedbacks/BoolFeedback.cs +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Feedbacks/BoolFeedback.cs @@ -19,8 +19,6 @@ namespace PepperDash.Essentials.Core public override bool BoolValue { get { return _BoolValue; } } bool _BoolValue; - public override eCueType Type { get { return eCueType.Bool; } } - /// /// Fake value to be used in test mode /// @@ -45,12 +43,6 @@ namespace PepperDash.Essentials.Core ValueFunc = valueFunc; } - //public BoolFeedback(Cue cue, Func valueFunc) - // : base(cue) - //{ - // if (cue == null) throw new ArgumentNullException("cue"); - // ValueFunc = valueFunc; - //} public override void FireUpdate() { diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Feedbacks/FeedbackBase.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Feedbacks/FeedbackBase.cs index 96571dce..c3aac50b 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Feedbacks/FeedbackBase.cs +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Feedbacks/FeedbackBase.cs @@ -20,10 +20,6 @@ namespace PepperDash.Essentials.Core public virtual string StringValue { get { return ""; } } public virtual string SerialValue { get { return ""; } } - //public Cue Cue { get; private set; } - - public abstract eCueType Type { get; } - /// /// Feedbacks can be put into test mode for simulation of events without real data. /// Using JSON debugging methods and the Set/ClearTestValue methods, we can simulate @@ -46,10 +42,7 @@ namespace PepperDash.Essentials.Core Key = key; } - //protected Feedback(Cue cue) - //{ - // Cue = cue; - //} + /// /// Clears test mode and fires update. diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Feedbacks/IntFeedback.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Feedbacks/IntFeedback.cs index 5591cb7f..4a278148 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Feedbacks/IntFeedback.cs +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Feedbacks/IntFeedback.cs @@ -13,7 +13,7 @@ namespace PepperDash.Essentials.Core int _IntValue; public ushort UShortValue { get { return (ushort)_IntValue; } } - public override eCueType Type { get { return eCueType.Int; } } + //public override eCueType Type { get { return eCueType.Int; } } public int TestValue { get; private set; } @@ -34,13 +34,6 @@ namespace PepperDash.Essentials.Core ValueFunc = valueFunc; } - //public IntFeedback(Cue cue, Func valueFunc) - // : base(cue) - //{ - // if (cue == null) throw new ArgumentNullException("cue"); - // ValueFunc = valueFunc; - //} - public override void FireUpdate() { var newValue = InTestMode ? TestValue : ValueFunc.Invoke(); diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Feedbacks/SerialFeedback.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Feedbacks/SerialFeedback.cs index 0e6ed424..bbf135dc 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Feedbacks/SerialFeedback.cs +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Feedbacks/SerialFeedback.cs @@ -16,7 +16,7 @@ namespace PepperDash.Essentials.Core public override string SerialValue { get { return _SerialValue; } } string _SerialValue; - public override eCueType Type { get { return eCueType.Serial; } } + //public override eCueType Type { get { return eCueType.Serial; } } /// /// Used in testing. Set/Clear functions diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Feedbacks/StringFeedback.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Feedbacks/StringFeedback.cs index e4cd7084..b02c02f0 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Feedbacks/StringFeedback.cs +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Feedbacks/StringFeedback.cs @@ -12,8 +12,6 @@ namespace PepperDash.Essentials.Core public override string StringValue { get { return _StringValue; } } // ValueFunc.Invoke(); } } string _StringValue; - public override eCueType Type { get { return eCueType.String; } } - /// /// Used in testing. Set/Clear functions /// @@ -36,13 +34,7 @@ namespace PepperDash.Essentials.Core ValueFunc = valueFunc; } - //public StringFeedback(Cue cue, Func valueFunc) - // : base(cue) - //{ - // if (cue == null) throw new ArgumentNullException("cue"); - // ValueFunc = valueFunc; - //} public override void FireUpdate() { diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/License/EssentialsLicenseManager.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/License/EssentialsLicenseManager.cs index c5f2d5e9..4afb85bf 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/License/EssentialsLicenseManager.cs +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/License/EssentialsLicenseManager.cs @@ -83,16 +83,4 @@ namespace PepperDash.Essentials.License return string.Format("License Status: {0}", IsValid ? "Valid" : "Not Valid"); } } - - public class EssentialsLicenseManager - { - - } - - public class LicenseCue - { - public static Cue LicenseIsValid = Cue.BoolCue("LicenseIsValid", 15991); - - public static Cue LicenseMessage = Cue.StringCue("LicenseMessage", 15991); - } } \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Monitoring/Interfaces and things.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Monitoring/Interfaces.cs similarity index 100% rename from essentials-framework/Essentials Core/PepperDashEssentialsBase/Monitoring/Interfaces and things.cs rename to essentials-framework/Essentials Core/PepperDashEssentialsBase/Monitoring/Interfaces.cs diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj b/essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj index c6915164..587159a2 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/PepperDash_Essentials_Core.csproj @@ -111,8 +111,8 @@ - - + + @@ -153,16 +153,15 @@ - - - - - + + + + + - @@ -199,14 +198,13 @@ - + - + - @@ -229,25 +227,20 @@ - - - - - - + @@ -255,23 +248,17 @@ - - - - - - diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/REMOVE SigId.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/REMOVE SigId.cs deleted file mode 100644 index 884f1601..00000000 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/REMOVE SigId.cs +++ /dev/null @@ -1,37 +0,0 @@ -//using System; -//using System.Collections.Generic; -//using System.Linq; -//using System.Text; -//using Crestron.SimplSharpPro; - -//namespace PepperDash.Essentials.Core -//{ -// public class SigId -// { -// public uint Number { get; private set; } -// public eSigType Type { get; private set; } - -// public SigId(eSigType type, uint number) -// { -// Type = type; -// Number = number; -// } - -// public override bool Equals(object id) -// { -// if (id is SigId) -// { -// var sigId = id as SigId; -// return this.Number == sigId.Number && this.Type == sigId.Type; -// } -// else -// return base.Equals(id); -// } - -// public override int GetHashCode() -// { -// return base.GetHashCode(); -// } -// } - -//} \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Room/RoomCues.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Room/RoomCues.cs deleted file mode 100644 index 0d439d09..00000000 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Room/RoomCues.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro; - -using PepperDash.Essentials.Core; - -namespace PepperDash.Essentials -{ - public static class RoomCue - { - // Commands/ - //bools - public static readonly Cue RoomOnToggle = Cue.BoolCue("RoomOnToggle", 2001); - public static readonly Cue RoomOn = Cue.BoolCue("RoomOn", 2002); - public static readonly Cue RoomOff = Cue.BoolCue("RoomOff", 2003); - public static readonly Cue VolumeUp = Cue.BoolCue("VolumeUp", 2011); - public static readonly Cue VolumeDown = Cue.BoolCue("VolumeDown", 2012); - public static readonly Cue VolumeDefault = Cue.BoolCue("VolumeDefault", 2013); - public static readonly Cue MuteToggle = Cue.BoolCue("MuteToggle", 2014); - public static readonly Cue MuteOn = Cue.BoolCue("MuteOn", 2015); - public static readonly Cue MuteOff = Cue.BoolCue("MuteOff", 2016); - - //ushorts - public static readonly Cue SelectSourceByNumber = Cue.UShortCue("SelectSourceByNumber", 2001); - public static readonly Cue VolumeLevel = Cue.UShortCue("VolumeLevel", 2011); - public static readonly Cue VolumeLevelPercent = Cue.UShortCue("VolumeLevelPercent", 2012); - - //strings - public static readonly Cue SelectSourceByKey = Cue.StringCue("SelectSourceByKey", 2001); - - // Outputs - //Bools - public static readonly Cue RoomIsOn = Cue.BoolCue("RoomIsOn", 2002); - public static readonly Cue RoomIsOnStandby = Cue.BoolCue("RoomIsOnStandby", 2003); - public static readonly Cue RoomIsWarmingUp = Cue.BoolCue("RoomIsWarmingUp", 2004); - public static readonly Cue RoomIsCoolingDown = Cue.BoolCue("RoomIsCoolingDown", 2005); - public static readonly Cue RoomIsOccupied = Cue.BoolCue("RoomIsOccupied", 2006); - - //Ushorts - public static readonly Cue SourcesCount = Cue.UShortCue("SourcesCount", 2001); - public static readonly Cue CurrentSourceNumber = Cue.UShortCue("CurrentSourceNumber", 2002); - public static readonly Cue CurrentSourceType = Cue.UShortCue("CurrentSourceType", 2003); - - //Strings - public static readonly Cue CurrentSourceKey = Cue.StringCue("CurrentSourceKey", 2001); - public static readonly Cue CurrentSourceName = Cue.StringCue("CurrentSourceName", 2002); - - public static readonly Cue VolumeLevelText = Cue.StringCue("VolumeLevelText", 2012); - - public static readonly Cue Key = Cue.StringCue("RoomKey", 2021); - public static readonly Cue Name = Cue.StringCue("RoomName", 2022); - public static readonly Cue Description = Cue.StringCue("Description", 2023); - public static readonly Cue HelpMessage = Cue.StringCue("HelpMessage", 2024); - - //Special - public static readonly Cue Source = new Cue("Source", 0, eCueType.Other); - } -} \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/SmartObjects/SmartObjectHelper.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/SmartObjects/SmartObjectHelper.cs deleted file mode 100644 index f30d8da1..00000000 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/SmartObjects/SmartObjectHelper.cs +++ /dev/null @@ -1,128 +0,0 @@ -using System; -using System.Linq; -using System.Collections.Generic; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.DeviceSupport; - -using PepperDash.Core; - - -namespace PepperDash.Essentials.Core -{ - public class SmartObjectHelper - { - public static uint GetSmartObjectJoinForTypeAndObject(uint sourceType, uint typeOffset) - { - return (uint)(10000 + (sourceType * 100) + typeOffset); - } - - //public static void DumpSmartObject(SmartGraphicsTouchpanelControllerBase tp, uint id) - //{ - // if (!tp.TriList.SmartObjects.Contains(id)) - // { - // Debug.Console(0, tp, "does not contain smart object ID {0}", id); - // return; - // } - // var so = tp.TriList.SmartObjects[id]; - // Debug.Console(0, tp, "Signals for smart object ID {0}", id); - // Debug.Console(0, "BooleanInput -------------------------------"); - // foreach (var s in so.BooleanInput) - // Debug.Console(0, " {0,5} {1}", s.Number, s.Name); - // Debug.Console(0, "UShortInput -------------------------------"); - // foreach (var s in so.UShortInput) - // Debug.Console(0, " {0,5} {1}", s.Number, s.Name); - // Debug.Console(0, "StringInput -------------------------------"); - // foreach (var s in so.StringInput) - // Debug.Console(0, " {0,5} {1}", s.Number, s.Name); - // Debug.Console(0, "BooleanOutput -------------------------------"); - // foreach (var s in so.BooleanOutput) - // Debug.Console(0, " {0,5} {1}", s.Number, s.Name); - // Debug.Console(0, "UShortOutput -------------------------------"); - // foreach (var s in so.UShortOutput) - // Debug.Console(0, " {0,5} {1}", s.Number, s.Name); - // Debug.Console(0, "StringOutput -------------------------------"); - // foreach (var s in so.StringOutput) - // Debug.Console(0, " {0,5} {1}", s.Number, s.Name); - //} - - ///// - ///// Inserts/removes the appropriate UO's onto sigs - ///// - ///// - ///// - ///// - ///// - //public static void LinkNumpadWithUserObjects(BasicTriListWithSmartObject triList, - // uint smartObjectId, List deviceUserObjects, Cue Misc_1Function, Cue Misc_2Function, bool state) - //{ - // var sigDict = new Dictionary - // { - // { "0", CommonBoolCue.Digit0 }, - // { "1", CommonBoolCue.Digit1 }, - // { "2", CommonBoolCue.Digit2 }, - // { "3", CommonBoolCue.Digit3 }, - // { "4", CommonBoolCue.Digit4 }, - // { "5", CommonBoolCue.Digit5 }, - // { "6", CommonBoolCue.Digit6 }, - // { "7", CommonBoolCue.Digit7 }, - // { "8", CommonBoolCue.Digit8 }, - // { "9", CommonBoolCue.Digit9 }, - // { "Misc_1", Misc_1Function }, - // { "Misc_2", Misc_2Function }, - // }; - // LinkSmartObjectWithUserObjects(triList, smartObjectId, deviceUserObjects, sigDict, state); - //} - - //public static void LinkDpadWithUserObjects(BasicTriListWithSmartObject triList, - // uint smartObjectId, List deviceUserObjects, bool state) - //{ - // var sigDict = new Dictionary - // { - // { "Up", CommonBoolCue.Up }, - // { "Down", CommonBoolCue.Down }, - // { "Left", CommonBoolCue.Left }, - // { "Right", CommonBoolCue.Right }, - // { "OK", CommonBoolCue.Select }, - // }; - // LinkSmartObjectWithUserObjects(triList, smartObjectId, deviceUserObjects, sigDict, state); - //} - - - ///// - ///// MOVE TO HELPER CLASS - ///// - ///// - ///// - ///// - ///// - ///// - //public static void LinkSmartObjectWithUserObjects(BasicTriListWithSmartObject triList, - // uint smartObjectId, List deviceUserObjects, Dictionary smartObjectSigMap, bool state) - //{ - // // Hook up smart objects if applicable - // if (triList.SmartObjects.Contains(smartObjectId)) - // { - // var smartObject = triList.SmartObjects[smartObjectId]; - // foreach (var kvp in smartObjectSigMap) - // { - // if (smartObject.BooleanOutput.Contains(kvp.Key)) - // { - // if (state) - // { - // // look for a user object and if so, attach/detach it to/from the sig. - // var uo = deviceUserObjects.FirstOrDefault(ao => ao.Cue == kvp.Value); - // if (uo != null) - // smartObject.BooleanOutput[kvp.Key].UserObject = uo; - // } - // else - // smartObject.BooleanOutput[kvp.Key].UserObject = null; - // } - // else - // Debug.Console(0, "Smart object {0} does not contain Sig {1}", smartObject.ID, kvp.Key); - // } - // } - // else - // Debug.Console(0, "ERROR Smart object {0} not found on {1:X2}", smartObjectId, triList.ID); - //} - } -} \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Touchpanels/MOVED LargeTouchpanelControllerBase.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Touchpanels/MOVED LargeTouchpanelControllerBase.cs deleted file mode 100644 index 97c937b3..00000000 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Touchpanels/MOVED LargeTouchpanelControllerBase.cs +++ /dev/null @@ -1,275 +0,0 @@ -//using System; -//using System.Collections.Generic; -//using System.Linq; -//using Crestron.SimplSharp; -//using Crestron.SimplSharpPro; -//using Crestron.SimplSharpPro.DeviceSupport; - -//using PepperDash.Core; - - -//namespace PepperDash.Essentials.Core -//{ -// /// -// /// -// /// -// public class LargeTouchpanelControllerBase : SmartGraphicsTouchpanelControllerBase -// { -// public string PresentationShareButtonInVideoText = "Share"; -// public string PresentationShareButtonNotInVideoText = "Presentation"; - -// SourceListSubpageReferenceList SourceSelectSRL; -// DevicePageControllerBase CurrentPresentationSourcePageController; - -// public LargeTouchpanelControllerBase(string key, string name, -// BasicTriListWithSmartObject triList, string sgdFilePath) -// : base(key, name, triList, sgdFilePath) -// { -// } - -// public override bool CustomActivate() -// { -// var baseSuccess = base.CustomActivate(); -// if (!baseSuccess) return false; - -// SourceSelectSRL = new SourceListSubpageReferenceList(this.TriList, n => -// { if (CurrentRoom != null) CurrentRoom.SelectSource(n); }); - -// var lm = Global.LicenseManager; -// if (lm != null) -// { -// lm.LicenseIsValid.LinkInputSig(TriList.BooleanInput[UiCue.ShowLicensed.Number]); -// //others -// } - -// // Temp things ----------------------------------------------------------------------- -// TriList.StringInput[UiCue.SplashMessage.Number].StringValue = SplashMessage; -// //------------------------------------------------------------------------------------ - -// // Initialize initial view -// ShowSplashOrMain(); -// return true; -// } - -// /// -// /// In Essentials, this should NEVER be called, since it's a one-room solution -// /// -// protected override void HideRoomUI() -// { -// // UI Cleanup here???? - -// //SwapAudioDeviceControls(CurrentRoom.CurrentAudioDevice, null); -// //CurrentRoom.AudioDeviceWillChange -= CurrentRoom_AudioDeviceWillChange; - -// CurrentRoom.IsCoolingDown.OutputChange -= CurrentRoom_IsCoolingDown_OutputChange; -// CurrentRoom.IsWarmingUp.OutputChange -= CurrentRoom_IsWarmingUp_OutputChange; - -// SourceSelectSRL.DetachFromCurrentRoom(); -// } - -// /// -// /// Ties this panel controller to the Room and gets updates. -// /// -// protected override void ShowRoomUI() -// { -// Debug.Console(1, this, "connecting to system '{0}'", CurrentRoom.Key); - -// TriList.StringInput[RoomCue.Name.Number].StringValue = CurrentRoom.Name; -// TriList.StringInput[RoomCue.Description.Number].StringValue = CurrentRoom.Description; - -// CurrentRoom.IsCoolingDown.OutputChange -= CurrentRoom_IsCoolingDown_OutputChange; -// CurrentRoom.IsWarmingUp.OutputChange -= CurrentRoom_IsWarmingUp_OutputChange; -// CurrentRoom.IsCoolingDown.OutputChange += CurrentRoom_IsCoolingDown_OutputChange; -// CurrentRoom.IsWarmingUp.OutputChange += CurrentRoom_IsWarmingUp_OutputChange; - -// SourceSelectSRL.AttachToRoom(CurrentRoom); -// } - -// void CurrentRoom_IsCoolingDown_OutputChange(object sender, EventArgs e) -// { -// Debug.Console(2, this, "Received room in cooldown={0}", CurrentRoom.IsCoolingDown.BoolValue); -// if (CurrentRoom.IsCoolingDown.BoolValue) // When entering cooldown -// { -// // Do we need to check for an already-running cooldown - like in the case of room switches? -// new ModalDialog(TriList).PresentModalTimerDialog(0, "Power Off", "Power", "Please wait, shutting down", -// "", "", CurrentRoom.CooldownTime, true, b => -// { -// ShowSplashOrMain(); -// }); -// } -// } - -// void CurrentRoom_IsWarmingUp_OutputChange(object sender, EventArgs e) -// { -// Debug.Console(2, this, "Received room in warmup={0}", CurrentRoom.IsWarmingUp.BoolValue); -// if (CurrentRoom.IsWarmingUp.BoolValue) // When entering warmup -// { -// // Do we need to check for an already-running cooldown - like in the case of room switches? -// new ModalDialog(TriList).PresentModalTimerDialog(0, "Power On", "Power", "Please wait, powering on", -// "", "", CurrentRoom.WarmupTime, false, b => -// { -// // Reveal sources - or has already been done behind modal -// }); -// } -// } - -// // Handler for source change events. -// void CurrentRoom_PresentationSourceChange(object sender, EssentialsRoomSourceChangeEventArgs args) -// { -// // Put away the old source and set up the new source. -// Debug.Console(2, this, "Received source change={0}", args.NewSource != null ? args.NewSource.Key : "none"); - -// // If we're in tech, don't switch screen modes. Add any other modes we may want to switch away from -// // inside the if below. -// if (MainMode == eMainModeType.Splash) -// setMainMode(eMainModeType.Presentation); -// SetControlSource(args.NewSource); -// } - -// //*********************************************************************** -// //** UI Manipulation -// //*********************************************************************** - -// /// -// /// Shows the splash page or the main presentation page, depending on config setting -// /// -// void ShowSplashOrMain() -// { -// if (UsesSplashPage) -// setMainMode(eMainModeType.Splash); -// else -// setMainMode(eMainModeType.Presentation); -// } - -// /// -// /// Switches between main modes -// /// -// void setMainMode(eMainModeType mode) -// { -// MainMode = mode; -// switch (mode) -// { -// case eMainModeType.Presentation: -// TriList.BooleanInput[UiCue.VisibleCommonFooter.Number].BoolValue = true; -// TriList.BooleanInput[UiCue.VisibleCommonHeader.Number].BoolValue = true; -// TriList.BooleanInput[UiCue.VisibleSplash.Number].BoolValue = false; -// TriList.BooleanInput[UiCue.VisiblePresentationSourceList.Number].BoolValue = true; -// ShowCurrentPresentationSourceUi(); -// break; -// case eMainModeType.Splash: -// TriList.BooleanInput[UiCue.VisibleCommonFooter.Number].BoolValue = false; -// TriList.BooleanInput[UiCue.VisibleCommonHeader.Number].BoolValue = false; -// TriList.BooleanInput[UiCue.VisiblePresentationSourceList.Number].BoolValue = false; -// TriList.BooleanInput[UiCue.VisibleSplash.Number].BoolValue = true; -// HideCurrentPresentationSourceUi(); -// break; -// case eMainModeType.Tech: -// new ModalDialog(TriList).PresentModalTimerDialog(1, "Tech page", "Info", -// "Tech page will be here soon!
I promise", -// "Bueno!", "", 0, false, null); -// MainMode = eMainModeType.Presentation; -// break; -// default: -// break; -// } -// } - -// void PowerOffWithConfirmPressed() -// { -// if (!CurrentRoom.RoomIsOn.BoolValue) return; -// // Timeout or button 1 press will shut down -// var modal = new ModalDialog(TriList); -// uint seconds = CurrentRoom.UnattendedShutdownTimeMs / 1000; -// var message = string.Format("Meeting will end in {0} seconds", seconds); -// modal.PresentModalTimerDialog(2, "End Meeting", "Info", message, -// "End Meeting Now", "Cancel", CurrentRoom.UnattendedShutdownTimeMs, true, -// but => { if (but != 2) CurrentRoom.RoomOff(); }); -// } - -// /// -// /// Reveals the basic UI for the current device -// /// -// protected override void ShowCurrentPresentationSourceUi() -// { -// if (MainMode == eMainModeType.Splash && CurrentRoom.RoomIsOn.BoolValue) -// setMainMode(eMainModeType.Presentation); - -// if (CurrentPresentationControlDevice == null) -// { -// // If system is off, do one thing - -// // Otherwise, do something else - shouldn't be in this condition - -// return; -// } - -// // If a controller is already loaded, use it -// if (LoadedPageControllers.ContainsKey(CurrentPresentationControlDevice)) -// CurrentPresentationSourcePageController = LoadedPageControllers[CurrentPresentationControlDevice]; -// else -// { -// // This is by no means optimal, but for now.... -// if (CurrentPresentationControlDevice.Type == PresentationSourceType.SetTopBox -// && CurrentPresentationControlDevice is IHasSetTopBoxProperties) -// CurrentPresentationSourcePageController = new PageControllerLargeSetTopBoxGeneric(TriList, -// CurrentPresentationControlDevice as IHasSetTopBoxProperties); - -// else if (CurrentPresentationControlDevice.Type == PresentationSourceType.Laptop) -// CurrentPresentationSourcePageController = new PageControllerLaptop(TriList); - -// // separate these... -// else if (CurrentPresentationControlDevice.Type == PresentationSourceType.Dvd) -// CurrentPresentationSourcePageController = -// new PageControllerLargeDvd(TriList, CurrentPresentationControlDevice as IHasCueActionList); - -// else -// CurrentPresentationSourcePageController = null; - -// // Save it. -// if (CurrentPresentationSourcePageController != null) -// LoadedPageControllers[CurrentPresentationControlDevice] = CurrentPresentationSourcePageController; -// } - -// if (CurrentPresentationSourcePageController != null) -// CurrentPresentationSourcePageController.SetVisible(true); -// } - -// protected override void HideCurrentPresentationSourceUi() -// { -// if (CurrentPresentationControlDevice != null && CurrentPresentationSourcePageController != null) -// CurrentPresentationSourcePageController.SetVisible(false); -// } - - - -// void ShowHelp() -// { -// new ModalDialog(TriList).PresentModalTimerDialog(1, "Help", "Help", CurrentRoom.HelpMessage, -// "OK", "", 0, false, null); -// } - -// protected void ListSmartObjects() -// { -// Debug.Console(0, this, "Smart objects IDs:"); -// var list = TriList.SmartObjects.OrderBy(s => s.Key); -// foreach (var kvp in list) -// Debug.Console(0, " {0}", kvp.Key); -// } - -// public override List FunctionList -// { -// get -// { -// return new List -// { -// new BoolCueActionPair(UiCue.PressSplash, b => { if(!b) setMainMode(eMainModeType.Presentation); }), -// new BoolCueActionPair(UiCue.PressRoomOffWithConfirm, b => { if(!b) PowerOffWithConfirmPressed(); }), -// new BoolCueActionPair(UiCue.PressModePresentationShare, b => { if(!b) setMainMode(eMainModeType.Presentation); }), -// new BoolCueActionPair(UiCue.PressHelp, b => { if(!b) ShowHelp(); }), -// new BoolCueActionPair(UiCue.PressSettings, b => { if(!b) setMainMode(eMainModeType.Tech); }), -// }; -// } -// } -// //#endregion -// } -//} \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Touchpanels/MOVED UIControllers/DevicePageControllerBase.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Touchpanels/MOVED UIControllers/DevicePageControllerBase.cs deleted file mode 100644 index 334050e0..00000000 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Touchpanels/MOVED UIControllers/DevicePageControllerBase.cs +++ /dev/null @@ -1,244 +0,0 @@ -//using System; -//using System.Collections.Generic; -//using System.Linq; -//using System.Text; -//using Crestron.SimplSharp; -//using Crestron.SimplSharpPro; -//using Crestron.SimplSharpPro.DeviceSupport; - -//using PepperDash.Essentials.Core.Presets; - -//using PepperDash.Core; - - -//namespace PepperDash.Essentials.Core -//{ -// /// -// /// -// /// -// public abstract class DevicePageControllerBase -// { - -// protected BasicTriListWithSmartObject TriList; -// protected List FixedObjectSigs; - -// public DevicePageControllerBase(BasicTriListWithSmartObject triList) -// { -// TriList = triList; -// } - -// public void SetVisible(bool state) -// { -// foreach (var sig in FixedObjectSigs) -// { -// Debug.Console(2, "set visible {0}={1}", sig.Number, state); -// sig.BoolValue = state; -// } -// CustomSetVisible(state); -// } - -// /// -// /// Add any specialized show/hide logic here - beyond FixedObjectSigs. Overriding -// /// methods do not need to call this base method -// /// -// protected virtual void CustomSetVisible(bool state) -// { -// } -// } - -// //public class InterlockedDevicePageController -// //{ -// // public List ObjectBoolJoins { get; set; } -// // public uint DefaultJoin { get; set; } -// //} - - - - -// ///// -// ///// -// ///// -// //public interface IHasSetTopBoxProperties -// //{ -// // bool HasDpad { get; } -// // bool HasPreset { get; } -// // bool HasDvr { get; } -// // bool HasNumbers { get; } -// // DevicePresetsModel PresetsModel { get; } -// // void LoadPresets(string filePath); -// //} - -// public class PageControllerLaptop : DevicePageControllerBase -// { -// public PageControllerLaptop(BasicTriListWithSmartObject tl) -// : base(tl) -// { -// FixedObjectSigs = new List -// { -// tl.BooleanInput[10092], // well -// tl.BooleanInput[11001] // Laptop info -// }; -// } -// } - -// ///// -// ///// -// ///// -// //public class PageControllerLargeDvd : DevicePageControllerBase -// //{ -// // IHasCueActionList Device; - -// // public PageControllerLargeDvd(BasicTriListWithSmartObject tl, IHasCueActionList device) -// // : base(tl) -// // { - -// // Device = device; -// // FixedObjectSigs = new List -// // { -// // tl.BooleanInput[10093], // well -// // tl.BooleanInput[10411], // DVD Dpad -// // tl.BooleanInput[10412] // everything else -// // }; -// // } - -// // protected override void CustomSetVisible(bool state) -// // { -// // // Hook up smart objects if applicable -// // if (Device != null) -// // { -// // var uos = (Device as IHasCueActionList).CueActionList; -// // SmartObjectHelper.LinkDpadWithUserObjects(TriList, 10411, uos, state); -// // } -// // } -// //} - - -// /// -// /// -// /// -// //public class PageControllerLargeSetTopBoxGeneric : DevicePageControllerBase -// //{ -// // // To-DO: Add properties for component subpage names. DpadPos1, DpadPos2... -// // // Derived classes can then insert special subpages for variations on given -// // // device types. Like DirecTV vs Comcast - -// // public uint DpadSmartObjectId { get; set; } -// // public uint NumberPadSmartObjectId { get; set; } -// // public uint PresetsSmartObjectId { get; set; } -// // public uint Position5TabsId { get; set; } - -// // IHasSetTopBoxProperties Device; -// // DevicePresetsView PresetsView; - - -// // bool ShowPosition5Tabs; -// // uint CurrentVisiblePosition5Item = 1; -// // Dictionary Position5SubpageJoins = new Dictionary -// // { -// // { 1, 10053 }, -// // { 2, 10054 } -// // }; - -// // public PageControllerLargeSetTopBoxGeneric(BasicTriListWithSmartObject tl, IHasSetTopBoxProperties device) -// // : base(tl) -// // { -// // Device = device; -// // DpadSmartObjectId = 10011; -// // NumberPadSmartObjectId = 10014; -// // PresetsSmartObjectId = 10012; -// // Position5TabsId = 10081; - -// // bool dpad = device.HasDpad; -// // bool preset = device.HasPreset; -// // bool dvr = device.HasDvr; -// // bool numbers = device.HasNumbers; -// // uint[] joins = null; - -// // if (dpad && !preset && !dvr && !numbers) joins = new uint[] { 10031, 10091 }; -// // else if (!dpad && preset && !dvr && !numbers) joins = new uint[] { 10032, 10091 }; -// // else if (!dpad && !preset && dvr && !numbers) joins = new uint[] { 10033, 10091 }; -// // else if (!dpad && !preset && !dvr && numbers) joins = new uint[] { 10034, 10091 }; - -// // else if (dpad && preset && !dvr && !numbers) joins = new uint[] { 10042, 10021, 10092 }; -// // else if (dpad && !preset && dvr && !numbers) joins = new uint[] { 10043, 10021, 10092 }; -// // else if (dpad && !preset && !dvr && numbers) joins = new uint[] { 10044, 10021, 10092 }; -// // else if (!dpad && preset && dvr && !numbers) joins = new uint[] { 10043, 10022, 10092 }; -// // else if (!dpad && preset && !dvr && numbers) joins = new uint[] { 10044, 10022, 10092 }; -// // else if (!dpad && !preset && dvr && numbers) joins = new uint[] { 10044, 10023, 10092 }; - -// // else if (dpad && preset && dvr && !numbers) joins = new uint[] { 10053, 10032, 10011, 10093 }; -// // else if (dpad && preset && !dvr && numbers) joins = new uint[] { 10054, 10032, 10011, 10093 }; -// // else if (dpad && !preset && dvr && numbers) joins = new uint[] { 10054, 10033, 10011, 10093 }; -// // else if (!dpad && preset && dvr && numbers) joins = new uint[] { 10054, 10033, 10012, 10093 }; - -// // else if (dpad && preset && dvr && numbers) -// // { -// // joins = new uint[] { 10081, 10032, 10011, 10093 }; // special case -// // ShowPosition5Tabs = true; -// // } -// // // Project the joins into corresponding sigs. -// // FixedObjectSigs = joins.Select(u => TriList.BooleanInput[u]).ToList(); - -// // // Build presets -// // if (device.HasPreset) -// // { -// // PresetsView = new DevicePresetsView(tl, device.PresetsModel); -// // } - - -// // } - -// // protected override void CustomSetVisible(bool state) -// // { -// // if (ShowPosition5Tabs) -// // { -// // // Show selected tab -// // TriList.BooleanInput[Position5SubpageJoins[CurrentVisiblePosition5Item]].BoolValue = state; - -// // var tabSo = TriList.SmartObjects[Position5TabsId]; -// // if (state) // Link up the tab object - -// // { -// // tabSo.BooleanOutput["Tab Button 1 Press"].UserObject = new BoolCueActionPair(b => ShowTab(1)); -// // tabSo.BooleanOutput["Tab Button 2 Press"].UserObject = new BoolCueActionPair(b => ShowTab(2)); -// // } -// // else // Disco tab object -// // { -// // tabSo.BooleanOutput["Tab Button 1 Press"].UserObject = null; -// // tabSo.BooleanOutput["Tab Button 2 Press"].UserObject = null; -// // } -// // } - -// // // Hook up smart objects if applicable -// // if (Device is IHasCueActionList) -// // { -// // var uos = (Device as IHasCueActionList).CueActionList; -// // SmartObjectHelper.LinkDpadWithUserObjects(TriList, DpadSmartObjectId, uos, state); -// // SmartObjectHelper.LinkNumpadWithUserObjects(TriList, NumberPadSmartObjectId, -// // uos, CommonBoolCue.Dash, CommonBoolCue.Last, state); -// // } - - -// // // Link, unlink presets -// // if (Device.HasPreset && state) -// // PresetsView.Attach(); -// // else if (Device.HasPreset && !state) -// // PresetsView.Detach(); -// // } - -// // void ShowTab(uint number) -// // { -// // // Ignore re-presses -// // if (CurrentVisiblePosition5Item == number) return; -// // // Swap subpage -// // var bi = TriList.BooleanInput; -// // if(CurrentVisiblePosition5Item > 0) -// // bi[Position5SubpageJoins[CurrentVisiblePosition5Item]].BoolValue = false; -// // CurrentVisiblePosition5Item = number; -// // bi[Position5SubpageJoins[CurrentVisiblePosition5Item]].BoolValue = true; - -// // // Show feedback on buttons -// // } - -// //} -//} \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Touchpanels/REMOVE Tsr302Controller.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Touchpanels/REMOVE Tsr302Controller.cs deleted file mode 100644 index 13cfabcc..00000000 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Touchpanels/REMOVE Tsr302Controller.cs +++ /dev/null @@ -1,135 +0,0 @@ -//using System; -//using System.Collections.Generic; -//using System.Linq; -//using Crestron.SimplSharp; -//using Crestron.SimplSharpPro; -//using Crestron.SimplSharpPro.DeviceSupport; -//using Crestron.SimplSharpPro.UI; - -//using PepperDash.Core; - - -//namespace PepperDash.Essentials.Core -//{ -//[Obsolete("Replaced, initially with CrestronTsr302Controller in Resissentials")] -// public class Tsr302Controller : SmartGraphicsTouchpanelControllerBase -// { -// //public override List FunctionList -// //{ -// // get -// // { -// // return new List -// // { - -// // }; -// // } -// //} - -// public Tsr302 Remote { get; private set; } - -// SourceListSubpageReferenceList SourceSelectSRL; -// DevicePageControllerBase CurrentPresentationSourcePageController; -// CTimer VolumeFeedbackTimer; - - -// public Tsr302Controller(string key, string name, Tsr302 device, string sgdFilePath) : -// base(key, name, device, sgdFilePath) -// { -// // Base takes care of TriList -// Remote = device; -// Remote.Home.UserObject = new BoolCueActionPair(b => { if (!b) PressHome(); }); -// Remote.VolumeUp.UserObject = new BoolCueActionPair(b => { if (!b) PressHome(); }); -// Remote.ButtonStateChange += Remote_ButtonStateChange; -// } - -// public override bool CustomActivate() -// { -// var baseSuccess = base.CustomActivate(); -// if (!baseSuccess) return false; - -// SourceSelectSRL = new SourceListSubpageReferenceList(this.TriList, n => -// { if (CurrentRoom != null) CurrentRoom.SelectSource(n); }); - - -// return true; -// } - -// protected override void SwapAudioDeviceControls(IVolumeFunctions oldDev, IVolumeFunctions newDev) -// { -// // stop presses -// if (oldDev != null) -// { -// ReleaseAudioPresses(); -// if (oldDev is IVolumeTwoWay) -// { -// (newDev as IVolumeTwoWay).VolumeLevelFeedback.OutputChange -= VolumeLevelOutput_OutputChange; -// (oldDev as IVolumeTwoWay).VolumeLevelFeedback -// .UnlinkInputSig(TriList.UShortInput[CommonIntCue.MainVolumeLevel.Number]); -// } -// } - -// if (newDev != null) -// { -// Remote.VolumeDown.UserObject = newDev.VolumeDownCueActionPair; -// Remote.VolumeUp.UserObject = newDev.VolumeUpCueActionPair; -// Remote.Mute.UserObject = newDev.MuteToggleCueActionPair; -// if (newDev is IVolumeTwoWay) -// { -// var vOut = (newDev as IVolumeTwoWay).VolumeLevelFeedback; -// vOut.OutputChange += VolumeLevelOutput_OutputChange; -// TriList.UShortInput[CommonIntCue.MainVolumeLevel.Number].UShortValue = vOut.UShortValue; -// } -// } -// else -// { -// Remote.VolumeDown.UserObject = null; -// Remote.VolumeUp.UserObject = null; -// Remote.Mute.UserObject = null; -// } - -// base.SwapAudioDeviceControls(oldDev, newDev); -// } - -// void PressHome() -// { - -// } - -// void VolumeLevelOutput_OutputChange(object sender, EventArgs e) -// { -// // Set level and show popup on timer -// TriList.UShortInput[CommonIntCue.MainVolumeLevel.Number].UShortValue = -// (sender as IntFeedback).UShortValue; - -// if (VolumeFeedbackTimer == null) -// { -// TriList.BooleanInput[CommonBoolCue.ShowVolumeSlider.Number].BoolValue = true; -// VolumeFeedbackTimer = new CTimer(o => { -// TriList.BooleanInput[CommonBoolCue.ShowVolumeSlider.Number].BoolValue = false; -// }, 1000); -// } - -// } - -// void ReleaseAudioPresses() -// { -// if (Remote.VolumeDown.UserObject is BoolCueActionPair && Remote.VolumeDown.State == eButtonState.Pressed) -// (Remote.VolumeDown.UserObject as BoolCueActionPair).Invoke(false); -// if (Remote.VolumeUp.UserObject is BoolCueActionPair && Remote.VolumeUp.State == eButtonState.Pressed) -// (Remote.VolumeUp.UserObject as BoolCueActionPair).Invoke(false); -// if (Remote.Mute.UserObject is BoolCueActionPair && Remote.Mute.State == eButtonState.Pressed) -// (Remote.Mute.UserObject as BoolCueActionPair).Invoke(false); -// } - -// /// -// /// Handler. Run UO's stored in buttons -// /// -// void Remote_ButtonStateChange(GenericBase device, ButtonEventArgs args) -// { -// Debug.Console(2, this, "{0}={1}", args.Button.Name, args.Button.State); -// var uo = args.Button.UserObject as BoolCueActionPair; -// if (uo != null) -// uo.Invoke(args.NewButtonState == eButtonState.Pressed); -// } -// } -//} \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Touchpanels/SmartGraphicsTouchpanelControllerBase.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/Touchpanels/SmartGraphicsTouchpanelControllerBase.cs deleted file mode 100644 index 42c365d1..00000000 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/Touchpanels/SmartGraphicsTouchpanelControllerBase.cs +++ /dev/null @@ -1,309 +0,0 @@ -//using System; -//using System.Collections.Generic; -//using System.Linq; -//using Crestron.SimplSharp; -//using Crestron.SimplSharpPro; -//using Crestron.SimplSharpPro.DeviceSupport; - - -//namespace PepperDash.Essentials.Core -//{ -// public abstract class SmartGraphicsTouchpanelControllerBase : CrestronGenericBaseDevice -// { -// public BasicTriListWithSmartObject TriList { get; protected set; } -// public bool UsesSplashPage { get; set; } -// public string SplashMessage { get; set; } -// public bool ShowDate -// { -// set { TriList.BooleanInput[UiCue.ShowDate.Number].BoolValue = value; } -// } -// public bool ShowTime -// { -// set { TriList.BooleanInput[UiCue.ShowTime.Number].BoolValue = value; } -// } - -// public abstract List FunctionList { get; } - - -// protected eMainModeType MainMode; -// protected IPresentationSource CurrentPresentationControlDevice; - -// /// -// /// Defines the signal offset for the presentation device. Defaults to 100 -// /// -// public uint PresentationControlDeviceJoinOffset { get { return 100; } } - -// public enum eMainModeType -// { -// Presentation, Splash, Tech -// } - -// protected string SgdFilePath; -// public EssentialsRoom CurrentRoom { get; protected set; } -// protected Dictionary LoadedPageControllers -// = new Dictionary(); - -// static object RoomChangeLock = new object(); - -// /// -// /// Constructor -// /// -// public SmartGraphicsTouchpanelControllerBase(string key, string name, BasicTriListWithSmartObject triList, -// string sgdFilePath) -// : base(key, name, triList) -// { -// TriList = triList; -// if (string.IsNullOrEmpty(key)) throw new ArgumentNullException("key"); -// if (string.IsNullOrEmpty(sgdFilePath)) throw new ArgumentNullException("sgdFilePath"); -// SgdFilePath = sgdFilePath; -// TriList.LoadSmartObjects(SgdFilePath); -// UsesSplashPage = true; -// SplashMessage = "Welcome"; -// TriList.SigChange += Tsw_AnySigChange; -// foreach (var kvp in TriList.SmartObjects) -// kvp.Value.SigChange += this.Tsw_AnySigChange; -// } - -// public override bool CustomActivate() -// { -// var baseSuccess = base.CustomActivate(); -// if (!baseSuccess) return false; - -// // Wiring up the buttons with UOs -// foreach (var uo in this.FunctionList) -// { -// if (uo.Cue.Number == 0) continue; -// if (uo is BoolCueActionPair) -// TriList.BooleanOutput[uo.Cue.Number].UserObject = uo; -// else if (uo is UShortCueActionPair) -// TriList.UShortOutput[uo.Cue.Number].UserObject = uo; -// else if (uo is StringCueActionPair) -// TriList.StringOutput[uo.Cue.Number].UserObject = uo; -// } - -// return true; -// } - -// //public void SetCurrentRoom(EssentialsRoom room) -// //{ -// // if (CurrentRoom != null) -// // HideRoomUI(); -// // CurrentRoom = room; -// // ShowRoomUI(); -// //} - -// /// -// /// -// /// -// /// -// public void SetCurrentRoom(EssentialsRoom room) -// { -// if (CurrentRoom == room) return; - -// IVolumeFunctions oldAudio = null; -// //Disconnect current room and audio device -// if (CurrentRoom != null) -// { -// HideRoomUI(); -// CurrentRoom.AudioDeviceWillChange -= CurrentRoom_AudioDeviceWillChange; -// CurrentRoom.PresentationSourceChange -= CurrentRoom_PresentationSourceChange; -// oldAudio = CurrentRoom.CurrentAudioDevice; -// } - -// CurrentRoom = room; -// IVolumeFunctions newAudio = null; -// if (CurrentRoom != null) -// { -// CurrentRoom.AudioDeviceWillChange += this.CurrentRoom_AudioDeviceWillChange; -// CurrentRoom.PresentationSourceChange += this.CurrentRoom_PresentationSourceChange; -// SetControlSource(CurrentRoom.CurrentPresentationSource); -// newAudio = CurrentRoom.CurrentAudioDevice; -// ShowRoomUI(); -// } - -// SwapAudioDeviceControls(oldAudio, newAudio); -// } - -// /// -// /// Detaches and attaches an IVolumeFunctions device to the appropriate TP TriList signals. -// /// This will also add IVolumeNumeric if the device implements it. -// /// Overriding classes should call this. Overriding classes are responsible for -// /// linking up to hard keys, etc. -// /// -// /// May be null -// /// May be null -// protected virtual void SwapAudioDeviceControls(IVolumeFunctions oldDev, IVolumeFunctions newDev) -// { -// // Disconnect -// if (oldDev != null) -// { -// TriList.BooleanOutput[CommonBoolCue.VolumeDown.Number].UserObject = null; -// TriList.BooleanOutput[CommonBoolCue.VolumeUp.Number].UserObject = null; -// TriList.BooleanOutput[CommonBoolCue.MuteToggle.Number].UserObject = null; -// TriList.BooleanInput[CommonBoolCue.ShowVolumeButtons.Number].BoolValue = false; -// TriList.BooleanInput[CommonBoolCue.ShowVolumeSlider.Number].BoolValue = false; -// if (oldDev is IVolumeTwoWay) -// { -// TriList.UShortOutput[CommonIntCue.MainVolumeLevel.Number].UserObject = null; -// (oldDev as IVolumeTwoWay).IsMutedFeedback -// .UnlinkInputSig(TriList.BooleanInput[CommonBoolCue.MuteOn.Number]); -// (oldDev as IVolumeTwoWay).VolumeLevelFeedback -// .UnlinkInputSig(TriList.UShortInput[CommonIntCue.MainVolumeLevel.Number]); -// } -// } -// if (newDev != null) -// { -// TriList.BooleanInput[CommonBoolCue.ShowVolumeSlider.Number].BoolValue = true; -// TriList.BooleanOutput[CommonBoolCue.VolumeDown.Number].UserObject = newDev.VolumeDownCueActionPair; -// TriList.BooleanOutput[CommonBoolCue.VolumeUp.Number].UserObject = newDev.VolumeUpCueActionPair; -// TriList.BooleanOutput[CommonBoolCue.MuteToggle.Number].UserObject = newDev.MuteToggleCueActionPair; -// if (newDev is IVolumeTwoWay) -// { -// TriList.BooleanInput[CommonBoolCue.ShowVolumeSlider.Number].BoolValue = true; -// var numDev = newDev as IVolumeTwoWay; -// TriList.UShortOutput[CommonIntCue.MainVolumeLevel.Number].UserObject = numDev.VolumeLevelCueActionPair; -// numDev.VolumeLevelFeedback -// .LinkInputSig(TriList.UShortInput[CommonIntCue.MainVolumeLevel.Number]); -// } -// } -// } - - -// /// -// /// Does nothing. Override to add functionality when calling SetCurrentRoom -// /// -// protected virtual void HideRoomUI() { } - -// /// -// /// Does nothing. Override to add functionality when calling SetCurrentRoom -// /// -// protected virtual void ShowRoomUI() { } - -// /// -// /// Sets up the current presentation device and updates statuses if the device is capable. -// /// -// protected void SetControlSource(IPresentationSource newSource) -// { -// if (CurrentPresentationControlDevice != null) -// { -// HideCurrentPresentationSourceUi(); - -// // Unhook presses and things -// if (CurrentPresentationControlDevice is IHasCueActionList) -// { -// foreach (var uo in (CurrentPresentationControlDevice as IHasCueActionList).CueActionList) -// { -// if (uo.Cue.Number == 0) continue; -// if (uo is BoolCueActionPair) -// { -// var bSig = TriList.BooleanOutput[uo.Cue.Number]; -// // Disconnection should also clear bool sigs in case they are pressed and -// // might be orphaned -// if (bSig.BoolValue) -// (bSig.UserObject as BoolCueActionPair).Invoke(false); -// bSig.UserObject = null; -// } -// else if (uo is UShortCueActionPair) -// TriList.UShortOutput[uo.Cue.Number].UserObject = null; -// else if (uo is StringCueActionPair) -// TriList.StringOutput[uo.Cue.Number].UserObject = null; -// } -// } -// // unhook outputs -// if (CurrentPresentationControlDevice is IHasFeedback) -// { -// foreach (var output in (CurrentPresentationControlDevice as IHasFeedback).Feedbacks) -// { -// if (output.Cue.Number == 0) continue; -// if (output is BoolFeedback) -// (output as BoolFeedback).UnlinkInputSig(TriList.BooleanInput[output.Cue.Number]); -// else if (output is IntFeedback) -// (output as IntFeedback).UnlinkInputSig(TriList.UShortInput[output.Cue.Number]); -// else if (output is StringFeedback) -// (output as StringFeedback).UnlinkInputSig(TriList.StringInput[output.Cue.Number]); -// } -// } -// } -// CurrentPresentationControlDevice = newSource; -// //connect presses and things -// if (newSource is IHasCueActionList) // This has functions, get 'em -// { -// foreach (var ao in (newSource as IHasCueActionList).CueActionList) -// { -// if (ao.Cue.Number == 0) continue; -// if (ao is BoolCueActionPair) -// TriList.BooleanOutput[ao.Cue.Number].UserObject = ao; -// else if (ao is UShortCueActionPair) -// TriList.UShortOutput[ao.Cue.Number].UserObject = ao; -// else if (ao is StringCueActionPair) -// TriList.StringOutput[ao.Cue.Number].UserObject = ao; -// } -// } -// // connect outputs (addInputSig should update sig) -// if (CurrentPresentationControlDevice is IHasFeedback) -// { -// foreach (var output in (CurrentPresentationControlDevice as IHasFeedback).Feedbacks) -// { -// if (output.Cue.Number == 0) continue; -// if (output is BoolFeedback) -// (output as BoolFeedback).LinkInputSig(TriList.BooleanInput[output.Cue.Number]); -// else if (output is IntFeedback) -// (output as IntFeedback).LinkInputSig(TriList.UShortInput[output.Cue.Number]); -// else if (output is StringFeedback) -// (output as StringFeedback).LinkInputSig(TriList.StringInput[output.Cue.Number]); -// } -// } -// ShowCurrentPresentationSourceUi(); -// } - -// /// -// /// Reveals the basic UI for the current device -// /// -// protected virtual void ShowCurrentPresentationSourceUi() -// { -// } - -// /// -// /// Hides the UI for the current device and calls for a feedback signal cleanup -// /// -// protected virtual void HideCurrentPresentationSourceUi() -// { -// } - - -// /// -// /// -// /// -// void CurrentRoom_PresentationSourceChange(object sender, EssentialsRoomSourceChangeEventArgs args) -// { -// SetControlSource(args.NewSource); -// } - - -// /// -// /// -// /// -// void CurrentRoom_AudioDeviceWillChange(object sender, EssentialsRoomAudioDeviceChangeEventArgs e) -// { -// SwapAudioDeviceControls(e.OldDevice, e.NewDevice); -// } - - - -// /// -// /// Panel event handler -// /// -// void Tsw_AnySigChange(object currentDevice, SigEventArgs args) -// { -// // plugged in commands -// object uo = args.Sig.UserObject; - -// if (uo is Action) -// (uo as Action)(args.Sig.BoolValue); -// else if (uo is Action) -// (uo as Action)(args.Sig.UShortValue); -// else if (uo is Action) -// (uo as Action)(args.Sig.StringValue); -// } -// } -//} \ No newline at end of file diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/VideoStatus/VideoStatusCues.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/VideoStatus/VideoStatusCues.cs deleted file mode 100644 index 5db78fb5..00000000 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/VideoStatus/VideoStatusCues.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro; - -namespace PepperDash.Essentials.Core -{ - public static class VideoStatusCues - { - public static readonly Cue HasVideoStatusFeedback = Cue.BoolCue("HasVideoStatusFeedback", 1); - public static readonly Cue VideoSyncFeedback = Cue.BoolCue("VideoSyncFeedback", 2); - public static readonly Cue HdcpActiveFeedback = Cue.BoolCue("HdcpActiveFeedback", 3); - public static readonly Cue HdcpStateFeedback = Cue.StringCue("HdcpStateFeedback", 3); - public static readonly Cue VideoResolutionFeedback = Cue.StringCue("VideoResolutionFeedback", 2); - public static readonly Cue VideoStatusDeviceKey = Cue.StringCue("VideoStatusDeviceKey", 0); - public static readonly Cue VideoStatusDeviceName = Cue.StringCue("VideoStatusDeviceName", 4); - } -} \ No newline at end of file diff --git a/essentials-framework/Essentials DM/Essentials_DM/Cards REMOVE/DmInputCardBase.cs b/essentials-framework/Essentials DM/Essentials_DM/Cards REMOVE/DmInputCardBase.cs deleted file mode 100644 index a0c9536c..00000000 --- a/essentials-framework/Essentials DM/Essentials_DM/Cards REMOVE/DmInputCardBase.cs +++ /dev/null @@ -1,62 +0,0 @@ -//using System; -//using System.Collections.Generic; -//using System.Linq; -//using System.Text; -//using Crestron.SimplSharp; -//using Crestron.SimplSharpPro; -//using Crestron.SimplSharpPro.DeviceSupport; -//using Crestron.SimplSharpPro.DM; -//using Crestron.SimplSharpPro.DM.Cards; - -//using PepperDash.Essentials.Core; -//using PepperDash.Essentials.DM; - -//namespace PepperDash.Essentials.DM.Cards -//{ -// public class DmInputCardControllerBase : IRoutingInputsOutputs -// { -// public string Key { get; private set; } -// public uint Slot { get; private set; } -// public abstract eDmInputCardType Type { get; } - -// //public RoutingOutputPort BackplaneVideoOut { get; private set; } -// //public RoutingOutputPort BackplaneAudioOut { get; private set; } - -// public RoutingPortCollection InputPorts { get; private set; } - -// public RoutingPortCollection OutputPorts { get; private set; } - -// public DmInputCardControllerBase(string key, uint slot) -// { -// Key = key; -// Slot = slot; -// //BackplaneAudioOut = new RoutingOutputPort("backplaneAudioOut", eRoutingSignalType.Audio, -// // eRoutingPortConnectionType.BackplaneOnly, slot, this); -// //BackplaneVideoOut = new RoutingOutputPort("backplaneVideoOut", eRoutingSignalType.Video, -// // eRoutingPortConnectionType.BackplaneOnly, slot, this); -// //InputPorts = new RoutingPortCollection(); -// //OutputPorts = new RoutingPortCollection { BackplaneAudioOut, BackplaneVideoOut }; -// } - -// ///// -// ///// Gets a physical port by name. Returns null if doesn't exist -// ///// -// //public RoutingInputPort GetInputPort(string key) -// //{ -// // return InputPorts.FirstOrDefault(p => p.Key.Equals(key, StringComparison.OrdinalIgnoreCase)); -// //} - -// ///// -// ///// Gets a physical port by name. Returns null if doesn't exist -// ///// -// //public RoutingOutputPort GetOutputPort(string key) -// //{ -// // return OutputPorts.FirstOrDefault(p => p.Key.Equals(key, StringComparison.OrdinalIgnoreCase)); -// //} -// } - -// public enum eDmInputCardType -// { -// None, DmcHd, DmcHdDsp, Dmc4kHd, Dmc4kHdDsp, Dmc4kC, Dmc4kCDsp -// } -//} \ No newline at end of file diff --git a/essentials-framework/Essentials DM/Essentials_DM/Cards REMOVE/DmOutputCardBase.cs b/essentials-framework/Essentials DM/Essentials_DM/Cards REMOVE/DmOutputCardBase.cs deleted file mode 100644 index c554539a..00000000 --- a/essentials-framework/Essentials DM/Essentials_DM/Cards REMOVE/DmOutputCardBase.cs +++ /dev/null @@ -1,79 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.DeviceSupport; -using Crestron.SimplSharpPro.DM; -using Crestron.SimplSharpPro.DM.Cards; - -using PepperDash.Essentials.Core; -using PepperDash.Essentials.DM; - -namespace PepperDash.Essentials.DM.Cards -{ - /// - /// - /// - public abstract class DmSingleOutputCardControllerBase// : IRoutingInputsOutputs - { - public string Key { get; private set; } - public uint Slot { get; private set; } - public abstract eDmOutputCardType Type { get; } - - //public RoutingInputPort BackplaneAudioIn1 { get; private set; } - //public RoutingInputPort BackplaneVideoIn1 { get; private set; } - //public RoutingInputPort BackplaneAudioIn2 { get; private set; } - //public RoutingInputPort BackplaneVideoIn2 { get; private set; } - - //public RoutingPortCollection InputPorts { get; private set; } - //public RoutingPortCollection OutputPorts { get; private set; } - - public DmSingleOutputCardControllerBase(string key, uint cardSlot) - { - Key = key; - Slot = cardSlot; - //BackplaneAudioIn1 = new RoutingInputPort("backplaneAudioIn1", eRoutingSignalType.Audio, - // eRoutingPortConnectionType.BackplaneOnly, cardSlot, this); - //BackplaneVideoIn1 = new RoutingInputPort("backplaneVideoIn1", eRoutingSignalType.Video, - // eRoutingPortConnectionType.BackplaneOnly, cardSlot, this); - //BackplaneAudioIn2 = new RoutingInputPort("backplaneAudioIn2", eRoutingSignalType.Audio, - // eRoutingPortConnectionType.BackplaneOnly, cardSlot + 1, this); - //BackplaneVideoIn2 = new RoutingInputPort("backplaneVideoIn2", eRoutingSignalType.Video, - // eRoutingPortConnectionType.BackplaneOnly, cardSlot + 1, this); - //InputPorts = new RoutingPortCollection - //{ - // BackplaneAudioIn1, - // BackplaneAudioIn2, - // BackplaneVideoIn1, - // BackplaneVideoIn2 - //}; - //OutputPorts = new RoutingPortCollection(); - } - - ///// - ///// Gets a physical port by name. Returns null if doesn't exist - ///// - //public RoutingInputPort GetInputPort(string key) - //{ - // return InputPorts.FirstOrDefault(p => p.Key.Equals(key, StringComparison.OrdinalIgnoreCase)); - //} - - ///// - ///// Gets a physical port by name. Returns null if doesn't exist - ///// - //public RoutingOutputPort GetOutputPort(string key) - //{ - // return OutputPorts.FirstOrDefault(p => p.Key.Equals(key, StringComparison.OrdinalIgnoreCase)); - //} - } - - /// - /// - /// - public enum eDmOutputCardType - { - None, Dmc4kCoHd, Dmc4kHdo, DmcCoHd, DmcSoHd - } -} \ No newline at end of file diff --git a/essentials-framework/Essentials DM/Essentials_DM/Cards REMOVE/Dmc4kCoHdSingleOutputCard.cs b/essentials-framework/Essentials DM/Essentials_DM/Cards REMOVE/Dmc4kCoHdSingleOutputCard.cs deleted file mode 100644 index 44dc917a..00000000 --- a/essentials-framework/Essentials DM/Essentials_DM/Cards REMOVE/Dmc4kCoHdSingleOutputCard.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.DeviceSupport; -using Crestron.SimplSharpPro.DM; -using Crestron.SimplSharpPro.DM.Cards; - -using PepperDash.Core; -using PepperDash.Essentials.Core; -using PepperDash.Essentials.DM; - -namespace PepperDash.Essentials.DM.Cards -{ - public class Dmc4kCoHdSingleOutputCard : DmSingleOutputCardControllerBase - { - public override eDmOutputCardType Type - { - get { return eDmOutputCardType.Dmc4kCoHd; } - } - public Dmc4kCoHdSingle Card { get; private set; } - - //public RoutingOutputPort DmOut1 { get; private set; } - //public RoutingOutputPort DmOut2 { get; private set; } - //public RoutingOutputPort HdmiOut1 { get; private set; } - - public Dmc4kCoHdSingleOutputCard(string key, Dmc4kCoHdSingle card, uint slot) - : base(key, slot) - { - Card = card; - //DmOut1 = new RoutingOutputPort(DmPortName.DmOut1, eRoutingSignalType.Audio | eRoutingSignalType.Video, - // eRoutingPortConnectionType.DmCat, null, this); - //DmOut2 = new RoutingOutputPort(DmPortName.DmOut2, eRoutingSignalType.Audio | eRoutingSignalType.Video, - // eRoutingPortConnectionType.DmCat, null, this); - //HdmiOut1 = new RoutingOutputPort(DmPortName.HdmiOut1, eRoutingSignalType.Audio | eRoutingSignalType.Video, - // eRoutingPortConnectionType.Hdmi, null, this); - - //OutputPorts.AddRange(new[] { DmOut1, DmOut2, HdmiOut1 }); - } - } -} \ No newline at end of file diff --git a/essentials-framework/Essentials DM/Essentials_DM/Cards REMOVE/Dmc4kHdoSingleOutputCard.cs b/essentials-framework/Essentials DM/Essentials_DM/Cards REMOVE/Dmc4kHdoSingleOutputCard.cs deleted file mode 100644 index 2d3e9884..00000000 --- a/essentials-framework/Essentials DM/Essentials_DM/Cards REMOVE/Dmc4kHdoSingleOutputCard.cs +++ /dev/null @@ -1,46 +0,0 @@ -//using System; -//using System.Collections.Generic; -//using System.Linq; -//using System.Text; -//using Crestron.SimplSharp; -//using Crestron.SimplSharpPro; -//using Crestron.SimplSharpPro.DeviceSupport; -//using Crestron.SimplSharpPro.DM; -//using Crestron.SimplSharpPro.DM.Cards; - -//using PepperDash.Core; -//using PepperDash.Essentials.Core; -//using PepperDash.Essentials.DM; - -//namespace PepperDash.Essentials.DM.Cards -//{ -// public class Dmc4kHdoSingleOutputCard : DmSingleOutputCardControllerBase -// { -// public override eDmOutputCardType Type -// { -// get { return eDmOutputCardType.Dmc4kHdo; } -// } -// public Dmc4kHdoSingle Card { get; private set; } - -// //public RoutingOutputPort AudioOut1 { get; private set; } -// //public RoutingOutputPort AudioOut2 { get; private set; } -// //public RoutingOutputPort HdmiOut1 { get; private set; } -// //public RoutingOutputPort HdmiOut2 { get; private set; } - -// public Dmc4kHdoSingleOutputCard(string key, Dmc4kHdoSingle card, uint slot) -// : base(key, slot) -// { -// Card = card; -// //AudioOut1 = new RoutingOutputPort(DmPortName.BalancedAudioOut1, eRoutingSignalType.Audio, -// // eRoutingPortConnectionType.LineAudio, null, this); -// //AudioOut2 = new RoutingOutputPort(DmPortName.BalancedAudioOut2, eRoutingSignalType.Audio, -// // eRoutingPortConnectionType.LineAudio, null, this); -// //HdmiOut1 = new RoutingOutputPort(DmPortName.HdmiOut1, eRoutingSignalType.Audio | eRoutingSignalType.Video, -// // eRoutingPortConnectionType.Hdmi, null, this); -// //HdmiOut2 = new RoutingOutputPort(DmPortName.HdmiOut2, eRoutingSignalType.Audio | eRoutingSignalType.Video, -// // eRoutingPortConnectionType.Hdmi, null, this); - -// //OutputPorts.AddRange(new[] { AudioOut1, AudioOut2, HdmiOut1, HdmiOut2 }); -// } -// } -//} \ No newline at end of file diff --git a/essentials-framework/Essentials DM/Essentials_DM/Cards REMOVE/DmcC4kInputCard.cs b/essentials-framework/Essentials DM/Essentials_DM/Cards REMOVE/DmcC4kInputCard.cs deleted file mode 100644 index d2ab69e2..00000000 --- a/essentials-framework/Essentials DM/Essentials_DM/Cards REMOVE/DmcC4kInputCard.cs +++ /dev/null @@ -1,76 +0,0 @@ -//using System; -//using System.Collections.Generic; -//using System.Linq; -//using System.Text; -//using Crestron.SimplSharp; -//using Crestron.SimplSharpPro; -//using Crestron.SimplSharpPro.DeviceSupport; -//using Crestron.SimplSharpPro.DM; -//using Crestron.SimplSharpPro.DM.Cards; - -//using PepperDash.Essentials.Core; -//using PepperDash.Essentials.DM; - -//namespace PepperDash.Essentials.DM.Cards -//{ -// public class Dmc4kCController : DmInputCardControllerBase -// { -// public override eDmInputCardType Type -// { -// get { return eDmInputCardType.Dmc4kC; } -// } -// public Dmc4kC Card { get; private set; } - -// //public RoutingInputPortWithVideoStatuses DmIn { get; private set; } -// //public RoutingOutputPort HdmiLoopOut { get; private set; } -// //public RoutingOutputPort AudioLoopOut { get; private set; } - -// public Dmc4kCController(string key, Dmc4kC card, uint slot) -// : base(key, slot) -// { -// Card = card; -// //DmIn = new RoutingInputPortWithVideoStatuses(DmPortName.DmIn, eRoutingSignalType.Audio | eRoutingSignalType.Video, -// // eRoutingPortConnectionType.DmCat, null, this, -// // VideoStatusHelper.GetDmInputStatusFuncs(Card.DmInput)); - -// //HdmiLoopOut = new RoutingOutputPort(DmPortName.HdmiLoopOut, eRoutingSignalType.Audio | eRoutingSignalType.Video, -// // eRoutingPortConnectionType.Hdmi, null, this); -// //AudioLoopOut = new RoutingOutputPort(DmPortName.AudioLoopOut, eRoutingSignalType.Audio, -// // eRoutingPortConnectionType.Hdmi, null, this); - -// //InputPorts.Add(DmIn); -// //OutputPorts.AddRange(new[] { HdmiLoopOut, AudioLoopOut }); -// } -// } - -// public class Dmc4kCDspController : DmInputCardControllerBase -// { -// public override eDmInputCardType Type -// { -// get { return eDmInputCardType.Dmc4kCDsp; } -// } -// public Dmc4kCDsp Card { get; private set; } - -// //public RoutingInputPortWithVideoStatuses DmIn { get; private set; } -// //public RoutingOutputPort HdmiLoopOut { get; private set; } -// //public RoutingOutputPort AudioLoopOut { get; private set; } - -// public Dmc4kCDspController(string key, Dmc4kCDsp card, uint slot) -// : base(key, slot) -// { -// Card = card; -// //DmIn = new RoutingInputPortWithVideoStatuses(DmPortName.DmIn, eRoutingSignalType.Audio | eRoutingSignalType.Video, -// // eRoutingPortConnectionType.DmCat, null, this, -// // VideoStatusHelper.GetDmInputStatusFuncs(Card.DmInput)); - -// //HdmiLoopOut = new RoutingOutputPort(DmPortName.HdmiLoopOut, eRoutingSignalType.Audio | eRoutingSignalType.Video, -// // eRoutingPortConnectionType.Hdmi, null, this); -// //AudioLoopOut = new RoutingOutputPort(DmPortName.AudioLoopOut, eRoutingSignalType.Audio, -// // eRoutingPortConnectionType.Hdmi, null, this); - -// //InputPorts.Add(DmIn); -// //OutputPorts.AddRange(new[] { HdmiLoopOut, AudioLoopOut }); -// } -// } - -//} \ No newline at end of file diff --git a/essentials-framework/Essentials DM/Essentials_DM/Cards REMOVE/DmcHD4kInputCard.cs b/essentials-framework/Essentials DM/Essentials_DM/Cards REMOVE/DmcHD4kInputCard.cs deleted file mode 100644 index 4f5f5c8b..00000000 --- a/essentials-framework/Essentials DM/Essentials_DM/Cards REMOVE/DmcHD4kInputCard.cs +++ /dev/null @@ -1,82 +0,0 @@ -//using System; -//using System.Collections.Generic; -//using System.Linq; -//using System.Text; -//using Crestron.SimplSharp; -//using Crestron.SimplSharpPro; -//using Crestron.SimplSharpPro.DeviceSupport; -//using Crestron.SimplSharpPro.DM; -//using Crestron.SimplSharpPro.DM.Cards; - -//using PepperDash.Essentials.Core; -//using PepperDash.Essentials.DM; - -//namespace PepperDash.Essentials.DM.Cards -//{ -// /// -// /// -// /// -// public class Dmc4kHdController : DmInputCardControllerBase -// { -// public Dmc4kHd Card { get; private set; } -// public override eDmInputCardType Type -// { -// get { return eDmInputCardType.Dmc4kHd; } -// } - -// public RoutingInputPortWithVideoStatuses HdmiIn { get; private set; } -// public RoutingOutputPort HdmiLoopOut { get; private set; } -// public RoutingOutputPort AudioLoopOut { get; private set; } - -// public Dmc4kHdController(string key, Dmc4kHd card, uint slot) -// : base(key, slot) -// { -// Card = card; -// HdmiIn = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn, eRoutingSignalType.Audio | eRoutingSignalType.Video, -// eRoutingPortConnectionType.Hdmi, null, this, -// VideoStatusHelper.GetHdmiInputStatusFuncs(Card.HdmiInput)); - -// HdmiLoopOut = new RoutingOutputPort(DmPortName.HdmiLoopOut, eRoutingSignalType.Audio | eRoutingSignalType.Video, -// eRoutingPortConnectionType.Hdmi, null, this); -// AudioLoopOut = new RoutingOutputPort(DmPortName.AudioLoopOut, eRoutingSignalType.Audio, -// eRoutingPortConnectionType.Hdmi, null, this); - -// InputPorts.Add(HdmiIn); -// OutputPorts.AddRange(new[] { HdmiLoopOut, AudioLoopOut }); -// } -// } - -// /// -// /// -// /// -// public class Dmc4kHdDspController : DmInputCardControllerBase -// { -// public Dmc4kHdDsp Card { get; private set; } -// public override eDmInputCardType Type -// { -// get { return eDmInputCardType.Dmc4kHdDsp; } -// } - -// //public RoutingInputPortWithVideoStatuses HdmiIn { get; private set; } -// //public RoutingOutputPort HdmiLoopOut { get; private set; } -// //public RoutingOutputPort AudioLoopOut { get; private set; } - -// public Dmc4kHdDspController(string key, Dmc4kHdDsp card, uint slot) -// : base(key, slot) -// { -// Card = card; -// //HdmiIn = new RoutingInputPortWithVideoStatuses(DmPortName.HdmiIn, eRoutingSignalType.Audio | eRoutingSignalType.Video, -// // eRoutingPortConnectionType.Hdmi, null, this, -// // VideoStatusHelper.GetHdmiInputStatusFuncs(Card.HdmiInput)); - -// //HdmiLoopOut = new RoutingOutputPort(DmPortName.HdmiLoopOut, eRoutingSignalType.Audio | eRoutingSignalType.Video, -// // eRoutingPortConnectionType.Hdmi, null, this); -// //AudioLoopOut = new RoutingOutputPort(DmPortName.AudioLoopOut, eRoutingSignalType.Audio, -// // eRoutingPortConnectionType.Hdmi, null, this); - -// //InputPorts.Add(HdmiIn); -// //OutputPorts.AddRange(new[] { HdmiLoopOut, AudioLoopOut }); -// } -// } -//} - diff --git a/essentials-framework/Essentials DM/Essentials_DM/Config/DMChassisConfig.cs b/essentials-framework/Essentials DM/Essentials_DM/Config/DMChassisConfig.cs index d347fbc8..5e158985 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Config/DMChassisConfig.cs +++ b/essentials-framework/Essentials DM/Essentials_DM/Config/DMChassisConfig.cs @@ -5,7 +5,6 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using PepperDash.Core; using PepperDash.Essentials.Core; -using PepperDash.Essentials.DM.Cards; namespace PepperDash.Essentials.DM.Config { diff --git a/essentials-framework/Essentials DM/Essentials_DM/Config/DmRmcConfig.cs b/essentials-framework/Essentials DM/Essentials_DM/Config/DmRmcConfig.cs index 702e10b5..0c511d35 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Config/DmRmcConfig.cs +++ b/essentials-framework/Essentials DM/Essentials_DM/Config/DmRmcConfig.cs @@ -4,7 +4,6 @@ using Crestron.SimplSharpPro.DM; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using PepperDash.Core; -using PepperDash.Essentials.DM.Cards; namespace PepperDash.Essentials.DM.Config { diff --git a/essentials-framework/Essentials DM/Essentials_DM/Config/DmTxConfig.cs b/essentials-framework/Essentials DM/Essentials_DM/Config/DmTxConfig.cs index 51d074f8..7727ed7f 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Config/DmTxConfig.cs +++ b/essentials-framework/Essentials DM/Essentials_DM/Config/DmTxConfig.cs @@ -4,7 +4,6 @@ using Crestron.SimplSharpPro.DM; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using PepperDash.Core; -using PepperDash.Essentials.DM.Cards; namespace PepperDash.Essentials.DM.Config { diff --git a/essentials-framework/Essentials DM/Essentials_DM/Config/DmpsRoutingConfig.cs b/essentials-framework/Essentials DM/Essentials_DM/Config/DmpsRoutingConfig.cs index b4ed5342..2e13ec95 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Config/DmpsRoutingConfig.cs +++ b/essentials-framework/Essentials DM/Essentials_DM/Config/DmpsRoutingConfig.cs @@ -5,7 +5,6 @@ using Newtonsoft.Json; using Newtonsoft.Json.Converters; using PepperDash.Core; using PepperDash.Essentials.Core; -using PepperDash.Essentials.DM.Cards; namespace PepperDash.Essentials.DM.Config { diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/NVX/DmNvx35xController.cs b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/NVX/DmNvx35xController.cs deleted file mode 100644 index cd12ea04..00000000 --- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/NVX/DmNvx35xController.cs +++ /dev/null @@ -1,19 +0,0 @@ -//using System; -//using System.Collections.Generic; -//using System.Linq; -//using System.Text; -//using Crestron.SimplSharp; - -//using Crestron.SimplSharpPro.DM.Streaming; - -//using PepperDash.Core; -//using PepperDash.Essentials.Core; - -//namespace PepperDash.Essentials.DM.Endpoints.NVX -//{ -// public class DmNvx35xController: DmNvxControllerBase -// { - - -// } -//} \ No newline at end of file diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/NVX/DmNvxConfig.cs b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/NVX/DmNvxConfig.cs deleted file mode 100644 index b4cecc4e..00000000 --- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/NVX/DmNvxConfig.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro.DM.Streaming; - -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using PepperDash.Core; - -namespace PepperDash.Essentials.DM.Endpoints.NVX -{ - /// - /// Represents the "properties" property of a DM NVX device config - /// - public class DmNvxConfig - { - [JsonProperty("control")] - public ControlPropertiesConfig Control { get; set; } - - [JsonProperty("parrentDeviceKey")] - public string ParentDeviceKey { get; set; } - - [JsonProperty("deviceMode")] - public eDeviceMode DeviceMode { get; set; } - - - } -} \ No newline at end of file diff --git a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/NVX/DmNvxControllerBase.cs b/essentials-framework/Essentials DM/Essentials_DM/Endpoints/NVX/DmNvxControllerBase.cs deleted file mode 100644 index 6063b893..00000000 --- a/essentials-framework/Essentials DM/Essentials_DM/Endpoints/NVX/DmNvxControllerBase.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; -using Crestron.SimplSharpPro; -using Crestron.SimplSharpPro.DM.Streaming; - -using PepperDash.Core; -using PepperDash.Essentials.Core; - -namespace PepperDash.Essentials.DM.Endpoints.NVX -{ - public abstract class DmNvxControllerBase: CrestronGenericBaseDevice - { - public DmNvx35x DmNvx { get; private set; } - - - - public abstract StringFeedback ActiveVideoInputFeedback { get; protected set; } - public RoutingInputPortWithVideoStatuses AnyVideoInput { get; protected set; } - - - public DmNvxControllerBase(string key, string name, DmNvxBaseClass hardware) - : base(key, name, hardware) - { - AddToFeedbackList(ActiveVideoInputFeedback); - } - } -} \ No newline at end of file diff --git a/essentials-framework/Essentials DM/Essentials_DM/Essentials_DM.csproj b/essentials-framework/Essentials DM/Essentials_DM/Essentials_DM.csproj index 74f4d9b7..6f31634d 100644 --- a/essentials-framework/Essentials DM/Essentials_DM/Essentials_DM.csproj +++ b/essentials-framework/Essentials DM/Essentials_DM/Essentials_DM.csproj @@ -89,12 +89,6 @@ - - - - - - @@ -110,9 +104,6 @@ - - - @@ -141,10 +132,6 @@ - - - Code - diff --git a/essentials-framework/Essentials DM/Essentials_DM/MOVE IBasicVideoStatusFeedbacks.cs b/essentials-framework/Essentials DM/Essentials_DM/MOVE IBasicVideoStatusFeedbacks.cs deleted file mode 100644 index 26b950ce..00000000 --- a/essentials-framework/Essentials DM/Essentials_DM/MOVE IBasicVideoStatusFeedbacks.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Crestron.SimplSharp; - -using PepperDash.Essentials.Core; - -namespace PepperDash.Essentials.DM -{ - public interface IBasicVideoStatusFeedbacks - { - BoolFeedback HasVideoStatusFeedback { get; } - BoolFeedback HdcpActiveFeedback { get; } - StringFeedback HdcpStateFeedback { get; } - StringFeedback VideoResolutionFeedback { get; } - BoolFeedback VideoSyncFeedback { get; } - } -} \ No newline at end of file diff --git a/essentials-framework/Essentials DM/Essentials_DM/Nvx/NvxDirectorController.cs b/essentials-framework/Essentials DM/Essentials_DM/Nvx/NvxDirectorController.cs deleted file mode 100644 index 49986c50..00000000 --- a/essentials-framework/Essentials DM/Essentials_DM/Nvx/NvxDirectorController.cs +++ /dev/null @@ -1,746 +0,0 @@ -//using System; -//using System.Collections.Generic; -//using System.Linq; -//using System.Text; -//using Crestron.SimplSharp; -//using Crestron.SimplSharpPro; -//using Crestron.SimplSharpPro.DM; -//using Crestron.SimplSharpPro.DM.Cards; -//using Crestron.SimplSharpPro.DM.Streaming; -//using Crestron.SimplSharpPro.DM.Endpoints; -//using Crestron.SimplSharpPro.DM.Endpoints.Receivers; - -//using PepperDash.Core; -//using PepperDash.Essentials.Core; -//using PepperDash.Essentials.DM.Cards; -//using PepperDash.Essentials.DM.Config; - -//namespace PepperDash.Essentials.DM -//{ -// /// -// /// Builds a controller for basic DM-RMCs with Com and IR ports and no control functions -// /// -// /// -// public class NvxDirectorController : CrestronGenericBaseDevice, IRoutingInputsOutputs, IRouting, IHasFeedback//, ICardPortsDevice -// { -// public NvxDirectorController Chassis { get; private set; } - -// // Feedbacks for EssentialDM -// public Dictionary VideoOutputFeedbacks { get; private set; } -// public Dictionary AudioOutputFeedbacks { get; private set; } -// public Dictionary VideoInputSyncFeedbacks { get; private set; } -// public Dictionary InputEndpointOnlineFeedbacks { get; private set; } -// public Dictionary OutputEndpointOnlineFeedbacks { get; private set; } -// public Dictionary InputNameFeedbacks { get; private set; } -// public Dictionary OutputNameFeedbacks { get; private set; } -// public Dictionary OutputVideoRouteNameFeedbacks { get; private set; } -// public Dictionary OutputAudioRouteNameFeedbacks { get; private set; } - - -// // Need a couple Lists of generic Backplane ports -// public RoutingPortCollection InputPorts { get; private set; } -// public RoutingPortCollection OutputPorts { get; private set; } - -// public Dictionary TxDictionary { get; set; } -// public Dictionary RxDictionary { get; set; } - -// //public Dictionary InputCards { get; private set; } -// //public Dictionary OutputCards { get; private set; } - -// public Dictionary InputNames { get; set; } -// public Dictionary OutputNames { get; set; } -// public Dictionary VolumeControls { get; private set; } - -// public const int RouteOffTime = 500; -// Dictionary RouteOffTimers = new Dictionary(); - -// /// -// /// Factory method to create a new chassis controller from config data. Limited to 8x8 right now -// /// -// public static NvxDirectorController GetNvxDirectorController(string key, string name, -// string type, DMChassisPropertiesConfig properties) -// { -// try -// { -// type = type.ToLower(); -// uint ipid = properties.Control.IpIdInt; // Convert.ToUInt16(properties.Id, 16); -// NvxDirectorController controller = null; - - -// if (type == "dmmd8x8") -// { -// controller = new NvxDirectorController(key, name, new DmMd8x8(ipid, Global.ControlSystem)); - -// // add the cards and port names -// foreach (var kvp in properties.InputSlots) -// controller.AddInputCard(kvp.Value, kvp.Key); -// foreach (var kvp in properties.OutputSlots) { -// controller.AddOutputCard(kvp.Value, kvp.Key); - -// } - -// foreach (var kvp in properties.VolumeControls) -// { -// // get the card -// // check it for an audio-compatible type -// // make a something-something that will make it work -// // retire to mountain village -// var outNum = kvp.Key; -// var card = controller.Chassis.Outputs[outNum].Card; -// Audio.Output audio = null; -// if (card is DmcHdo) -// audio = (card as DmcHdo).Audio; -// else if (card is Dmc4kHdo) -// audio = (card as Dmc4kHdo).Audio; -// if (audio == null) -// continue; -// // wire up the audio to something here... -// controller.AddVolumeControl(outNum, audio); -// } - -// controller.InputNames = properties.InputNames; -// controller.OutputNames = properties.OutputNames; -// return controller; -// } -// else if (type == "dmmd16x16") { -// controller = new NvxDirectorController(key, name, new DmMd16x16(ipid, Global.ControlSystem)); - -// // add the cards and port names -// foreach (var kvp in properties.InputSlots) -// controller.AddInputCard(kvp.Value, kvp.Key); -// foreach (var kvp in properties.OutputSlots) { -// controller.AddOutputCard(kvp.Value, kvp.Key); - -// } - -// foreach (var kvp in properties.VolumeControls) { -// // get the card -// // check it for an audio-compatible type -// // make a something-something that will make it work -// // retire to mountain village -// var outNum = kvp.Key; -// var card = controller.Chassis.Outputs[outNum].Card; -// Audio.Output audio = null; -// if (card is DmcHdo) -// audio = (card as DmcHdo).Audio; -// else if (card is Dmc4kHdo) -// audio = (card as Dmc4kHdo).Audio; -// if (audio == null) -// continue; -// // wire up the audio to something here... -// controller.AddVolumeControl(outNum, audio); -// } - -// controller.InputNames = properties.InputNames; -// controller.OutputNames = properties.OutputNames; -// return controller; -// } -// } -// catch (System.Exception e) -// { -// Debug.Console(0, "Error creating DM chassis:\r{0}", e); -// } -// return null; -// } - - -// /// -// /// -// /// -// /// -// /// -// /// -// public NvxDirectorController(string key, string name, DmMDMnxn chassis) -// : base(key, name, chassis) -// { -// Chassis = chassis; -// InputPorts = new RoutingPortCollection(); -// OutputPorts = new RoutingPortCollection(); -// VolumeControls = new Dictionary(); -// TxDictionary = new Dictionary(); -// RxDictionary = new Dictionary(); -// IsOnline.OutputChange += new EventHandler(IsOnline_OutputChange); -// //IsOnline.OutputChange += new EventHandler(this.IsOnline_OutputChange); -// Chassis.DMInputChange += new DMInputEventHandler(Chassis_DMInputChange); -// //Chassis.DMSystemChange += new DMSystemEventHandler(Chassis_DMSystemChange); -// Chassis.DMOutputChange += new DMOutputEventHandler(Chassis_DMOutputChange); -// VideoOutputFeedbacks = new Dictionary(); -// AudioOutputFeedbacks = new Dictionary(); -// VideoInputSyncFeedbacks = new Dictionary(); -// InputNameFeedbacks = new Dictionary(); -// OutputNameFeedbacks = new Dictionary(); -// OutputVideoRouteNameFeedbacks = new Dictionary(); -// OutputAudioRouteNameFeedbacks = new Dictionary(); -// InputEndpointOnlineFeedbacks = new Dictionary(); -// OutputEndpointOnlineFeedbacks = new Dictionary(); - -// for (uint x = 1; x <= Chassis.NumberOfOutputs; x++) -// { -// var tempX = x; - -// VideoOutputFeedbacks[tempX] = new IntFeedback(() => { -// if (Chassis.Outputs[tempX].VideoOutFeedback != null) { return (ushort)Chassis.Outputs[tempX].VideoOutFeedback.Number;} -// else { return 0; }; -// }); -// AudioOutputFeedbacks[tempX] = new IntFeedback(() => { -// if (Chassis.Outputs[tempX].AudioOutFeedback != null) { return (ushort)Chassis.Outputs[tempX].AudioOutFeedback.Number; } -// else { return 0; }; -// }); -// VideoInputSyncFeedbacks[tempX] = new BoolFeedback(() => { -// return Chassis.Inputs[tempX].VideoDetectedFeedback.BoolValue; -// }); -// InputNameFeedbacks[tempX] = new StringFeedback(() => { -// if (Chassis.Inputs[tempX].NameFeedback.StringValue != null) -// { -// return Chassis.Inputs[tempX].NameFeedback.StringValue; -// } -// else -// { -// return ""; -// } -// }); -// OutputNameFeedbacks[tempX] = new StringFeedback(() => { -// if (Chassis.Outputs[tempX].NameFeedback.StringValue != null) -// { -// return Chassis.Outputs[tempX].NameFeedback.StringValue; -// } -// else -// { -// return ""; -// } -// }); -// OutputVideoRouteNameFeedbacks[tempX] = new StringFeedback(() => -// { -// if (Chassis.Outputs[tempX].VideoOutFeedback != null) -// { -// return Chassis.Outputs[tempX].VideoOutFeedback.NameFeedback.StringValue; -// } -// else -// { -// return ""; -// } -// }); -// OutputAudioRouteNameFeedbacks[tempX] = new StringFeedback(() => -// { -// if (Chassis.Outputs[tempX].AudioOutFeedback != null) -// { -// return Chassis.Outputs[tempX].AudioOutFeedback.NameFeedback.StringValue; -// } -// else -// { -// return ""; - -// } -// }); -// InputEndpointOnlineFeedbacks[tempX] = new BoolFeedback(() => { return Chassis.Inputs[tempX].EndpointOnlineFeedback; }); - -// OutputEndpointOnlineFeedbacks[tempX] = new BoolFeedback(() => { return Chassis.Outputs[tempX].EndpointOnlineFeedback; }); -// } -// } - -// /// -// /// -// /// -// /// -// /// -// public void AddInputCard(string type, uint number) -// { -// Debug.Console(2, this, "Adding input card '{0}', slot {1}", type, number); - -// if (type == "dmcHd") -// { -// var inputCard = new DmcHd(number, this.Chassis); -// var cecPort = inputCard.HdmiInput as ICec; -// AddHdmiInCardPorts(number, cecPort); -// } -// else if (type == "dmcHdDsp") -// { -// var inputCard = new DmcHdDsp(number, this.Chassis); -// var cecPort = inputCard.HdmiInput as ICec; -// AddHdmiInCardPorts(number, cecPort); -// } -// else if (type == "dmc4kHd") -// { -// var inputCard = new Dmc4kHd(number, this.Chassis); -// var cecPort = inputCard.HdmiInput as ICec; -// AddHdmiInCardPorts(number, cecPort); -// } -// else if (type == "dmc4kHdDsp") -// { -// var inputCard = new Dmc4kHdDsp(number, this.Chassis); -// var cecPort = inputCard.HdmiInput as ICec; -// AddHdmiInCardPorts(number, cecPort); -// } -// else if (type == "dmc4kzHd") -// { -// var inputCard = new Dmc4kzHd(number, this.Chassis); -// var cecPort = inputCard.HdmiInput as ICec; -// AddHdmiInCardPorts(number, cecPort); -// } -// else if (type == "dmc4kzHdDsp") -// { -// var inputCard = new Dmc4kzHdDsp(number, this.Chassis); -// var cecPort = inputCard.HdmiInput as ICec; -// AddHdmiInCardPorts(number, cecPort); -// } -// else if (type == "dmcC") -// { -// new DmcC(number, this.Chassis); -// AddDmInCardPorts(number); -// } -// else if (type == "dmcCDsp") -// { -// new DmcCDsp(number, this.Chassis); -// AddDmInCardPorts(number); -// } -// else if (type == "dmc4kC") -// { -// new Dmc4kC(number, this.Chassis); -// AddDmInCardPorts(number); -// } -// else if (type == "dmc4kCDsp") -// { -// new Dmc4kCDsp(number, this.Chassis); -// AddDmInCardPorts(number); -// } -// else if (type == "dmc4kzC") -// { -// new Dmc4kzC(number, this.Chassis); -// AddDmInCardPorts(number); -// } -// else if (type == "dmc4kzCDsp") -// { -// new Dmc4kzCDsp(number, this.Chassis); -// AddDmInCardPorts(number); -// } -// else if (type == "dmcCat") -// { -// new DmcCat(number, this.Chassis); -// AddDmInCardPorts(number); -// } -// else if (type == "dmcCatDsp") -// { -// new DmcCatDsp(number, this.Chassis); -// AddDmInCardPorts(number); -// } -// else if (type == "dmcS") -// { -// new DmcS(number, Chassis); -// AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmMmFiber); -// AddInCardHdmiAndAudioLoopPorts(number); -// } -// else if (type == "dmcSDsp") -// { -// new DmcSDsp(number, Chassis); -// AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmMmFiber); -// AddInCardHdmiAndAudioLoopPorts(number); -// } -// else if (type == "dmcS2") -// { -// new DmcS2(number, Chassis); -// AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmSmFiber); -// AddInCardHdmiAndAudioLoopPorts(number); -// } -// else if (type == "dmcS2Dsp") -// { -// new DmcS2Dsp(number, Chassis); -// AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmSmFiber); -// AddInCardHdmiAndAudioLoopPorts(number); -// } -// else if (type == "dmcSdi") -// { -// new DmcSdi(number, Chassis); -// AddInputPortWithDebug(number, "sdiIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Sdi); -// AddOutputPortWithDebug(number, "sdiOut", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Sdi, null); -// AddInCardHdmiAndAudioLoopPorts(number); -// } -// else if (type == "dmcDvi") -// { -// new DmcDvi(number, Chassis); -// AddInputPortWithDebug(number, "dviIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Dvi); -// AddInputPortWithDebug(number, "audioIn", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio); -// AddInCardHdmiLoopPort(number); -// } -// else if (type == "dmcVga") -// { -// new DmcVga(number, Chassis); -// AddInputPortWithDebug(number, "vgaIn", eRoutingSignalType.Video, eRoutingPortConnectionType.Vga); -// AddInputPortWithDebug(number, "audioIn", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio); -// AddInCardHdmiLoopPort(number); -// } -// else if (type == "dmcVidBnc") -// { -// new DmcVidBnc(number, Chassis); -// AddInputPortWithDebug(number, "componentIn", eRoutingSignalType.Video, eRoutingPortConnectionType.Component); -// AddInputPortWithDebug(number, "audioIn", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio); -// AddInCardHdmiLoopPort(number); -// } -// else if (type == "dmcVidRcaA") -// { -// new DmcVidRcaA(number, Chassis); -// AddInputPortWithDebug(number, "componentIn", eRoutingSignalType.Video, eRoutingPortConnectionType.Component); -// AddInputPortWithDebug(number, "audioIn", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio); -// AddInCardHdmiLoopPort(number); -// } -// else if (type == "dmcVidRcaD") -// { -// new DmcVidRcaD(number, Chassis); -// AddInputPortWithDebug(number, "componentIn", eRoutingSignalType.Video, eRoutingPortConnectionType.Component); -// AddInputPortWithDebug(number, "audioIn", eRoutingSignalType.Audio, eRoutingPortConnectionType.DigitalAudio); -// AddInCardHdmiLoopPort(number); -// } -// else if (type == "dmcVid4") -// { -// new DmcVid4(number, Chassis); -// AddInputPortWithDebug(number, "compositeIn1", eRoutingSignalType.Video, eRoutingPortConnectionType.Composite); -// AddInputPortWithDebug(number, "compositeIn2", eRoutingSignalType.Video, eRoutingPortConnectionType.Composite); -// AddInputPortWithDebug(number, "compositeIn3", eRoutingSignalType.Video, eRoutingPortConnectionType.Composite); -// AddInputPortWithDebug(number, "compositeIn4", eRoutingSignalType.Video, eRoutingPortConnectionType.Composite); -// AddInCardHdmiLoopPort(number); -// } -// else if (type == "dmcStr") -// { -// new DmcStr(number, Chassis); -// AddInputPortWithDebug(number, "streamIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Streaming); -// AddInCardHdmiAndAudioLoopPorts(number); -// } -// } - -// void AddDmInCardPorts(uint number) -// { -// AddInputPortWithDebug(number, "dmIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmCat); -// AddInCardHdmiAndAudioLoopPorts(number); -// } - -// void AddHdmiInCardPorts(uint number, ICec cecPort) -// { -// AddInputPortWithDebug(number, "hdmiIn", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, cecPort); -// AddInCardHdmiAndAudioLoopPorts(number); -// } - -// void AddInCardHdmiAndAudioLoopPorts(uint number) -// { -// AddOutputPortWithDebug(number, "hdmiLoopOut", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, null); -// AddOutputPortWithDebug(number, "audioLoopOut", eRoutingSignalType.Audio, eRoutingPortConnectionType.Hdmi, null); -// } - -// void AddInCardHdmiLoopPort(uint number) -// { -// AddOutputPortWithDebug(number, "hdmiLoopOut", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, null); -// } - -// /// -// /// -// /// -// /// -// /// -// public void AddOutputCard(string type, uint number) -// { -// Debug.Console(2, this, "Adding output card '{0}', slot {1}", type, number); -// if (type == "dmc4kHdo") -// { -// var outputCard = new Dmc4kHdoSingle(number, Chassis); -// var cecPort1 = outputCard.Card1.HdmiOutput; -// var cecPort2 = outputCard.Card2.HdmiOutput; -// AddDmcHdoPorts(number, cecPort1, cecPort2); -// } -// else if (type == "dmcHdo") -// { -// var outputCard = new DmcHdoSingle(number, Chassis); -// var cecPort1 = outputCard.Card1.HdmiOutput; -// var cecPort2 = outputCard.Card2.HdmiOutput; -// AddDmcHdoPorts(number, cecPort1, cecPort2); -// } -// else if (type == "dmc4kCoHd") -// { -// var outputCard = new Dmc4kCoHdSingle(number, Chassis); -// var cecPort1 = outputCard.Card1.HdmiOutput; -// AddDmcCoPorts(number, cecPort1); -// } -// else if (type == "dmc4kzCoHd") -// { -// var outputCard = new Dmc4kzCoHdSingle(number, Chassis); -// var cecPort1 = outputCard.Card1.HdmiOutput; -// AddDmcCoPorts(number, cecPort1); -// } -// else if (type == "dmcCoHd") -// { -// var outputCard = new DmcCoHdSingle(number, Chassis); -// var cecPort1 = outputCard.Card1.HdmiOutput; -// AddDmcCoPorts(number, cecPort1); -// } -// else if (type == "dmCatoHd") -// { -// var outputCard = new DmcCatoHdSingle(number, Chassis); -// var cecPort1 = outputCard.Card1.HdmiOutput; -// AddDmcCoPorts(number, cecPort1); -// } -// else if (type == "dmcSoHd") -// { -// var outputCard = new DmcSoHdSingle(number, Chassis); -// var cecPort1 = outputCard.Card1.HdmiOutput; -// AddOutputPortWithDebug(number, "dmOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmMmFiber, 2 * (number - 1) + 1); -// AddOutputPortWithDebug(number, "hdmiOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, 2 * (number - 1) + 1, cecPort1); -// AddOutputPortWithDebug(number, "dmOut2", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmMmFiber, 2 * (number - 1) + 2); - -// } -// else if (type == "dmcS2oHd") -// { -// var outputCard = new DmcS2oHdSingle(number, Chassis); -// var cecPort1 = outputCard.Card1.HdmiOutput; -// AddOutputPortWithDebug(number, "dmOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmSmFiber, 2 * (number - 1) + 1); -// AddOutputPortWithDebug(number, "hdmiOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, 2 * (number - 1) + 1, cecPort1); -// AddOutputPortWithDebug(number, "dmOut2", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmSmFiber, 2 * (number - 1) + 2); -// } -// else if (type == "dmcStro") -// { -// var outputCard = new DmcStroSingle(number, Chassis); -// AddOutputPortWithDebug(number, "streamOut", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Streaming, 2 * (number - 1) + 1); -// } - -// else -// Debug.Console(1, this, " WARNING: Output card type '{0}' is not available", type); -// } - -// void AddDmcHdoPorts(uint number, ICec cecPort1, ICec cecPort2) -// { -// AddOutputPortWithDebug(number, "hdmiOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, 2 * (number - 1) + 1, cecPort1); -// AddOutputPortWithDebug(number, "audioOut1", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio, 2 * (number - 1) + 1); -// AddOutputPortWithDebug(number, "hdmiOut2", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, 2 * (number - 1) + 2, cecPort2); -// AddOutputPortWithDebug(number, "audioOut2", eRoutingSignalType.Audio, eRoutingPortConnectionType.LineAudio, 2 * (number - 1) + 2); -// } - -// void AddDmcCoPorts(uint number, ICec cecPort1) -// { -// AddOutputPortWithDebug(number, "dmOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmCat, 2 * (number - 1) + 1); -// AddOutputPortWithDebug(number, "hdmiOut1", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.Hdmi, 2 * (number - 1) + 1, cecPort1); -// AddOutputPortWithDebug(number, "dmOut2", eRoutingSignalType.Audio | eRoutingSignalType.Video, eRoutingPortConnectionType.DmCat, 2 * (number - 1) + 2); -// } - - -// /// -// /// Adds InputPort -// /// -// void AddInputPortWithDebug(uint cardNum, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType) -// { -// var portKey = string.Format("inputCard{0}--{1}", cardNum, portName); -// Debug.Console(2, this, "Adding input port '{0}'", portKey); -// var inputPort = new RoutingInputPort(portKey, sigType, portType, cardNum, this); - -// InputPorts.Add(inputPort); -// } - -// /// -// /// Adds InputPort and sets Port as ICec object -// /// -// void AddInputPortWithDebug(uint cardNum, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType, ICec cecPort) -// { -// var portKey = string.Format("inputCard{0}--{1}", cardNum, portName); -// Debug.Console(2, this, "Adding input port '{0}'", portKey); -// var inputPort = new RoutingInputPort(portKey, sigType, portType, cardNum, this); - -// if (cecPort != null) -// inputPort.Port = cecPort; - -// InputPorts.Add(inputPort); -// } - -// /// -// /// Adds OutputPort -// /// -// void AddOutputPortWithDebug(uint cardNum, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType, object selector) -// { -// var portKey = string.Format("outputCard{0}--{1}", cardNum, portName); -// Debug.Console(2, this, "Adding output port '{0}'", portKey); -// OutputPorts.Add(new RoutingOutputPort(portKey, sigType, portType, selector, this)); -// } - -// /// -// /// Adds OutputPort and sets Port as ICec object -// /// -// void AddOutputPortWithDebug(uint cardNum, string portName, eRoutingSignalType sigType, eRoutingPortConnectionType portType, object selector, ICec cecPort) -// { -// var portKey = string.Format("outputCard{0}--{1}", cardNum, portName); -// Debug.Console(2, this, "Adding output port '{0}'", portKey); -// var outputPort = new RoutingOutputPort(portKey, sigType, portType, selector, this); - -// if (cecPort != null) -// outputPort.Port = cecPort; - -// OutputPorts.Add(outputPort); -// } - -// /// -// /// -// /// -// void AddVolumeControl(uint number, Audio.Output audio) -// { -// VolumeControls.Add(number, new DmCardAudioOutputController(audio)); -// } - -// //public void SetInputHdcpSupport(uint input, ePdtHdcpSupport hdcpSetting) -// //{ - -// //} - - -// void Chassis_DMSystemChange(Switch device, DMSystemEventArgs args) { - -// } -// void Chassis_DMInputChange(Switch device, DMInputEventArgs args) { -// //Debug.Console(2, this, "DMSwitch:{0} Input:{1} Event:{2}'", this.Name, args.Number, args.EventId.ToString()); - -// switch (args.EventId) { -// case (DMInputEventIds.OnlineFeedbackEventId): { -// Debug.Console(2, this, "DMINput OnlineFeedbackEventId for input: {0}. State: {1}", args.Number, device.Inputs[args.Number].EndpointOnlineFeedback); -// InputEndpointOnlineFeedbacks[args.Number].FireUpdate(); -// break; -// } -// case (DMInputEventIds.VideoDetectedEventId): { -// Debug.Console(2, this, "DM Input {0} VideoDetectedEventId", args.Number); -// VideoInputSyncFeedbacks[args.Number].FireUpdate(); -// break; -// } -// case (DMInputEventIds.InputNameEventId): { -// Debug.Console(2, this, "DM Input {0} NameFeedbackEventId", args.Number); -// InputNameFeedbacks[args.Number].FireUpdate(); -// break; -// } -// } -// } -// /// -// ///
-// void Chassis_DMOutputChange(Switch device, DMOutputEventArgs args) -// { - -// //This should be a switch case JTA 2018-07-02 -// var output = args.Number; -// if (args.EventId == DMOutputEventIds.VolumeEventId && -// VolumeControls.ContainsKey(output)) -// { -// VolumeControls[args.Number].VolumeEventFromChassis(); -// } -// else if (args.EventId == DMOutputEventIds.OnlineFeedbackEventId) -// { -// OutputEndpointOnlineFeedbacks[output].FireUpdate(); -// } -// else if (args.EventId == DMOutputEventIds.VideoOutEventId) -// { -// if (Chassis.Outputs[output].VideoOutFeedback != null) -// { -// Debug.Console(2, this, "DMSwitchVideo:{0} Routed Input:{1} Output:{2}'", this.Name, Chassis.Outputs[output].VideoOutFeedback.Number, output); -// } -// if (VideoOutputFeedbacks.ContainsKey(output)) -// { -// VideoOutputFeedbacks[output].FireUpdate(); - -// } -// if (OutputVideoRouteNameFeedbacks.ContainsKey(output)) -// { -// OutputVideoRouteNameFeedbacks[output].FireUpdate(); -// } -// } -// else if (args.EventId == DMOutputEventIds.AudioOutEventId) -// { -// if (Chassis.Outputs[output].AudioOutFeedback != null) -// { -// Debug.Console(2, this, "DMSwitchAudio:{0} Routed Input:{1} Output:{2}'", this.Name, Chassis.Outputs[output].AudioOutFeedback.Number, output); -// } -// if (AudioOutputFeedbacks.ContainsKey(output)) -// { -// AudioOutputFeedbacks[output].FireUpdate(); -// } -// } -// else if (args.EventId == DMOutputEventIds.OutputNameEventId) -// { -// Debug.Console(2, this, "DM Output {0} NameFeedbackEventId", output); -// OutputNameFeedbacks[output].FireUpdate(); -// } - -// } - -// /// -// /// -// /// -// /// -// void StartOffTimer(PortNumberType pnt) -// { -// if (RouteOffTimers.ContainsKey(pnt)) -// return; -// RouteOffTimers[pnt] = new CTimer(o => -// { -// ExecuteSwitch(0, pnt.Number, pnt.Type); -// }, RouteOffTime); -// } - - -// // Send out sigs when coming online -// void IsOnline_OutputChange(object sender, EventArgs e) -// { -// if (IsOnline.BoolValue) -// { -// if (InputNames != null) -// foreach (var kvp in InputNames) -// Chassis.Inputs[kvp.Key].Name.StringValue = kvp.Value; -// if (OutputNames != null) -// foreach(var kvp in OutputNames) -// Chassis.Outputs[kvp.Key].Name.StringValue = kvp.Value; -// } -// } - -// #region IRouting Members - -// public void ExecuteSwitch(object inputSelector, object outputSelector, eRoutingSignalType sigType) -// { -// Debug.Console(2, this, "Making an awesome DM route from {0} to {1} {2}", inputSelector, outputSelector, sigType); - -// var input = Convert.ToUInt32(inputSelector); // Cast can sometimes fail -// var output = Convert.ToUInt32(outputSelector); -// // Check to see if there's an off timer waiting on this and if so, cancel -// var key = new PortNumberType(output, sigType); -// if (input == 0) -// { -// StartOffTimer(key); -// } -// else -// { -// if(RouteOffTimers.ContainsKey(key)) -// { -// Debug.Console(2, this, "{0} cancelling route off due to new source", output); -// RouteOffTimers[key].Stop(); -// RouteOffTimers.Remove(key); -// } -// } - -// Card.DMICard inCard = input == 0 ? null : Chassis.Inputs[input]; - -// // NOTE THAT THESE ARE NOTS - TO CATCH THE AudioVideo TYPE -// if (sigType != eRoutingSignalType.Audio) -// { -// Chassis.VideoEnter.BoolValue = true; -// Chassis.Outputs[output].VideoOut = inCard; -// } - -// if (sigType != eRoutingSignalType.Video) -// { -// Chassis.AudioEnter.BoolValue = true; -// Chassis.Outputs[output].AudioOut = inCard; -// } -// } - -// #endregion - -// } - -// //public struct PortNumberType -// //{ -// // public uint Number { get; private set; } -// // public eRoutingSignalType Type { get; private set; } - -// // public PortNumberType(uint number, eRoutingSignalType type) : this() -// // { -// // Number = number; -// // Type = type; -// // } -// //} -//} \ No newline at end of file diff --git a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Display/NecPaSeriesProjector.cs b/essentials-framework/Essentials Devices Common/Essentials Devices Common/Display/NecPaSeriesProjector.cs index 7888bace..34263818 100644 --- a/essentials-framework/Essentials Devices Common/Essentials Devices Common/Display/NecPaSeriesProjector.cs +++ b/essentials-framework/Essentials Devices Common/Essentials Devices Common/Display/NecPaSeriesProjector.cs @@ -218,26 +218,5 @@ namespace PepperDash.Essentials.Devices.Displays } - - #region INonStandardControls Members - - public Dictionary> GetNonStandardControls() - { - return new Dictionary> - { - { CommonBoolCue.PowerOn, o => PowerOn() }, - { CommonBoolCue.PowerOff, o => PowerOff() }, - { Cue.BoolCue("PictureMute", 0), o => - { - if((bool)o) - PictureMuteOn(); - else - PictureMuteOff(); } }, - { Cue.UShortCue("GetLampRemaining", 0), o => GetLampRemaining((int) o) }, - { Cue.StringCue("SelectInput", 0), o => SelectInput((String)o) } - }; - } - - #endregion } } \ No newline at end of file