• 大小: 797KB
    文件类型: .rar
    金币: 2
    下载: 1 次
    发布日期: 2021-05-25
  • 语言: VB
  • 标签: vb.net  

资源简介

文件一共三个用vb.net语言编写的串口调试助手软件,每一个都是完整的源码工程,都已经运行过可用,对于学习vb语言的初学者非常适用。

资源截图

代码片段和文件信息

//*******************************************************
//  Copyright(C) 2008 Ding Wenbin All Rights Reserved
//  E-mail: wb_ding@sina.com (Business Only)
//
//  串口调试助手.net 主窗体 
//*******************************************************
using System;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace SerialReceiver
{
    public partial class FormMain : Form
    {
        public FormMain()
        {
            InitializeComponent();
        }

        PropertiesLib serialPortLib = new PropertiesLib();
        BackgroundWorker backWorker = new BackgroundWorker();
        bool canSaveToFile = false;

        private void Form1_Load(object sender EventArgs e)
        {
            BindSerialPorts();
            button_ResetComPort_Click(sender e);
            toolStripSplitButton1_Buttonclick(sender e);
            backWorker.DoWork += new DoWorkEventHandler(backWorker_DoWork);
            backWorker.WorkerSupportsCancellation = true;
            backWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(backWorker_RunWorkerCompleted);
            //StartReceiveDate();
        }

        #region 获取和绑定控件值
        /// 
        /// 绑定串口控件的值
        /// 

        private void BindSerialPorts()
        {
            BindSerialPortProperties();
            BindSerialPortValues();
            SetSerialPortConfiguration();
        }

        /// 
        /// 绑定串口属性
        /// 

        private void BindSerialPortProperties()
        {
            comboBox_Ports.DataSource = serialPortLib.ComPorts;

            int counter = 0;
            //初始化数据表
            DataTable dt = new DataTable();

            #region 绑定波特率
            dt.Columns.Add(“DispName“);
            dt.Columns.Add(“DispValue“);
            counter = serialPortLib.BaudRateStrings.Length;
            //for (int i = 0; i < counter; i++)
            foreach (int i in serialPortLib.BaudRateStrings)
            {
                DataRow dr = dt.NewRow();
                dr[“DispName“] = i;// serialPortLib.BaudRateStrings[i];
                dr[“DispValue“] = i;// serialPortLib.BaudRateStrings[i];
                dt.Rows.Add(dr);
            }
            comboBox_BaudRate.DisplayMember = “DispName“;
            comboBox_BaudRate.ValueMember = “DispValue“;
            comboBox_BaudRate.DataSource = serialPortLib.BaudRateStrings;
            dt.Dispose();
            #endregion

            #region 绑定数据位
            dt = new DataTable();
            dt.Columns.Add(“DispName“);
            dt.Columns.Add(“DispValue“);
            counter = serialPortLib.DataBitsStrings.Length;
            //for (int i = 0; i < counter; i++)
            foreach (int i in serialPortLib.BaudRateStrings)
            {
                DataRow dr = dt.NewRow();
                dr[“DispName“] = i;/

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       1602  2017-11-15 10:35  vb.net串口调试助手软件源码\1_ChuanKouTiaoShi\ChuanKouTiaoShi\bin\Debug\ChuanKouTiaoShi.application

     文件      46592  2017-11-15 10:35  vb.net串口调试助手软件源码\1_ChuanKouTiaoShi\ChuanKouTiaoShi\bin\Debug\ChuanKouTiaoShi.exe

     文件       3613  2017-11-15 10:35  vb.net串口调试助手软件源码\1_ChuanKouTiaoShi\ChuanKouTiaoShi\bin\Debug\ChuanKouTiaoShi.exe.manifest

     文件      69120  2017-11-15 10:35  vb.net串口调试助手软件源码\1_ChuanKouTiaoShi\ChuanKouTiaoShi\bin\Debug\ChuanKouTiaoShi.pdb

     文件       1605  2015-05-26 09:25  vb.net串口调试助手软件源码\1_ChuanKouTiaoShi\ChuanKouTiaoShi\bin\Debug\ChuanKouTiaoShi.vshost.application

     文件      14328  2017-11-15 10:35  vb.net串口调试助手软件源码\1_ChuanKouTiaoShi\ChuanKouTiaoShi\bin\Debug\ChuanKouTiaoShi.vshost.exe

     文件        123  2017-11-15 10:35  vb.net串口调试助手软件源码\1_ChuanKouTiaoShi\ChuanKouTiaoShi\bin\Debug\ChuanKouTiaoShi.xml

     文件      16318  2011-05-05 10:41  vb.net串口调试助手软件源码\1_ChuanKouTiaoShi\ChuanKouTiaoShi\bin\Debug\串口调试.rar

     文件      39424  2011-04-05 12:33  vb.net串口调试助手软件源码\1_ChuanKouTiaoShi\ChuanKouTiaoShi\bin\Release\app.publish\Application Files\ChuanKouTiaoShi_1_0_0_0\ChuanKouTiaoShi.exe.deploy

     文件       7321  2011-04-05 12:33  vb.net串口调试助手软件源码\1_ChuanKouTiaoShi\ChuanKouTiaoShi\bin\Release\app.publish\Application Files\ChuanKouTiaoShi_1_0_0_0\ChuanKouTiaoShi.exe.manifest

     文件       5420  2011-04-05 12:33  vb.net串口调试助手软件源码\1_ChuanKouTiaoShi\ChuanKouTiaoShi\bin\Release\app.publish\ChuanKouTiaoShi.application

     文件     461824  2011-04-05 12:33  vb.net串口调试助手软件源码\1_ChuanKouTiaoShi\ChuanKouTiaoShi\bin\Release\app.publish\setup.exe

     文件       1595  2011-04-05 12:33  vb.net串口调试助手软件源码\1_ChuanKouTiaoShi\ChuanKouTiaoShi\bin\Release\ChuanKouTiaoShi.application

     文件      39424  2011-04-05 12:33  vb.net串口调试助手软件源码\1_ChuanKouTiaoShi\ChuanKouTiaoShi\bin\Release\ChuanKouTiaoShi.exe

     文件       3574  2011-04-05 12:33  vb.net串口调试助手软件源码\1_ChuanKouTiaoShi\ChuanKouTiaoShi\bin\Release\ChuanKouTiaoShi.exe.manifest

     文件      52736  2011-04-05 12:33  vb.net串口调试助手软件源码\1_ChuanKouTiaoShi\ChuanKouTiaoShi\bin\Release\ChuanKouTiaoShi.pdb

     文件        123  2011-04-05 12:33  vb.net串口调试助手软件源码\1_ChuanKouTiaoShi\ChuanKouTiaoShi\bin\Release\ChuanKouTiaoShi.xml

     文件       7144  2011-04-09 12:15  vb.net串口调试助手软件源码\1_ChuanKouTiaoShi\ChuanKouTiaoShi\ChuanKouTiaoShi.vbproj

     文件        548  2017-11-15 10:35  vb.net串口调试助手软件源码\1_ChuanKouTiaoShi\ChuanKouTiaoShi\ChuanKouTiaoShi.vbproj.user

     文件      23558  2011-04-26 19:49  vb.net串口调试助手软件源码\1_ChuanKouTiaoShi\ChuanKouTiaoShi\Form1.Designer.vb

     文件       7853  2011-04-26 19:49  vb.net串口调试助手软件源码\1_ChuanKouTiaoShi\ChuanKouTiaoShi\Form1.resx

     文件      16418  2011-04-26 19:49  vb.net串口调试助手软件源码\1_ChuanKouTiaoShi\ChuanKouTiaoShi\Form1.vb

     文件       1518  2011-04-04 13:01  vb.net串口调试助手软件源码\1_ChuanKouTiaoShi\ChuanKouTiaoShi\My Project\Application.Designer.vb

     文件        510  2011-04-04 13:01  vb.net串口调试助手软件源码\1_ChuanKouTiaoShi\ChuanKouTiaoShi\My Project\Application.myapp

     文件       1101  2011-04-04 13:01  vb.net串口调试助手软件源码\1_ChuanKouTiaoShi\ChuanKouTiaoShi\My Project\AssemblyInfo.vb

     文件       2803  2011-04-04 13:01  vb.net串口调试助手软件源码\1_ChuanKouTiaoShi\ChuanKouTiaoShi\My Project\Resources.Designer.vb

     文件       5612  2008-01-11 15:55  vb.net串口调试助手软件源码\1_ChuanKouTiaoShi\ChuanKouTiaoShi\My Project\Resources.resx

     文件       3050  2011-04-04 13:01  vb.net串口调试助手软件源码\1_ChuanKouTiaoShi\ChuanKouTiaoShi\My Project\Settings.Designer.vb

     文件        279  2008-01-11 15:55  vb.net串口调试助手软件源码\1_ChuanKouTiaoShi\ChuanKouTiaoShi\My Project\Settings.settings

     文件       1602  2017-11-15 10:35  vb.net串口调试助手软件源码\1_ChuanKouTiaoShi\ChuanKouTiaoShi\obj\Debug\ChuanKouTiaoShi.application

............此处省略158个文件信息

评论

共有 条评论