private void btnSetting_Click(object sender, RoutedEventArgs e)
        {
            DeviceViewModel device = ((Button)sender).DataContext as DeviceViewModel;

            new DeviceConfigOne {
                DeviceViewModel = device
            }.ShowDialog();
        }
        private void btnATest_Click(object sender, RoutedEventArgs e)
        {
            DeviceViewModel device = ((Button)sender).DataContext as DeviceViewModel;

            new DeviceMethodCaller {
                DeviceViewModel = device
            }.Show();
        }
        private void cbbDeviceTypes_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            DeviceViewModel device = ((ComboBox)sender).DataContext as DeviceViewModel;

            if (device.Device != null)
            {
                device.Device.Close();
                device.Device = null;
            }
            device.Device = (((ComboBox)sender).SelectedItem as DeviceTypeInfo).CreateDevice();
        }