예제 #1
0
        private void OnDeviceConnect(object sender, RoutedEventArgs e)
        {
            string deviceIdString = (string)DeviceListBox.SelectedItem;

            _deviceTwin = new DeviceTwinAndMethod(ConnectionStringBox.Text, deviceIdString);
            ConnectedProperties.IsEnabled = true;
        }
        private void OnDeviceSelected(object sender, SelectionChangedEventArgs e)
        {
            string deviceIdString = (string)DeviceListBox.SelectedItem;

            ConnectedProperties.IsEnabled = false;
            if (!String.IsNullOrEmpty(deviceIdString))
            {
                _deviceTwin = new DeviceTwinAndMethod(ConnectionStringBox.Text, deviceIdString);
                ConnectedProperties.IsEnabled = true;
            }
            SelectedDeviceName.Text = deviceIdString;
        }
        private void OnDeviceSelected(object sender, SelectionChangedEventArgs e)
        {
            string deviceIdString = (string)DeviceListBox.SelectedItem;

            ConnectedProperties.IsEnabled = false;
            if (!String.IsNullOrEmpty(deviceIdString))
            {
                _deviceTwin = new DeviceTwinAndMethod(ConnectionStringBox.Text, deviceIdString);
                ConnectedProperties.IsEnabled = true;
            }
            SelectedDeviceName.Text = deviceIdString;

            // ToDo: There should be an easy mechanism to enumerate all sub-controls and clear them all
            //       (or populate them with information from the device twin).
            //
            TheAppsStatus.Clear();
            TheAppsConfigurator.Clear();
        }