Ejemplo n.º 1
0
        public void Setup()
        {
            SetupDialog dialog = new SetupDialog(this.m_selectedPort, this.m_version);

            if (dialog.ShowDialog() == DialogResult.OK)
            {
                this.m_version = dialog.Version;
                this.m_setupData.SetInteger(this.m_setupNode, "Version", this.m_version);
                this.m_selectedPort = dialog.SelectedPort;
                this.m_setupData.SetString(this.m_setupNode, "name", this.m_selectedPort.PortName);
                this.m_setupData.SetInteger(this.m_setupNode, "baud", this.m_selectedPort.BaudRate);
                this.m_setupData.SetString(this.m_setupNode, "parity", this.m_selectedPort.Parity.ToString());
                this.m_setupData.SetInteger(this.m_setupNode, "data", this.m_selectedPort.DataBits);
                this.m_setupData.SetString(this.m_setupNode, "stop", this.m_selectedPort.StopBits.ToString());
            }
        }
Ejemplo n.º 2
0
 public void Setup()
 {
     SetupDialog dialog = new SetupDialog(this.m_selectedPort, this.m_version);
     if (dialog.ShowDialog() == DialogResult.OK)
     {
         this.m_version = dialog.Version;
         this.m_setupData.SetInteger(this.m_setupNode, "Version", this.m_version);
         this.m_selectedPort = dialog.SelectedPort;
         this.m_setupData.SetString(this.m_setupNode, "name", this.m_selectedPort.PortName);
         this.m_setupData.SetInteger(this.m_setupNode, "baud", this.m_selectedPort.BaudRate);
         this.m_setupData.SetString(this.m_setupNode, "parity", this.m_selectedPort.Parity.ToString());
         this.m_setupData.SetInteger(this.m_setupNode, "data", this.m_selectedPort.DataBits);
         this.m_setupData.SetString(this.m_setupNode, "stop", this.m_selectedPort.StopBits.ToString());
     }
 }