社区
C#
帖子详情
求C#编写串口调试助手的源代码,
f1254724803
2012-05-08 08:08:07
[b][b]求C#编写串口调试助手的源代码,
怎么用求C#编写串口调试助手啊???
求助!!求助!!
...全文
1761
14
打赏
收藏
求C#编写串口调试助手的源代码,
[b][b]求C#编写串口调试助手的源代码, 怎么用求C#编写串口调试助手啊??? 求助!!求助!!
复制链接
扫一扫
分享
转发到动态
举报
AI
作业
写回复
配置赞助广告
用AI写文章
14 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
吴垡址
2014-08-09
打赏
举报
回复
请教,文件传送代码
haiyu柠檬
2014-08-01
打赏
举报
回复
http://blog.csdn.net/blue___ocean/article/details/38318571你看看这个
快乐水儿
2014-05-21
打赏
举报
回复
引用 6 楼 u011300564 的回复:
请问能把这个串口助手(含源码)发我看看吗?我的邮箱是2939932647@qq.com 谢谢
快乐水儿
2014-05-21
打赏
举报
回复
请问能把小串口的源码发我看看吗?
九溪弥烟、
2013-09-10
打赏
举报
回复
http://bbs.elecfans.com/jishu_367183_1_1.html
兔子-顾问
2013-07-07
打赏
举报
回复
C# 串口操作系列(1) -- 入门篇,一个标准的,简陋的串口例子。
xihagahei
2013-07-07
打赏
举报
回复
xihagahei
2013-07-07
打赏
举报
回复
xihagahei
2013-07-07
打赏
举报
回复
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; using System.Threading; namespace WindowsFormsApplication10 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } public delegate void Displaydelegate(); byte[] duqu; public void jieshou_Shuju() { if (p == 1) { if (openFileDialog1.FileName.Split('.')[1] == "jpg") { duqu = new byte[serialPort1.BytesToRead]; serialPort1.Read(duqu, 0, duqu.Length); MemoryStream asdfgh = new MemoryStream(duqu); try { pictureBox1.Image = ((Image)new Bitmap(asdfgh)); } catch (Exception) { }; } // =ttt; Image ttt // string s1 = System.Text.Encoding.GetEncoding("GB2312").GetString(duqu); // richTextBox1.Text = s1; if (openFileDialog1.FileName.Split('.')[1] == "txt") { richTextBox1.Text += serialPort1.ReadLine(s1) + "\r\n"; } } else if(p==0) { richTextBox1.Text += serialPort1.ReadLine() + "\r\n"; } //pictureBox1.Image = serialPort1.(); } private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) { } private void Form1_Load(object sender, EventArgs e) { comboBox1.SelectedIndex = 0; comboBox2.SelectedIndex = 7; comboBox3.SelectedIndex = 3; comboBox4.SelectedIndex = 0; // button5.Click += new EventHandler(button5_Click); // serialPort1.DataReceived += new System.IO.Ports.SerialDataReceivedEventHandler(yyy); } // void yyy(object sender, System.IO.Ports.SerialDataReceivedEventArgs e) // { // } // OpenFileDialog frm = new OpenFileDialog(); // void button5_Click(object sender, EventArgs e) // { // MessageBox.Show(""); // } // private string[] strs; // List<string> strs1; private void button1_Click(object sender, EventArgs e) { // string str = folderBrowserDialog1.SelectedPath; // strs = System.IO.Directory.GetFiles(str); // string str = fileSystemWatcher1.Filter; // this.openFileDialog1.Title = "打开对话框"; this .openFileDialog1 .Filter="Images(*.BMP;*.JPG;*.GIF)|*.BMP;*.JPG;*.GIF|text fils(*.txt)|*.txt"; this .openFileDialog1 .ShowDialog(); textBox1.Text =fileSystemWatcher1.Path; textBox1.Text = openFileDialog1.FileName; } int i = 1; private void button4_Click(object sender, EventArgs e) { //serialPort1.StopBits = System.IO.Ports.StopBits.One; if (i == 1) { serialPort1.PortName = comboBox1.Text; serialPort1.BaudRate = Convert.ToInt32(comboBox2.Text); serialPort1.DataBits = Convert.ToInt32(comboBox3.Text); button4.Text = "关闭串口"; serialPort1.Open(); i = 0; } else if (i == 0) { button4.Text = "打开串口"; serialPort1.Close(); i = 1; } } int p;//p作为一个开关来用 //string s1; // byte[] reads; private void button2_Click(object sender, EventArgs e) { if (serialPort1.IsOpen) { FileStream fs = File.Open(openFileDialog1.FileName, FileMode.Open); byte[] reads = new byte[fs.Length]; fs.Read(reads, 0, reads.Length); fs.Close(); // string s1 = System.Text.Encoding.GetEncoding("GB2312").GetString(reads); if (openFileDialog1.FileName .Split('.')[1] == "txt") { string s1 = System.Text.Encoding.Default.GetString(reads); serialPort1.WriteLine(s1); // richTextBox1.Text += s1+"\r\n"; p = 1; } // MemoryStream ee = new MemoryStream(reads); // Image ttt = ((Image)new Bitmap(ee)); // pictureBox1.Image=ttt; if (openFileDialog1.FileName.Split('.')[1] == "jpg") { serialPort1.Write(reads, 0, reads.Length); p = 1; } else { p = 0; } // // pictureBox1.Image =serialPort1.ReadLine(); // serialPort1.WriteLine() // Image tt = Image.FromStream(ee); // string s2 = ((string)new Bitmap(ttt)); // serialPort1.Write(reads,0,reads.Length); // richTextBox1.Text += serialPort1.ReadByte(); } } private void button7_Click(object sender, EventArgs e) { // serialPort1.RtsEnable = true; if (serialPort1.IsOpen) { serialPort1.WriteLine(textBox3.Text); } } private void button3_Click(object sender, EventArgs e) { // serialPort1.RtsEnable = false ; } private void button6_Click(object sender, EventArgs e) { richTextBox1.Text = ""; } private void serialPort1_DataReceived(object sender, System.IO.Ports.SerialDataReceivedEventArgs e) { richTextBox1.Invoke(new Displaydelegate(jieshou_Shuju), new object[] { }); } private void checkBox1_CheckedChanged(object sender, EventArgs e) { timer1.Interval =Convert.ToInt32( textBox2.Text); timer1.Enabled = true; serialPort1.WriteLine ( textBox3.Text); } } }
mizuho_2006
2012-05-11
打赏
举报
回复
就是串口读数和取数而已。
doubleu2005
2012-05-11
打赏
举报
回复
自己写一个吧,没有多难
f1254724803
2012-05-11
打赏
举报
回复
没有啊,有也是C的,没有C#的啊
缭绕飘渺
2012-05-08
打赏
举报
回复
无聊
网上大把的例子
C#
串口调试助手
源码.rar_
C#
串口调试助手
源码_串口助手_串口助手 C_串口助手源码_
串口调试助手
C
基于
C#
的
串口调试助手
源码,供大家学习参考,也当自己备份!
C#
串口调试助手
开放
源代码
C#
做的
串口调试助手
,实现一般
串口调试助手
的常用功能。用于是开放
源代码
的,对不满意的部分可以按自己需要进行修改。 内有一套皮肤控件并用皮肤控件的大致用法。 小特性:用户在指定时间为对程序作出任何反应,程序自动最小化到任务栏。
C#
串口调试
源代码
,调试助手
串口调试助手
C#
代码,
串口调试助手
C#
代码,
C#
串口调试助手
源码程序
C#
串口调试助手
,工程源码程序,VS2017版本,包括打包程序
C#
串口调试工具源码,
C#
串口调试助手
,
C#
C#
实现在串口工具
源代码
,包括打开串口,发送消息,接收消息处理
C#
111,096
社区成员
642,554
社区内容
发帖
与我相关
我的任务
C#
.NET技术 C#
复制链接
扫一扫
分享
社区描述
.NET技术 C#
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
让您成为最强悍的C#开发者
试试用AI创作助手写篇文章吧
+ 用AI写文章