Ejemplo n.º 1
0
 private void e_ToolStripMenuItemportSerie_Click(object sender, EventArgs e)
 {
     formParamSerie fPS = new formParamSerie(ref _serial);
     if (fPS.ShowDialog() == DialogResult.OK)
     {
         _serial = new classSerial(_serial._ParamSerial);
         m_serialConnect();
     }
 }
Ejemplo n.º 2
0
        private void e_ToolStripMenuItemportSerie_Click(object sender, EventArgs e)
        {
            formParamSerie fPS = new formParamSerie(ref _serial);

            if (fPS.ShowDialog() == DialogResult.OK)
            {
                _serial = new classSerial(_serial._ParamSerial);
                m_serialConnect();
            }
        }
Ejemplo n.º 3
0
 public formParamSerie(ref classSerial serial)
 {
     InitializeComponent();
     _serial = serial;
     cBPortName.Items.AddRange(SerialPort.GetPortNames());
     cBPortName.Text = _serial.PortName;
     cBBaudRate.Items.AddRange(new string[] { "2400", "9600", "14400", "19200", "38400", "57600", "115200" });
     cBBaudRate.Text = _serial._ParamSerial.BaudRate.ToString();
     cBDataBits.Items.AddRange(new string[] { "4", "5", "6", "7", "8" });
     cBDataBits.Text = _serial._ParamSerial.DataBits.ToString();
     cBParity.Items.AddRange(Enum.GetNames(typeof(Parity)));
     cBParity.Text = _serial._ParamSerial.Parity.ToString();
     cBStopBit.Items.AddRange(Enum.GetNames(typeof(StopBits)));
     cBStopBit.Text = _serial._ParamSerial.StopBit.ToString();
 }
Ejemplo n.º 4
0
 public formParamSerie(ref classSerial serial)
 {
     InitializeComponent();
     _serial = serial;
     cBPortName.Items.AddRange(SerialPort.GetPortNames());
     cBPortName.Text = _serial.PortName;
     cBBaudRate.Items.AddRange(new string[] { "2400", "9600", "14400", "19200", "38400", "57600", "115200" });
     cBBaudRate.Text = _serial._ParamSerial.BaudRate.ToString();
     cBDataBits.Items.AddRange(new string[] { "4", "5", "6", "7", "8" });
     cBDataBits.Text = _serial._ParamSerial.DataBits.ToString();
     cBParity.Items.AddRange(Enum.GetNames(typeof(Parity)));
     cBParity.Text = _serial._ParamSerial.Parity.ToString();
     cBStopBit.Items.AddRange(Enum.GetNames(typeof(StopBits)));
     cBStopBit.Text = _serial._ParamSerial.StopBit.ToString();
 }
Ejemplo n.º 5
0
        public formMain()
        {
            InitializeComponent();
            paramApplication.setFileName("parametres");

            _serial = new classSerial(paramApplication.LoadFromXML <classParamSerial> (new classParamSerial()));
            if (_serial._ParamSerial == null)
            {
                _serial = new classSerial(new classParamSerial
                {
                    PortName = "COM3",
                    BaudRate = 9600,
                    Parity   = System.IO.Ports.Parity.None,
                    DataBits = 8,
                    StopBit  = System.IO.Ports.StopBits.One
                });
            }
            ToolStripMenuItemportSerie.Enabled = true;
        }
Ejemplo n.º 6
0
        public formMain()
        {
            InitializeComponent();
            paramApplication.setFileName("parametres");

            _serial = new classSerial(paramApplication.LoadFromXML<classParamSerial> ( new classParamSerial()));
            if (_serial._ParamSerial == null)
            {
                _serial = new classSerial(new classParamSerial
                {
                    PortName = "COM3",
                    BaudRate = 9600,
                    Parity = System.IO.Ports.Parity.None,
                    DataBits = 8,
                    StopBit = System.IO.Ports.StopBits.One
                });
            }
            ToolStripMenuItemportSerie.Enabled = true;
        }