• 大小: 651KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2021-05-11
  • 语言: C#
  • 标签: c#  socket  串口  

资源简介

本源码是我自己开发的一款串口结合socket的上位机软件,用来读取和解析硬件底层数据,该源码还结合了多种常用的方法,包括字符串,字符数组,16进制的相互转换等等。还有UDP/TCP开发,是非常好的一款c#学习资料

资源截图

代码片段和文件信息

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

namespace gprs_zigbee_gate
{
    class basefunction
    {
        /// 
        /// 字节数组转对应的字符串,eg:0xae 0x00 0xcf => “AE00CF“
        /// 

        /// 
        /// 
        public static string ToHexString(byte[] bytes) 
        {
            string hexString = string.Empty;
            if (bytes != null)
            {
                StringBuilder strB = new StringBuilder();
                for (int i = 0; i < bytes.Length; i++)
                {
                    strB.Append(bytes[i].ToString(“X2“));
                }
                hexString = strB.ToString();
            }
            return hexString;
        }
    }
}

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

     文件        844  2013-06-29 22:33  gprs_zigbee_gate_v1.0\Backup\gprs_zigbee_gate\basefunction.cs

     文件        875  2013-07-02 21:54  gprs_zigbee_gate_v1.0\Backup\gprs_zigbee_gate\cc2530.cs

     文件      67646  2013-07-07 12:09  gprs_zigbee_gate_v1.0\Backup\gprs_zigbee_gate\gprs_zigbee.ico

     文件       8087  2014-01-02 14:42  gprs_zigbee_gate_v1.0\Backup\gprs_zigbee_gate\gprs_zigbee_gate.csproj

     文件        497  2013-07-05 01:13  gprs_zigbee_gate_v1.0\Backup\gprs_zigbee_gate\gprs_zigbee_gate.csproj.user

     文件      58265  2014-01-08 16:02  gprs_zigbee_gate_v1.0\Backup\gprs_zigbee_gate\mainform.cs

     文件      61953  2014-01-08 04:02  gprs_zigbee_gate_v1.0\Backup\gprs_zigbee_gate\mainform.Designer.cs

     文件       9424  2014-01-08 04:02  gprs_zigbee_gate_v1.0\Backup\gprs_zigbee_gate\mainform.resx

     文件       1696  2014-01-03 08:16  gprs_zigbee_gate_v1.0\Backup\gprs_zigbee_gate\newserverform.cs

     文件       7143  2013-12-29 01:30  gprs_zigbee_gate_v1.0\Backup\gprs_zigbee_gate\newserverform.Designer.cs

     文件       5814  2013-12-29 01:30  gprs_zigbee_gate_v1.0\Backup\gprs_zigbee_gate\newserverform.resx

     文件       2091  2013-12-27 13:09  gprs_zigbee_gate_v1.0\Backup\gprs_zigbee_gate\opencomform.cs

     文件      10163  2013-12-27 13:09  gprs_zigbee_gate_v1.0\Backup\gprs_zigbee_gate\opencomform.Designer.cs

     文件       5814  2013-12-27 13:09  gprs_zigbee_gate_v1.0\Backup\gprs_zigbee_gate\opencomform.resx

     文件        675  2014-01-07 15:45  gprs_zigbee_gate_v1.0\Backup\gprs_zigbee_gate\Program.cs

     文件       1402  2013-07-07 11:34  gprs_zigbee_gate_v1.0\Backup\gprs_zigbee_gate\Properties\AssemblyInfo.cs

     文件       5381  2013-12-27 11:54  gprs_zigbee_gate_v1.0\Backup\gprs_zigbee_gate\Properties\Resources.Designer.cs

     文件       8382  2013-12-27 11:54  gprs_zigbee_gate_v1.0\Backup\gprs_zigbee_gate\Properties\Resources.resx

     文件       1101  2013-05-31 23:18  gprs_zigbee_gate_v1.0\Backup\gprs_zigbee_gate\Properties\Settings.Designer.cs

     文件        249  2013-05-31 23:18  gprs_zigbee_gate_v1.0\Backup\gprs_zigbee_gate\Properties\Settings.settings

     文件       7649  2013-06-02 13:18  gprs_zigbee_gate_v1.0\Backup\gprs_zigbee_gate\resource\comclose.jpg

     文件       7637  2013-06-02 13:19  gprs_zigbee_gate_v1.0\Backup\gprs_zigbee_gate\resource\comopen.jpg

     文件       7981  2013-06-02 12:56  gprs_zigbee_gate_v1.0\Backup\gprs_zigbee_gate\resource\deletenet.jpg

     文件       8636  2013-06-07 01:04  gprs_zigbee_gate_v1.0\Backup\gprs_zigbee_gate\resource\green.jpg

     文件       1078  2013-12-27 11:48  gprs_zigbee_gate_v1.0\Backup\gprs_zigbee_gate\resource\Icon1.ico

     文件       7665  2013-06-02 16:41  gprs_zigbee_gate_v1.0\Backup\gprs_zigbee_gate\resource\newserver.jpg

     文件       8762  2013-06-07 01:04  gprs_zigbee_gate_v1.0\Backup\gprs_zigbee_gate\resource\red.jpg

     文件      11006  2013-06-02 13:31  gprs_zigbee_gate_v1.0\Backup\gprs_zigbee_gate\resource\refresh.jpg

     文件       3103  2013-12-27 12:04  gprs_zigbee_gate_v1.0\Backup\gprs_zigbee_gate\resource\Resource1.Designer.cs

     文件       6199  2013-12-27 12:04  gprs_zigbee_gate_v1.0\Backup\gprs_zigbee_gate\resource\Resource1.resx

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

评论

共有 条评论