コード例 #1
0
        private async void Button_Click_4(object sender, RoutedEventArgs e)
        {
            await SampleDataService.CreateSampleHome("Cork Institute of Technology");

            await SampleDataService.CreateSampleRoom("B176");

            await SampleDataService.CreateSampleDevice("Lamp 1", "http://192.168.1.4/api/xUMVgvrOq4iYOU5qYMxooC04fRPApMWRMcYSvPvC/lights/2");

            await SampleDataService.CreateSampleDevice("Lamp 2", "http://192.168.1.4/api/xUMVgvrOq4iYOU5qYMxooC04fRPApMWRMcYSvPvC/lights/3");

            await SampleDataService.CreateSampleRoom("B174");
        }
コード例 #2
0
        private async void Button_Click(object sender, RoutedEventArgs e)
        {
            await SampleDataService.CreateSampleHome();

            await SampleDataService.CreateSampleRoom("Living Room");

            //await SampleDataService.CreateSampleDevice("Ceiling Light", "2");
            await SampleDataService.CreateSampleDevice("Ceiling Light", "http://192.168.1.4/api/xUMVgvrOq4iYOU5qYMxooC04fRPApMWRMcYSvPvC/lights/2");

            await SampleDataService.CreateSampleRoom("Kitchen");

            //await SampleDataService.CreateSampleDevice("Ceiling Light", "6");
            await SampleDataService.CreateSampleDevice("Ceiling Light", "http://192.168.1.4/api/xUMVgvrOq4iYOU5qYMxooC04fRPApMWRMcYSvPvC/lights/3");

            await SampleDataService.CreateSampleRoom("Hall");

            //await SampleDataService.CreateSampleDevice("Ceiling Light 1", "6");
            await SampleDataService.CreateSampleDevice("Ceiling Light 1", "http://192.168.1.4/api/xUMVgvrOq4iYOU5qYMxooC04fRPApMWRMcYSvPvC/lights/6");

            //await SampleDataService.CreateSampleDevice("Ceiling Light 2", "4");
            await SampleDataService.CreateSampleDevice("Ceiling Light 2", "http://192.168.1.4/api/xUMVgvrOq4iYOU5qYMxooC04fRPApMWRMcYSvPvC/lights/4");

            await SampleDataService.CreateSampleRoom("Bedroom");

            //await SampleDataService.CreateSampleDevice("Ceiling Light", "5");
            await SampleDataService.CreateSampleDevice("Ceiling Light", "http://192.168.1.4/api/xUMVgvrOq4iYOU5qYMxooC04fRPApMWRMcYSvPvC/lights/5");

            //await SampleDataService.CreateSampleDevice("Ceiling Light 1", "6");
            await SampleDataService.CreateSampleDevice("Bedside Lamp", "http://192.168.1.4/api/xUMVgvrOq4iYOU5qYMxooC04fRPApMWRMcYSvPvC/lights/6");

            await SampleDataService.CreateSampleDevice("Lamp", "http://192.168.1.4/api/xUMVgvrOq4iYOU5qYMxooC04fRPApMWRMcYSvPvC/lights/10");

            await SampleDataService.CreateSampleRoom("Bathroom");

            //await SampleDataService.CreateSampleDevice("Ceiling Light", "7");
            await SampleDataService.CreateSampleDevice("Ceiling Light", "http://192.168.1.4/api/xUMVgvrOq4iYOU5qYMxooC04fRPApMWRMcYSvPvC/lights/7");

            await SampleDataService.CreateSampleRoom("Office");

            //await SampleDataService.CreateSampleDevice("Ceiling Light", "2");
            await SampleDataService.CreateSampleDevice("Ceiling Light", "http://192.168.1.4/api/xUMVgvrOq4iYOU5qYMxooC04fRPApMWRMcYSvPvC/lights/1");

            Initalise();
            var messageDialog = new MessageDialog("Sample data has been loaded.");
            await messageDialog.ShowAsync();
        }