コード例 #1
0
 private void textBox1_KeyUp(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         DBExchange.AddLine(textBox1.Text, false);
     }
 }
コード例 #2
0
 public void Read()
 {
     while (Continue && RS232.IsOpen)
     {
         try
         {
             RecievedData = RS232.ReadLine();
             //DBExchange.AddLine(RecievedData, true);
             //MainForm.textBox.Invoke(new Action(() => { DBExchange.AddLine(RecievedData, true); }));
             MainForm.listBox.Invoke(new Action(() => { DBExchange.AddLine(RecievedData, true); DBExchange.LoadTable(); }));
         }
         catch (TimeoutException) {  }
     }
     RS232port.RS232.Close();
 }
コード例 #3
0
 private void button1_Click(object sender, EventArgs e)
 {
     DBExchange.AddLine(textBox1.Text, false);
 }