예제 #1
0
        private void button7_Click(object sender, EventArgs e)
        {
            try
            {
                NewSerialPortSetting setting = (NewSerialPortSetting)DataAction.SaveStatic.ReadBinF(Parent.Text);
                ANDserial = new NewSerialPort(setting._port, setting._baudrate, setting._parity, setting._databit, setting._stopbit);

                ANDserial.Open();
                if (ANDserial.IsOpen)
                {
                    this.BackColor = Color.LightGreen;
                }
            }
            catch { }
        }
예제 #2
0
 public ANDweigh(NewSerialPort serialport)
 {
     InitializeComponent();
     ANDserial = serialport;
     Name      = ANDserial.Name;
 }