Exemple #1
0
        public Provider(int index, NodeService nodeService)
        {
            Index            = index;
            this.nodeService = nodeService;

            power = new Udp2LightProperties.Power();
            power.ChangeRequested += OnChangeRequested;

            color = new Udp2LightProperties.Color();
            color.ChangeRequested += OnChangeRequested;

            mode = new Udp2LightProperties.Mode();
            mode.ChangeRequested += OnChangeRequested;

            brightness = new Udp2LightProperties.Brightness();
            brightness.ChangeRequested += OnChangeRequested;

            colorTemp = new Udp2LightProperties.ColorTemp();
            colorTemp.ChangeRequested += OnChangeRequested;

            scene = new Udp2LightProperties.Scene();
            scene.ChangeRequested += OnChangeRequested;

            properties = new LightProperty[] { power, color, mode, brightness, colorTemp, scene };
        }
Exemple #2
0
        public Provider(int index, Client udpClient)
        {
            Index  = index;
            client = udpClient;

            power = new Udp2LightProperties.Power();
            power.ChangeRequested += OnChangeRequested;

            color = new Udp2LightProperties.Color();
            color.ChangeRequested += OnChangeRequested;

            mode = new Udp2LightProperties.Mode();
            mode.ChangeRequested += OnChangeRequested;

            brightness = new Udp2LightProperties.Brightness();
            brightness.ChangeRequested += OnChangeRequested;

            colorTemp = new Udp2LightProperties.ColorTemp();
            colorTemp.ChangeRequested += OnChangeRequested;

            scene = new Udp2LightProperties.Scene();
            scene.ChangeRequested += OnChangeRequested;

            properties = new LightProperty[] { power, color, mode, brightness, colorTemp, scene };
        }