/// <summary> /// Update serial port settings /// </summary> private void UpdateSettings() { SerialSettings.PortSpeedReset = int.Parse(settingsdialog_UI.CmbPortSpeedReset.CurrentText); SerialSettings.PortSpeed = int.Parse(settingsdialog_UI.CmbPortSpeed.CurrentText); SerialSettings.DataBits = int.Parse(settingsdialog_UI.CmbDataBits.CurrentText); SerialSettings.StopBits = int.Parse(settingsdialog_UI.CmbStopBits.CurrentText); SerialSettings.Parity = settingsdialog_UI.CmbParity.CurrentText; if (settingsdialog_UI.CmbConvention.CurrentText == "Direct") { SerialSettings.IsDirectConvention = true; } else { SerialSettings.IsDirectConvention = false; } GlobalObj.WriteSettings(); }
/// <summary> /// Update serial port settings /// </summary> private void UpdateSettings() { SerialSettings.PortSpeedReset = int.Parse(CmbPortSpeedReset.ActiveText); SerialSettings.PortSpeed = int.Parse(CmbPortSpeed.ActiveText); SerialSettings.DataBits = int.Parse(CmbDataBits.ActiveText); SerialSettings.StopBits = int.Parse(CmbStopBits.ActiveText); SerialSettings.Parity = CmbParity.ActiveText; if (CmbConvention.ActiveText == "Direct") { SerialSettings.IsDirectConvention = true; } else { SerialSettings.IsDirectConvention = false; } GlobalObj.WriteSettings(); }