• 大小: 0.02M
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2020-12-14
  • 语言: C#
  • 标签: 接口  C#  

资源简介

c#地秤接口(数据接收)

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Text;

namespace LABin
{

    public class LABinSPort
    {
        private System.IO.Ports.SerialPort _SPort;

        public delegate void PortDataChangeEventHandler(object PortData);
        public event PortDataChangeEventHandler PortDataChangeEvent;


        /// 
        /// 初始化端口
        /// 

        /// 端口名字
        /// 波特率
        public LABinSPort(string portName int baudRate)
        {
            _SPort = new System.IO.Ports.SerialPort(portName baudRate);
            _SPort.DataReceived += SPort_DataReceived;
        }

        /// 
        /// 打开端口
        /// 

        /// 

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

     文件       6144  2012-10-31 14:44  LabinSPort\LabinSPort\bin\Debug\LabinSPort.dll

     文件      13824  2012-10-31 14:44  LabinSPort\LabinSPort\bin\Debug\LabinSPort.pdb

     文件       3269  2012-10-31 14:07  LabinSPort\LabinSPort\LABinSPort.cs

     文件       2339  2012-09-20 17:40  LabinSPort\LabinSPort\LabinSPort.csproj

     文件        143  2012-09-20 16:36  LabinSPort\LabinSPort\LabinSPort.csproj.user

     文件       4988  2012-11-01 16:05  LabinSPort\LabinSPort\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件        782  2012-09-20 18:09  LabinSPort\LabinSPort\obj\Debug\LabinSPort.csproj.FileListAbsolute.txt

     文件       6144  2012-10-31 14:44  LabinSPort\LabinSPort\obj\Debug\LabinSPort.dll

     文件      13824  2012-10-31 14:44  LabinSPort\LabinSPort\obj\Debug\LabinSPort.pdb

     文件      10882  2012-10-31 10:42  LabinSPort\LabinSPort\obj\Debug\ResolveAssemblyReference.cache

     文件       1352  2012-09-20 16:34  LabinSPort\LabinSPort\Properties\AssemblyInfo.cs

     文件       2575  2012-10-31 10:42  LabinSPort\LabinSPort.sln

    ..A..H.     38912  2012-10-31 11:52  LabinSPort\LabinSPort.suo

     目录          0  2012-09-20 16:36  LabinSPort\LabinSPort\obj\Debug\TempPE

     目录          0  2012-09-20 18:09  LabinSPort\LabinSPort\bin\Debug

     目录          0  2012-09-20 16:36  LabinSPort\LabinSPort\bin\Release

     目录          0  2012-10-31 14:44  LabinSPort\LabinSPort\obj\Debug

     目录          0  2012-09-20 16:36  LabinSPort\LabinSPort\obj\Release

     目录          0  2012-09-20 16:36  LabinSPort\LabinSPort\bin

     目录          0  2012-09-20 16:36  LabinSPort\LabinSPort\obj

     目录          0  2012-09-20 16:36  LabinSPort\LabinSPort\Properties

     目录          0  2012-09-20 16:36  LabinSPort\LabinSPort

     目录          0  2012-11-01 16:07  LabinSPort

----------- ---------  ---------- -----  ----

               105178                    23


评论

共有 条评论