예제 #1
0
        private void button3_Click(object sender, EventArgs e)
        {
            //int a = Hexstr2Int(textBox1.Text);
            if (ws1 != null)
            {
                ws1.StopDevice();
            }
            string com = comboBox1.SelectedItem.ToString();
            string bdr = comboBox2.SelectedItem.ToString();

            ws1         = new Hardware.WindSensor1(com, Convert.ToInt32(bdr));
            ws1.Address = (byte)Hexstr2Int(textBox1.Text);
            ws1.Tag     = new object[] { com, bdr };
            if (sender == null && e == null)
            {
                return;
            }
            this.Close();
        }
예제 #2
0
 public Form2(ref WindSensor1 w)
 {
     InitializeComponent();
     ws1 = w;
 }