Esempio n. 1
0
        /*private void timer1_Elapsed(object sender, ElapsedEventArgs e)
         * {
         *  string[] a = _comPort.Split(_comPort.getData());
         *
         *  string b = null;
         *  _dbClass.Insert("new2", a, c);
         *  foreach (var i in a)
         *  {
         *      b += i + " | ";
         *  }
         *
         *  b = null;
         *  x = _dbClass.Select("new2");
         *
         *  dataGridView1.Rows.Clear();
         *  dataGridView1.Rows.Add(a);
         *  dataGridView1.Refresh();
         * }*/

        private void timer2_Elapsed(object sender, ElapsedEventArgs e)
        {
            if (_comPort.BufferSize() != 0)
            {
                string[] a = _comPort.Split(_comPort.getData());
                _dbClass.Insert("new2", a, c);
                dataGridView2.Rows.Clear();
                dataGridView2.Rows.Add(a);
                dataGridView2.Refresh();

                dataGridView1.Rows.Add(a);
                dataGridView1.Refresh();

                _comPort.InBuffClear();
                _comPort.OutBuffClear();
            }

            //x = _dbClass.Select("new2");
        }