OpenFileDialog op = new OpenFileDialog(); op.InitialDirectory = @"c:\"; op.RestoreDirectory = true; op.Filter = "文本文件(*.txt)|*.txt|所有文件(*.*)|*.*"; if (op.ShowDialog() == DialogResult.OK) { string aa = op.FileName; StreamReader sr = new StreamReader(@aa); string duqu; duqu = sr.ReadLine(); richTextBox3.Text = duqu; }
c# RS232结合OpenFileDialog串口传输文件
最新推荐文章于 2025-03-08 14:24:33 发布