Esempio n. 1
0
 public void Wake()
 {
     if (SystemReservedSigs != null)
     {
         SystemReservedSigs.BacklightOn();
     }
 }
Esempio n. 2
0
 public void Sleep()
 {
     if (SystemReservedSigs != null)
     {
         SystemReservedSigs.BacklightOff();
     }
 }
Esempio n. 3
0
        public UIController(uint id, BasicTriList device)
        {
            ID     = id;
            Device = device;

            if (Device != null)
            {
                _pages = new UIPageCollection(this);

                CrestronConsole.PrintLine("Registering UI Device \'{0}\'", device.GetType().ToString());
                CrestronConsole.PrintLine("UI Device \'{0}\' parent is {1}", device.GetType().Name, device.Parent.GetType().Name);

                if (device is TswFt5ButtonSystem)
                {
                    CrestronConsole.PrintLine("UI Device is TswFt5ButtonSystem device");
                    TswFt5ButtonSystem panelDevice = device as TswFt5ButtonSystem;
                    SystemReservedSigs = panelDevice.ExtenderSystemReservedSigs;
                    SystemReservedSigs.Use();
                }

                var x60Device = device as TswX60BaseClass;
                if (x60Device != null)
                {
                    x60Device.ExtenderHardButtonReservedSigs.Use();
                }

                try
                {
                    Device.IpInformationChange += new IpInformationChangeEventHandler(Device_IpInformationChange);
                }
                catch
                {
                    // Probably not an Ethernet device
                }

                Device.OnlineStatusChange += new OnlineStatusChangeEventHandler(DeviceOnlineStatusChanged);

                if (Device.Parent is CrestronControlSystem && Device.Register() != eDeviceRegistrationUnRegistrationResponse.Success)
                {
                    ErrorLog.Error("Could not register User Interface device with ID: {0}, ipID: {1}", ID, Device.ID);
                }

                device.SigChange += DeviceOnSigChange;
            }
            else
            {
                ErrorLog.Error("Cannot register User Interface device with ID: {0} as device is null", ID);
            }
        }