Exemple #1
0
        private void LoadConfig()
        {
            bal.ConfigLer();

            cmbModelo.SetSelectedValue(bal.Config.Modelo);
            cmbPorta.Text = bal.Config.Porta;
            cmbBaud.SetSelectedValue(bal.Config.Device.Baud);
            cmbDatabits.SetSelectedValue(bal.Config.Device.Data);
            cmbParity.SetSelectedValue(bal.Config.Device.Parity);
            cmbStopbits.SetSelectedValue(bal.Config.Device.Stop);
            cmbHandshaking.SetSelectedValue(bal.Config.Device.HandShake);
            nudMaxBand.Value    = bal.Config.Device.MaxBandwidth;
            nudBytesCount.Value = bal.Config.Device.SendBytesCount;
            nudIntervalo.Value  = bal.Config.Device.SendBytesInterval;
            chkSoftFlow.Checked = bal.Config.Device.SoftFlow;
            chkHardFlow.Checked = bal.Config.Device.HardFlow;
        }
        private void LoadConfig()
        {
            bal.ConfigLer();

            cmbModelo.SetSelectedValue(bal.ConfigLerValor <ACBrBALModelo>(ACBrSessao.BAL, "Modelo"));
            cmbPorta.Text               = bal.ConfigLerValor <string>(ACBrSessao.BAL, "Porta");
            cmbBaud.SelectedItem        = bal.ConfigLerValor <int>(ACBrSessao.BAL_Device, "Baud");
            cmbDatabits.SelectedItem    = bal.ConfigLerValor <int>(ACBrSessao.BAL_Device, "Data");
            cmbParity.SelectedItem      = bal.ConfigLerValor <SerialParity>(ACBrSessao.BAL_Device, "Parity");
            cmbStopbits.SelectedItem    = bal.ConfigLerValor <SerialStopBytes>(ACBrSessao.BAL_Device, "Stop");
            cmbHandshaking.SelectedItem = bal.ConfigLerValor <SerialHandShake>(ACBrSessao.BAL_Device, "HandShake");
            nudMaxBand.Value            = bal.ConfigLerValor <decimal>(ACBrSessao.BAL_Device, "MaxBandwidth");
            nudBytesCount.Value         = bal.ConfigLerValor <decimal>(ACBrSessao.BAL_Device, "SendBytesCount");
            nudIntervalo.Value          = bal.ConfigLerValor <decimal>(ACBrSessao.BAL_Device, "SendBytesInterval");
            chkSoftFlow.Checked         = bal.ConfigLerValor <bool>(ACBrSessao.BAL_Device, "SoftFlow");
            chkHardFlow.Checked         = bal.ConfigLerValor <bool>(ACBrSessao.BAL_Device, "HardFlow");
        }