using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO.Ports;
namespace 串口调试助手
{
publicpartialclass Form1 : Form
{
publicForm1()
{
InitializeComponent();
System.Windows.Forms.Control.CheckForIllegalCrossThreadCalls = false;
}
privatevoidForm1_Load(object sender, EventArgs e)
{
for (int i = 0; i < 10; i++)
{
comboBox1.Items.Add("COM" + i.ToString());
}
comboBox1.Text = "COM1";//串口号默认值
comboBox2.Text = "4800";//波特率默认值/***************非常重要*****************/
serialPort1.DataReceived &