public RefreshSettings(MainWindow handle) { this.handle = handle; InitializeComponent(); updateGui(); }
public AddNewDevice(MainWindow handle, AddNewDeviceType deviceType, int deviceId) { InitializeComponent(); this.handle = handle; this.deviceType = deviceType; string name = "Root"; device = DeviceList.getDevice(deviceId); if (device != null) name = device.DeviceName; switch (deviceType) { case AddNewDeviceType.PEER: device = DeviceList.getDevice(deviceId); addDeviceButton.Content = "Add Device"; instructionBox.Content = "Add new Peer device to " + name; break; case AddNewDeviceType.SLAVE: device = DeviceList.getDevice(deviceId); addDeviceButton.Content = "Add Device"; instructionBox.Content = "Add new Peer slave to " + name; break; case AddNewDeviceType.EDIT: device = DeviceList.getDevice(deviceId); addDeviceButton.Content = "Edit Device"; instructionBox.Content = "Edit device "+ name ; ipAddress.Text = device.DomainName; deviceName.Text = device.DeviceName; break; } }