public SetupDialog(ElexolUSBData data) { InitializeComponent(); ForeColor = ThemeColorTable.ForeColor; BackColor = ThemeColorTable.BackgroundColor; ThemeUpdateControls.UpdateControls(this); _data = data; if (_data.PortName != null) { _serialPort = new SerialPort(_data.PortName, _data.BaudRate, _data.Parity, _data.DataBits, _data.StopBits); updateSettingLabel(); } else { lblSettings.Text = "Not Set"; buttonOK.Enabled = false; } if (_data.MinimumIntensity > 0) { _minIntensity = _data.MinimumIntensity; } sliderMinIntensity.Value = _minIntensity; lblMinIntensity.Text = _minIntensity.ToString(); }
public SetupDialog(ElexolUSBData data) { InitializeComponent(); _data = data; if (_data.PortName != null) { _serialPort = new SerialPort(_data.PortName, _data.BaudRate, _data.Parity, _data.DataBits, _data.StopBits); updateSettingLabel(); } else { lblSettings.Text = "Not Set"; buttonOK.Enabled = false; } if (_data.MinimumIntensity > 0) { _minIntensity = _data.MinimumIntensity; } sliderMinIntensity.Value = _minIntensity; lblMinIntensity.Text = _minIntensity.ToString(); }