/// <summary> /// /// </summary> /// <param name="name"></param> /// <returns></returns> private dataAccess.Entity.transport loadTransportDetails(string name) { dataAccess.Entity.transport instTransport = transportDAC.getTransport(name); if (instTransport != null) { this.txttransportCode.Text = instTransport.transportName; this.cmbTransportType.SelectedText = instTransport.transportType; this.txtBaudRate.Text = instTransport.baudRate.ToString(); this.txtCommPort.Text = instTransport.commPort; this.txtDataBits.Text = instTransport.dataBits.ToString(); this.txtReadTimeout.Text = instTransport.readTimeOut.ToString(); this.txtWriteTimeout.Text = instTransport.writeTimeOut.ToString(); this.cmbParity.SelectedValue = (int)instTransport.parity; this.cmbDirection.SelectedValue = (int)instTransport.direction; this.cmbDTREnabled.SelectedValue = instTransport.dtrEnable ? 1 : 0; this.cmbHandShake.SelectedValue = (int)instTransport.handShake; this.cmbRTSEnabled.SelectedValue = instTransport.rtsEnable ? 1 : 0; this.cmbStopBits.SelectedValue = (int)instTransport.stopBits; } else { this.initialiseInputControls(); } return(instTransport); }
/// <summary> /// /// </summary> /// <param name="operationType"></param> public transportSettings(operationPermission operationType, string modemName, string headertext) { this.operationPerissions = operationType; InitializeComponent(); this.initialiseInputControls(); this.lblHeader.Text = headertext; this.instOldValues = this.loadTransportDetails(modemName); }
/// <summary> /// /// </summary> /// <param name="instTransport"></param> /// <returns></returns> public static modemSettings parse(dataAccess.Entity.transport instTransport) { modemSettings instModemSettings = null; instModemSettings = new modemSettings(instTransport.commPort , instTransport.baudRate , instTransport.parity , instTransport.dataBits , instTransport.stopBits , instTransport.handShake , instTransport.readTimeOut , instTransport.writeTimeOut , instTransport.readTimeOut , instTransport.writeTimeOut , instTransport.dtrEnable , instTransport.rtsEnable , (consts.modemDirection)instTransport.direction); return(instModemSettings); }