public void InitializeTouchPanels(LightDeviceSettings deviceSettings) { foreach (TouchPanelDeviceInformation touchpanel in deviceSettings.touchpanels) { Assembly myAssembly = Assembly.LoadFrom(@"Crestron.SimplSharpPro.EthernetCommunications.dll"); CType myType = myAssembly.GetType("Crestron.SimplSharpPro.EthernetCommunication." + touchpanel.type); var ipid = SettingsManager.ConvertStringNumberToInt(touchpanel.ipid); var id = SettingsManager.ConvertStringNumberToInt(touchpanel.id); ConstructorInfo ctor = myType.GetConstructor(new CType[] { typeof(UInt32), typeof(string), typeof(ControlSystem) }); object myInstance = ctor.Invoke(new object[] { (UInt32)ipid, "127.0.0.2", this._system }); var touchPanelView = new TouchPanelView((BasicTriList)myInstance); var touchPanel1 = new TouchPanelPresenter(touchPanelView, _roomManager, _sceneManager); _touchPanelManager.AddTouchPanel(touchPanel1); } }
public void AddTouchPanel(TouchPanelPresenter panel) { this._touchPanels.Add(panel); }