Exemplo n.º 1
0
        public static Room GetDemoRoom()
        {
            var room = new HomeMaticRoom("Living room", 0, new List<int>());
            room.Devices = new List<Device>
                {
                    new HomeMaticDevice("Testdevice 1", 0, "")
                    {
                        Channels = new List<HomeMaticChannel>
                        {
                            new Switcher("Testswitcher", 1, 1, "", true, null)
                        }
                    },

                    new HomeMaticDevice("Testdevice 2", 0, "")
                    {
                        Channels = new List<HomeMaticChannel>
                        {
                            new Shutter("Testshutter", 1, 1, "", true, null)
                        }
                    },

                    new HomeMaticDevice("Testdevice 3", 0, "")
                    {
                        Channels = new List<HomeMaticChannel>
                        {
                            new TemperatureSlider("Testslider", 1, 1, "", true, null)
                        }
                    }
                };
            return room;
        }
Exemplo n.º 2
0
        private void LoadDemoData()
        {
            var livingRoom = new HomeMaticRoom("Wohnzimmer", new Uri("ms-appx:///Assets/Header/House.jpg"), 1);
            var lightSwitch = new HomeMaticDevice("Light Switch", 0, "", new List<HomeMaticChannel> {new Switcher("Lamp", 12, 0, "")});
            livingRoom.Devices.Add(lightSwitch);

            RoomList.Add(livingRoom);
            RoomList.Add(new HomeMaticRoom("Küche", new Uri("ms-appx:///Assets/Header/House.jpg"), 1));
            RoomList.Add(new HomeMaticRoom("Bad", new Uri("ms-appx:///Assets/Header/House.jpg"), 1));
            RoomList.Add(new HomeMaticRoom("Schlafzimmer", new Uri("ms-appx:///Assets/Header/House.jpg"), 1));
            RoomList.Add(new HomeMaticRoom("Flur", new Uri("ms-appx:///Assets/Header/House.jpg"), 1));
        }