private void DeviceManagerForm_Closing(object sender, System.ComponentModel.CancelEventArgs e) { foreach (IpSelect device in FoundDeviceList.Items) { if (device != null && device.IsSelected == true) { MonchaHub.Devices.Add(MonchaHub.ConnectDevice(device.iPAddress)); } } foreach (IpSelect device in MonchaDeviceList.Items) { if (device != null && device.IsSelected == false) { MonchaHub.RemoveDevice(device.iPAddress); } } MonchaHub.RefreshDevice(); }
private void RemoveLaser_Click(object sender, RoutedEventArgs e) => MonchaHub.RemoveDevice(selectdevice);