refactor - 重构进度30%

dep
SoulStar 9 months ago
parent b5f5fad0b6
commit e6d718f3ee

@ -51,6 +51,7 @@
<Compile Include="MsgUtil.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="StringChange.cs" />
<Compile Include="XmlUtil.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\HighWayIot.Log4net\HighWayIot.Log4net.csproj">

@ -25,139 +25,6 @@ namespace HighWayIot.Common
private MsgUtil() { }
#region 数据解析公共方法
/// <summary>
/// 字节数组转换成结构体
/// </summary>
/// <param name="buf"></param>
/// <param name="len"></param>
/// <param name="type"></param>
/// <returns></returns>
public static object BytesToStruct(byte[] buf, int len, Type type)
{
object rtn;
IntPtr buffer = Marshal.AllocHGlobal(len);
Marshal.Copy(buf, 0, buffer, len);
try
{
rtn = Marshal.PtrToStructure(buffer, type);
Marshal.FreeHGlobal(buffer);
}
catch (Exception)
{
return null;
}
return rtn;
}
public string StringToHexString(string s, Encoding encode)
{
byte[] b = encode.GetBytes(s); //按照指定编码将string编程字节数组
string result = string.Empty;
for (int i = 0; i < b.Length; i++) //逐字节变为16进制字符以%隔开
{
result += "%" + Convert.ToString(b[i], 16);
}
return result;
}
//// <summary>
/// 结构体转byte数组
/// </summary>
/// <param name="structObj">要转换的结构体</param>
/// <returns>转换后的byte数组</returns>
public static byte[] StructToBytes(object structObj)
{
//得到结构体的大小
int size = Marshal.SizeOf(structObj);
//创建byte数组
byte[] bytes = new byte[size];
//分配结构体大小的内存空间
IntPtr structPtr = Marshal.AllocHGlobal(size);
//将结构体拷到分配好的内存空间
Marshal.StructureToPtr(structObj, structPtr, false);
//从内存空间拷到byte数组
Marshal.Copy(structPtr, bytes, 0, size);
//释放内存空间
Marshal.FreeHGlobal(structPtr);
//返回byte数组
return bytes;
}
#endregion
#region 消息验证方法
/// <summary>
/// CS和校验
/// </summary>
/// <param name="Abyte"></param>
/// <returns></returns>
public byte Check_CS(byte[] Abyte)
{
byte result = new byte();
try
{
int num = 0;
for (int i = 0; i < Abyte.Length; i++)
{
num = (num + Abyte[i]) % 256;
}
result = (byte)num;
}
catch
{
result = 0;
}
return result;
}
/// <summary>
/// BCC异或取反校验
/// </summary>
/// <param name="data"></param>
/// <returns></returns>
public string getBCC(byte[] data)
{
String ret = "";
byte[] BCC = new byte[1];
for (int i = 0; i < data.Length; i++)
{
BCC[0] = (byte)(BCC[0] ^ data[i]);
}
String hex = ((~BCC[0]) & 0xFF).ToString("X");//取反操作
if (hex.Length == 1)
{
hex = '0' + hex;
}
ret += hex.ToUpper();
return ret;
}
static int BytesToInt(byte[] b, int length)
{
int temp = 0;
for (int i = 0; i <= length - 1 && i < 4; i++)
{
temp += (int)(b[i] << (i * 8));
}
return temp;
}
public static byte[] CalculateVerify(byte[] pMessage, int iLength)
{
UInt16 i;
int iVerify = 0;
iVerify = pMessage[0];
for (i = 0; i < iLength - 1; i++)
{
iVerify = iVerify + pMessage[i + 1];
}
return BitConverter.GetBytes(Convert.ToUInt16(iVerify));
}
#endregion
public byte[] HexStrTorbytes(string strHex)//e.g. " 01 01" ---> { 0x01, 0x01}
{
strHex = strHex.Replace(" ", "");
@ -203,25 +70,13 @@ namespace HighWayIot.Common
}
return str;
}
public string ConverToString(byte[] data)
{
string str;
StringBuilder stb = new StringBuilder();
for (int i = 0; i < data.Length; i++)
{
if ((int)data[i] > 15)
{
stb.Append(Convert.ToString(data[i], 16).ToUpper()); //添加字符串
}
else //如果是小于0F需要加个零
{
stb.Append("0" + Convert.ToString(data[i], 16).ToUpper());
}
}
str = stb.ToString();
return str;
}
/// <summary>
/// byte数组转换成十六进制字符串
/// </summary>
/// <param name="bytes"></param>
/// <param name="iLen"></param>
/// <returns></returns>
public string bytesToHexStr(byte[] bytes, int iLen)
{
StringBuilder sb = new StringBuilder();
@ -293,219 +148,4 @@ namespace HighWayIot.Common
}
}
}
#region 消息公用的头尾
/// <summary>
/// 能源通讯协议结构体
/// </summary>
public enum CallbackSendData
{
_LoginIn = 0XA1,
_SetTime = 0X08,
_HeartBeat = 0XA4,
_ERealFlag = 0XB3,
_SRealFlag = 0XB4,
_TRealFlag = 0XB5,
_IRealFlag = 0XB6,
_EFlag = 0XC3,
_SFlag = 0XC4,
_TFlag = 0XC5,
_IFlag = 0XC6,
}
public struct struFrame
{
//帧开始
public byte BeginChar_State;
//采集器类型
public byte Collection_Type;
//采集器地址
public byte[] Collection_Addr;
//命令序列号
public byte[] Command_Id;
//起始符
public byte StartChar_State;
//控制码
public byte Ctrl_State;
//数据长度
public byte[] DataLen_State;
//数据域
public byte[] Data_State;
//校验码
public byte CSChar_State;
//结束符
public byte EndChar_State;
//终端类型
public byte flagDTN;
//逻辑编号
public byte[] addrDNL;
//主站地址
public byte flagMSTA;
//帧内序号
public byte flagISEQ;
//帧序号
public byte flagFSEQ;
//控制码
public byte flagCtrl;
//传送方向
public byte flagCtrlD;
//异常标志
public byte flagCtrlE;
//功能标志
public byte flagCtrlF;
//数据长度
public int lenData;
//数据字符串
public byte[] strData;
public object userData;
public string tName;
public object userData2;
//public bool isCtrl;
//public bool isData;
public bool isTimeCorrectting;
};
/// <summary>
/// 头文件
/// </summary>
[StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
public struct Head
{
public byte start; //起始
public short addr; //软件地址
public byte mstaseq; //主站地址与命令序号
public byte control; //控制码
public short length; //数据长度
}
/// <summary>
/// 结尾
/// </summary>
[StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
public struct Tail
{
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)]
public byte[] verifica; //校验码
public byte end; //结束码
}
#endregion
#region 与MES通讯协议
//识别一条EPC数据 125+3
[StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
public struct ReadEPC
{
public Head head;
public int num;//合并编号
public Tail tail;
}
/// <summary>
/// 写入反馈 125+5
/// </summary>
[StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
public struct RecWrite
{
public Head head;
public int num;//合并编号
public byte state;//1成功0失败2写失败读成功
public Tail tail;
}
//
[StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
public struct RecDataCell
{
public byte len;//Data长度
public byte[] data;//len 长度个字节数据
}
/// <summary>
/// 自报数据 125+6
/// </summary>
[StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
public struct RecAutoData
{
public Head head;
public int num;//合并编号
public RecDataCell recDatas;//自报数据
public Tail tail;
}
/// <summary>
///心跳 101
/// </summary>
[StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
public struct Heart
{
public Head head;
public Tail tail;
}
#endregion
#region 与上层应用层 消息指令
/// <summary>
/// 收到的消息指令
/// </summary>
enum RecAppMsgType
{
_ReadEpc = 125 + 3,
_ReadData = 125 + 4,
_WirteData = 125 + 5,
_AutoSendData,
_HeartBeat = 101,
_ReadEquipState = 125 + 102,
_SendGetSoftState = 125 + 103,
}
/// <summary>
/// 发送的消息指令
/// </summary>
enum RetAppMsgType
{
_RetEpc = 125 + 3,
_RetData = 125 + 4,
_RetDataBack = 125 + 5,
_RetAutoSendData,
_RetEquipState = 125 + 102,
_RetGetSoftState = 125 + 103,
}
#endregion
#region 与设备层 适配层消息指令
//收到设备层消息
enum RecEquipMsgType
{
_GetEquipInfo = 0X01, //收到适配软件所需设备信息
_GetSensor = 0x02, //收到适配软件传感器信息
_EPCinfo = 0x03, //收到设备返回数据 将数据发送MES 并保存数据库
_SendData = 0x04, //收到读取到的数据 收到数据后上传给MES并保存数据库
_RecGetData = 0x05, //收到写入的数据是否成功反馈
_RecAutoData = 0x06, //收到设备自报数据
_HeartBeat = 101, //心跳
_EquipState, //设备状态
}
//发送给设备层消息
enum RetEquipMsgType
{
_RetEquipInfo = 0X01, //获取适配软件所需设备信息
_RetSensor = 0x02, //获取适配软件传感器信息
_GetEPCinfo = 0x03, //向设备发送命令识别EPC数据
_GetData = 0x04, //向设备发送命令,读取数据
_WirteData = 0x05, //向设备发送命令,写入数据
_RetAutoData = 0x06, //收到设备自爆数据反馈
}
#endregion
}

@ -0,0 +1,105 @@
using HighWayIot.Log4net;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml;
namespace HighWayIot.Common
{
/// <summary>
/// XML读写类
/// </summary>
public class XmlUtil
{
private static readonly Lazy<XmlUtil> lazy = new Lazy<XmlUtil>(() => new XmlUtil());
public static XmlUtil Instance
{
get
{
return lazy.Value;
}
}
/// <summary>
/// XML读写实例
/// </summary>
XmlDocument xmlDocument = new XmlDocument();
/// <summary>
/// 运行时路径
/// </summary>
private string Path = System.Environment.CurrentDirectory;
/// <summary>
/// 客户端配置读取
/// </summary>
/// <returns></returns>
public List<ClientsConfig> ClientReader()
{
List<ClientsConfig> list = new List<ClientsConfig>();
xmlDocument.Load($"{Path}\\RFIDConfiguration.xml");
XmlNode root = xmlDocument.DocumentElement;
XmlNode node = root.SelectSingleNode("Clients");
foreach (XmlNode role in node)
{
XmlAttribute clientIp = (XmlAttribute)role.Attributes.GetNamedItem("ip");
XmlAttribute clientPort = (XmlAttribute)role.Attributes.GetNamedItem("port");
XmlAttribute clientID = (XmlAttribute)role.Attributes.GetNamedItem("ID");
list.Add(new ClientsConfig()
{
IP = clientIp.Value,
Port = clientPort.Value,
ID = clientID.Value
});
}
return list;
}
/// <summary>
/// 读取服务端配置
/// </summary>
/// <returns></returns>
public string ServerReader()
{
xmlDocument.Load($"{Path}\\RFIDConfiguration.xml");
XmlNode root = xmlDocument.DocumentElement;
XmlNode node = root.SelectSingleNode("Server");
XmlAttribute ip = (XmlAttribute)node.Attributes.GetNamedItem("ip");
XmlAttribute port = (XmlAttribute)node.Attributes.GetNamedItem("port");
string res = ip.Value + ":" + port.Value;
return res;
}
}
public class ClientsConfig
{
/// <summary>
/// IP
/// </summary>
public string IP { get; set; }
/// <summary>
/// 端口号
/// </summary>
public string Port { get; set; }
/// <summary>
/// ID
/// </summary>
public string ID { get; set; }
}
public class ExportPathConfig
{
public string ExportConfig { get; set; }
public string Config { get; set; }
}
}

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\EntityFramework.6.4.4\build\EntityFramework.props" Condition="Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@ -34,11 +35,17 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.dll</HintPath>
</Reference>
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.SqlServer.dll</HintPath>
</Reference>
<Reference Include="Oracle.ManagedDataAccess">
<HintPath>..\HighWayIot.Library\Oracle.ManagedDataAccess.dll</HintPath>
</Reference>
<Reference Include="SqlSugar, Version=5.1.4.166, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\SqlSugar.5.1.4.166\lib\SqlSugar.dll</HintPath>
<Reference Include="SqlSugar, Version=5.1.4.200, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\SqlSugar.5.1.4.200\lib\SqlSugar.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
@ -47,6 +54,15 @@
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
<Reference Include="System.Data.SQLite, Version=1.0.119.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<HintPath>..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.119.0\lib\net46\System.Data.SQLite.dll</HintPath>
</Reference>
<Reference Include="System.Data.SQLite.EF6, Version=1.0.119.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<HintPath>..\packages\System.Data.SQLite.EF6.1.0.119.0\lib\net46\System.Data.SQLite.EF6.dll</HintPath>
</Reference>
<Reference Include="System.Data.SQLite.Linq, Version=1.0.119.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<HintPath>..\packages\System.Data.SQLite.Linq.1.0.119.0\lib\net46\System.Data.SQLite.Linq.dll</HintPath>
</Reference>
<Reference Include="System.IO.Pipelines, Version=5.0.0.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.IO.Pipelines.5.0.2\lib\net461\System.IO.Pipelines.dll</HintPath>
</Reference>
@ -101,4 +117,14 @@
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.4\build\EntityFramework.props'))" />
<Error Condition="!Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.4\build\EntityFramework.targets'))" />
<Error Condition="!Exists('..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.119.0\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.119.0\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets'))" />
</Target>
<Import Project="..\packages\EntityFramework.6.4.4\build\EntityFramework.targets" Condition="Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" />
<Import Project="..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.119.0\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets" Condition="Exists('..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.119.0\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets')" />
</Project>

@ -1,13 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Oracle.ManagedDataAccess" publicKeyToken="89b483f429c47342" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.122.21.1" newVersion="4.122.21.1" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Data.SQLite" publicKeyToken="db937bc2d44ff139" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.0.119.0" newVersion="1.0.119.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<entityFramework>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
<provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />
</providers>
</entityFramework>
<system.data>
<DbProviderFactories>
<remove invariant="System.Data.SQLite.EF6" />
<add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6" description=".NET Framework Data Provider for SQLite (Entity Framework 6)" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6" />
<remove invariant="System.Data.SQLite" /><add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" /></DbProviderFactories>
</system.data>
</configuration>

@ -1,7 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="SqlSugar" version="5.1.4.166" targetFramework="net48" />
<package id="EntityFramework" version="6.4.4" targetFramework="net48" />
<package id="SqlSugar" version="5.1.4.200" targetFramework="net48" />
<package id="Stub.System.Data.SQLite.Core.NetFramework" version="1.0.119.0" targetFramework="net48" />
<package id="System.Buffers" version="4.5.1" targetFramework="net48" />
<package id="System.Data.SQLite.Core" version="1.0.119.0" targetFramework="net48" />
<package id="System.Data.SQLite.EF6" version="1.0.119.0" targetFramework="net48" />
<package id="System.Data.SQLite.Linq" version="1.0.119.0" targetFramework="net48" />
<package id="System.IO.Pipelines" version="5.0.2" targetFramework="net48" />
<package id="System.Memory" version="4.5.5" targetFramework="net48" />
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net48" />

@ -0,0 +1,46 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HighWayIot.TouchSocket.Entity
{
public class BaseMessagePack
{
/// <summary>
/// 功能码
/// </summary>
public byte[] FunctionCode { get; set; } = new byte[2];
/// <summary>
/// 长度(版本号、序列号、时间戳、数据内容)
/// </summary>
public byte[] Length { get; set; } = new byte[2];
/// <summary>
/// 版本号协议版本号初始值为1
/// </summary>
public byte VersionCode { get; set; }
/// <summary>
/// 报文序列号循环加1
/// </summary>
public byte[] SerialCode { get; set; } = new byte[4];
/// <summary>
/// 时间戳(毫秒)
/// </summary>
public byte[] TimeStamp { get; set; } = new byte[8];
/// <summary>
/// 数据内容
/// </summary>
public byte[] DataContent { get; set; }
/// <summary>
/// 校验和功能码到内容结束为sum255-(sum%255)。)
/// </summary>
public byte CheckSum { get; set; }
}
}

@ -103,6 +103,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="ClientStringAnalysis.cs" />
<Compile Include="Entity\BaseMessagePack.cs" />
<Compile Include="ServerBufferAnalysis.cs" />
<Compile Include="TcpClientServer.cs" />
<Compile Include="TcpServer.cs" />

@ -1,114 +1,235 @@
using HighWayIot.Log4net;
using HighWayIot.Repository.domain;
using HighWayIot.Repository.service.Impl;
using HighWayIot.TouchSocket.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using TouchSocket.Core;
namespace HighWayIot.TouchSocket
{
/// <summary>
/// 服务端接收报文分析
/// </summary>
public class ServerBufferAnalysis
{
private static LogHelper logHelper = LogHelper.Instance;
List<byte> tempData = new List<byte>();
/// <summary>
/// 心跳报文分析
/// 基础数据转包
/// </summary>
/// <param name="bytes"></param>
public static void HeartbeatSocket(byte[] bytes)
public void BaseServerBufferAnalysis(byte[] message)
{
if (int.TryParse(Encoding.ASCII.GetString(bytes, 4, 4), out int deviceno))
BaseMessagePack unpackEntity = new BaseMessagePack();
int index = 1;
//报文完整性验证
if (!MessageCheck(message))
{
BaseHeartbeatServiceImpl sql = new BaseHeartbeatServiceImpl();
if (sql.UpdateHeartbeatInfo(deviceno) == 0)
tempData.AddRange(message.ToList());
message = tempData.ToArray();
if (!MessageCheck(message))
{
RFIDHeartbeat heartbeat = new RFIDHeartbeat()
{
DeviceNo = deviceno,
BeatTime = DateTime.Now,
};
sql.AddHeartbeatInfo(heartbeat);
return;
}
else
{
tempData.Clear();
}
}
else
//功能码
Array.Copy(message, index, unpackEntity.FunctionCode, 0, 2);
Array.Reverse(unpackEntity.FunctionCode);
index += 2;
//报文字节长度
Array.Copy(message, index, unpackEntity.Length, 0, 2);
Array.Reverse(unpackEntity.Length);
index += 2;
//版本号
unpackEntity.VersionCode = message[index];
index++;
//报文序列号
Array.Copy(message, index, unpackEntity.SerialCode, 0, 4);
Array.Reverse(unpackEntity.SerialCode);
index += 4;
//时间戳
Array.Copy(message, index, unpackEntity.TimeStamp, 0, 8);
Array.Reverse(unpackEntity.TimeStamp);
index += 8;
//数据内容
int dataLength = BitConverter.ToUInt16(unpackEntity.Length, 0) - 13;
unpackEntity.DataContent = new byte[dataLength];
Array.Copy(message, index, unpackEntity.DataContent, 0, dataLength);
index += dataLength;
//校验值
unpackEntity.CheckSum = message[index];
//核对校验值
byte[] checkBytes = new byte[message.Length - 4];
Array.Copy(message, 1, checkBytes, 0, message.Length - 4);
if (unpackEntity.CheckSum != CalculateCheckSum(checkBytes))
{
logHelper.Error("心跳报文编号数值转换出现错误!");
logHelper.Error("报文校验失败!");
return;
}
//到工厂分类解析
MessageFactory(unpackEntity);
}
/// <summary>
/// RFID发送设备状态
/// 报文完整性验证
/// </summary>
/// <param name="bytes"></param>
public static void RFIDStatusSocket(byte[] bytes)
/// <param name="message"></param>
/// <returns>true为通过 false为失败</returns>
private bool MessageCheck(byte[] message)
{
if (int.TryParse(Encoding.ASCII.GetString(bytes, 4, 4), out int deviceno) &&
int.TryParse(Encoding.ASCII.GetString(bytes, 9, 1), out int state))
bool result = true;
if (message[0] != 0x3A || message[message.Length - 1] != 0x0A || message[message.Length - 2] != 0x0D)
{
BaseStateServiceImpl sql = new BaseStateServiceImpl();
RFIDState rFIDState = new RFIDState()
{
DeviceNo = deviceno,
DeviceState = state == 1 ? true : false,
LogTime = DateTime.Now,
};
sql.AddStateInfo(rFIDState);
result = false;
}
else
{
logHelper.Error("设备状态报文编号数值转换出现错误!");
}
}
/// <summary>
/// RFID发送条码
/// </summary>
/// <param name="bytes"></param>
public static void RFIDCodeSocket(byte[] bytes)
{
string readKind = Encoding.ASCII.GetString(bytes, 4, 2);
if (int.TryParse(Encoding.ASCII.GetString(bytes, 7, 4), out int deviceno))
{
RFIDContent rFIDContent = new RFIDContent()
{
DeviceNo = deviceno,
ReadKind = readKind,
LogTime = DateTime.Now,
};
string content = "";
if (readKind == "NB" || readKind == "GR")
{
content = Encoding.ASCII.GetString(bytes, 12, 16);
}
else if (readKind == "MR")
{
content = Encoding.ASCII.GetString(bytes, 12, bytes.Length - 12 - 2); // 减去条码内容之前和之后内容的长度
}
rFIDContent.Content = content;
BaseContentServiceImpl sql = new BaseContentServiceImpl();
sql.AddContentInfo(rFIDContent);
}
else
{
logHelper.Error("条码发送报文编号数值转换出现错误!");
}
}
/// <summary>
/// 将一个数组拆成另外一个数组
/// </summary>
/// <param name="originbyte">原始数组,被拆分的数组</param>
/// <param name="oringinstartindex">从原始数组第几个元素开始</param>
/// <param name="destbytelength">目标数组的长度</param>
/// <param name="destbytestartindex">目标数组开始的元素序号默认为0</param>
/// <returns></returns>
public static byte[] SplitByteArray(byte[] originbyte, int oringinstartindex, int destbytelength, int destbytestartindex = 0)
{
byte[] result = new byte[destbytelength];
System.Array.Copy(originbyte, oringinstartindex, result, destbytestartindex, destbytelength);
return result;
}
/// <summary>
/// 和校验
/// </summary>
/// <param name="bytes"></param>
/// <param name="length"></param>
/// <returns></returns>
public byte CalculateCheckSum(byte[] bytes)
{
int length = bytes.Length;
int check = 0;
for (int i = 0; i < length; i++)
{
check += bytes[i];
}
byte result = (byte)(255 - (check % 255));
return result;
}
/// <summary>
/// 消息分类工厂
/// </summary>
private void MessageFactory(BaseMessagePack messagePack)
{
int functionCode = BitConverter.ToUInt16(messagePack.FunctionCode, 0);
if (functionCode == 0) //心跳报文
{
}
if (functionCode == 1) //连接注册请求报文
{
}
if (functionCode == 600) //读码应答报文
{
}
if (functionCode == 610) //状态上报报文
{
}
}
///// <summary>
///// 心跳报文分析
///// </summary>
///// <param name="bytes"></param>
//public static void HeartbeatSocket(byte[] bytes)
//{
// if (int.TryParse(Encoding.ASCII.GetString(bytes, 4, 4), out int deviceno))
// {
// BaseHeartbeatServiceImpl sql = new BaseHeartbeatServiceImpl();
// if (sql.UpdateHeartbeatInfo(deviceno) == 0)
// {
// RFIDHeartbeat heartbeat = new RFIDHeartbeat()
// {
// DeviceNo = deviceno,
// BeatTime = DateTime.Now,
// };
// sql.AddHeartbeatInfo(heartbeat);
// }
// }
// else
// {
// logHelper.Error("心跳报文编号数值转换出现错误!");
// }
//}
///// <summary>
///// RFID发送设备状态
///// </summary>
///// <param name="bytes"></param>
//public static void RFIDStatusSocket(byte[] bytes)
//{
// if (int.TryParse(Encoding.ASCII.GetString(bytes, 4, 4), out int deviceno) &&
// int.TryParse(Encoding.ASCII.GetString(bytes, 9, 1), out int state))
// {
// BaseStateServiceImpl sql = new BaseStateServiceImpl();
// RFIDState rFIDState = new RFIDState()
// {
// DeviceNo = deviceno,
// DeviceState = state == 1 ? true : false,
// LogTime = DateTime.Now,
// };
// sql.AddStateInfo(rFIDState);
// }
// else
// {
// logHelper.Error("设备状态报文编号数值转换出现错误!");
// }
//}
///// <summary>
///// RFID发送条码
///// </summary>
///// <param name="bytes"></param>
//public static void RFIDCodeSocket(byte[] bytes)
//{
// string readKind = Encoding.ASCII.GetString(bytes, 4, 2);
// if (int.TryParse(Encoding.ASCII.GetString(bytes, 7, 4), out int deviceno))
// {
// RFIDContent rFIDContent = new RFIDContent()
// {
// DeviceNo = deviceno,
// ReadKind = readKind,
// LogTime = DateTime.Now,
// };
// string content = "";
// if (readKind == "NB" || readKind == "GR")
// {
// content = Encoding.ASCII.GetString(bytes, 12, 16);
// }
// else if (readKind == "MR")
// {
// content = Encoding.ASCII.GetString(bytes, 12, bytes.Length - 12 - 2); // 减去条码内容之前和之后内容的长度
// }
// rFIDContent.Content = content;
// BaseContentServiceImpl sql = new BaseContentServiceImpl();
// sql.AddContentInfo(rFIDContent);
// }
// else
// {
// logHelper.Error("条码发送报文编号数值转换出现错误!");
// }
//}
}
}

@ -11,6 +11,9 @@ using TouchSocket.Sockets;
namespace HighWayIot.TouchSocket
{
/// <summary>
/// 用于格口盘点
/// </summary>
public class TcpClientServer
{
private static readonly Lazy<TcpClientServer> lazy = new Lazy<TcpClientServer>(() => new TcpClientServer());
@ -84,6 +87,11 @@ namespace HighWayIot.TouchSocket
//载入配置
await tcpClient.SetupAsync(new TouchSocketConfig()
.SetRemoteIPHost($"{ip}:{port}")
.ConfigurePlugins(a =>
{
a.UseTcpReconnection()//添加TcpClientPlugin插件
.UsePolling(TimeSpan.FromSeconds(1));
})
.ConfigureContainer(a =>
{
a.AddConsoleLogger();//添加一个日志注入

@ -4,12 +4,16 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using TouchSocket.Core;
using TouchSocket.Sockets;
namespace HighWayIot.TouchSocket
{
/// <summary>
/// 消息接收
/// </summary>
public class TcpServer
{
private static readonly Lazy<TcpServer> lazy = new Lazy<TcpServer>(() => new TcpServer());
@ -18,6 +22,8 @@ namespace HighWayIot.TouchSocket
private static LogHelper logHelper = LogHelper.Instance;
private ServerBufferAnalysis _serverBufferAnalysis = new ServerBufferAnalysis();
public ServerState State
{
get => service.ServerState;
@ -31,9 +37,11 @@ namespace HighWayIot.TouchSocket
TcpService service = new TcpService();
Dictionary<string, string> Ids = new Dictionary<string, string>();
public int ConnectCount = 0;
public bool ServerStart(string ip, string port)
public bool ServerStart(string host)
{
service = new TcpService();
try
@ -62,11 +70,7 @@ namespace HighWayIot.TouchSocket
};//有客户端断开连接
service.Received = (client, e) =>
{
////从客户端收到信息
//var mes = Encoding.ASCII.GetString(e.ByteBlock.Buffer, 0, e.ByteBlock.Len);//注意数据长度是byteBlock.Len
//logHelper.Info($"已从{client.IP}:{client.Port}接收到信息:{mes}");
BufferMemory(ServerBufferAnalysis.SplitByteArray(e.ByteBlock.Span.ToArray(), 0, e.ByteBlock.Length));
_serverBufferAnalysis.BaseServerBufferAnalysis(e.ByteBlock.Span.ToArray());
return EasyTask.CompletedTask;
};
@ -76,7 +80,7 @@ namespace HighWayIot.TouchSocket
{
option.Add(new TcpListenOption()
{
IpHost = ip + ":" + port,
IpHost = host,
Name = "Server",//名称用于区分监听
ServiceSslOption = null,//可以针对当前监听单独启用ssl加密
Adapter = () => new NormalDataHandlingAdapter(),//可以单独对当前地址监听,配置适配器
@ -102,6 +106,25 @@ namespace HighWayIot.TouchSocket
}
}
/// <summary>
/// 信息发送
/// </summary>
/// <param name="message"></param>
/// <returns></returns>
public bool SendMessage(byte[] message, string id)
{
try
{
service.SendAsync(id, message).GetAwaiter().GetResult();
return true;
}
catch (Exception ex)
{
logHelper.Error("发送信息失败! 错误代码" + ex.ToString());
return false;
}
}
public bool ServerStop()
{
try
@ -131,27 +154,5 @@ namespace HighWayIot.TouchSocket
return false;
}
}
private void BufferMemory(byte[] bytes)
{
byte[] identify = new byte[2] { bytes[1], bytes[2] };
if (identify[0] == 0x30 && identify[1] == 0x31)
{
ServerBufferAnalysis.HeartbeatSocket(bytes);
}
else if (identify[0] == 0x30 && identify[1] == 0x34)
{
ServerBufferAnalysis.RFIDStatusSocket(bytes);
}
else if (identify[0] == 0x35 && identify[1] == 0x33)
{
ServerBufferAnalysis.RFIDCodeSocket(bytes);
}
else
{
logHelper.Error("未知数据格式!");
}
}
}
}

@ -12,7 +12,7 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Data.SQLite" publicKeyToken="db937bc2d44ff139" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.0.118.0" newVersion="1.0.118.0" />
<bindingRedirect oldVersion="0.0.0.0-1.0.119.0" newVersion="1.0.119.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Oracle.ManagedDataAccess" publicKeyToken="89b483f429c47342" culture="neutral" />

@ -15,7 +15,7 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Data.SQLite" publicKeyToken="db937bc2d44ff139" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.0.118.0" newVersion="1.0.118.0" />
<bindingRedirect oldVersion="0.0.0.0-1.0.119.0" newVersion="1.0.119.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />

@ -1,15 +1,52 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Oracle.ManagedDataAccess" publicKeyToken="89b483f429c47342" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.122.21.1" newVersion="4.122.21.1" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Data.SQLite" publicKeyToken="db937bc2d44ff139" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.0.119.0" newVersion="1.0.119.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
<appSettings>
<add key="IpSetting" value="127.0.0.1"></add>
<add key="PortSetting" value="6001"></add>
<add key="IpSetting" value="127.0.0.1">
</add>
<add key="PortSetting" value="6001">
</add>
</appSettings>
<entityFramework>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
<provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />
</providers>
</entityFramework>
<system.data>
<DbProviderFactories>
<remove invariant="System.Data.SQLite.EF6" />
<add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6" description=".NET Framework Data Provider for SQLite (Entity Framework 6)" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6" />
<remove invariant="System.Data.SQLite" /><add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" /></DbProviderFactories>
</system.data>
</configuration>

@ -11,3 +11,4 @@
<ServiceIpConfig>192.168.0.7:1500</ServiceIpConfig>
<ServiceIpCount>100</ServiceIpCount>
</BinAudlt>

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<RFIDMonitor>
<Server ip="192.168.18.11" port="31108"/>
<Clients>
<Client ip="192.168.18.53" port="6501" ID="1"/>
</Clients>
</RFIDMonitor>

@ -30,11 +30,12 @@
{
this.components = new System.ComponentModel.Container();
this.CotentData = new System.Windows.Forms.DataGridView();
this.ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.deviceNoDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.readKindDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.contentDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.logTimeDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.rFIDContentBindingSource = new System.Windows.Forms.BindingSource(this.components);
this.IPText = new System.Windows.Forms.TextBox();
this.SetAddress = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.PortText = new System.Windows.Forms.TextBox();
this.MonitorOnOff = new System.Windows.Forms.Button();
this.label4 = new System.Windows.Forms.Label();
this.MonitorState = new System.Windows.Forms.Label();
@ -47,6 +48,8 @@
this.label3 = new System.Windows.Forms.Label();
this.LogStart = new System.Windows.Forms.Button();
this.ControlGrupbox = new System.Windows.Forms.GroupBox();
this.label1 = new System.Windows.Forms.Label();
this.comboBox1 = new System.Windows.Forms.ComboBox();
this.BinAudlt = new System.Windows.Forms.Button();
this.label2 = new System.Windows.Forms.Label();
this.ConnectCountLabel = new System.Windows.Forms.Label();
@ -69,11 +72,6 @@
this.label8 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.deviceNoDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.readKindDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.contentDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.logTimeDataGridViewTextBoxColumn = new System.Windows.Forms.DataGridViewTextBoxColumn();
((System.ComponentModel.ISupportInitialize)(this.CotentData)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.rFIDContentBindingSource)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.rFIDStateBindingSource)).BeginInit();
@ -110,60 +108,63 @@
this.CotentData.RowHeadersVisible = false;
this.CotentData.RowHeadersWidth = 51;
this.CotentData.RowTemplate.Height = 17;
this.CotentData.Size = new System.Drawing.Size(775, 703);
this.CotentData.Size = new System.Drawing.Size(774, 799);
this.CotentData.TabIndex = 0;
//
// ID
//
this.ID.DataPropertyName = "ID";
this.ID.HeaderText = "编号";
this.ID.Name = "ID";
this.ID.ReadOnly = true;
this.ID.Width = 40;
//
// deviceNoDataGridViewTextBoxColumn
//
this.deviceNoDataGridViewTextBoxColumn.DataPropertyName = "DeviceNo";
this.deviceNoDataGridViewTextBoxColumn.HeaderText = "格口";
this.deviceNoDataGridViewTextBoxColumn.MinimumWidth = 6;
this.deviceNoDataGridViewTextBoxColumn.Name = "deviceNoDataGridViewTextBoxColumn";
this.deviceNoDataGridViewTextBoxColumn.ReadOnly = true;
this.deviceNoDataGridViewTextBoxColumn.Width = 40;
//
// readKindDataGridViewTextBoxColumn
//
this.readKindDataGridViewTextBoxColumn.DataPropertyName = "ReadKind";
this.readKindDataGridViewTextBoxColumn.HeaderText = "读码结果";
this.readKindDataGridViewTextBoxColumn.MinimumWidth = 6;
this.readKindDataGridViewTextBoxColumn.Name = "readKindDataGridViewTextBoxColumn";
this.readKindDataGridViewTextBoxColumn.ReadOnly = true;
this.readKindDataGridViewTextBoxColumn.Width = 60;
//
// contentDataGridViewTextBoxColumn
//
this.contentDataGridViewTextBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.contentDataGridViewTextBoxColumn.DataPropertyName = "Content";
this.contentDataGridViewTextBoxColumn.HeaderText = "条码内容";
this.contentDataGridViewTextBoxColumn.MinimumWidth = 6;
this.contentDataGridViewTextBoxColumn.Name = "contentDataGridViewTextBoxColumn";
this.contentDataGridViewTextBoxColumn.ReadOnly = true;
//
// logTimeDataGridViewTextBoxColumn
//
this.logTimeDataGridViewTextBoxColumn.DataPropertyName = "LogTime";
this.logTimeDataGridViewTextBoxColumn.HeaderText = "读取时间";
this.logTimeDataGridViewTextBoxColumn.MinimumWidth = 6;
this.logTimeDataGridViewTextBoxColumn.Name = "logTimeDataGridViewTextBoxColumn";
this.logTimeDataGridViewTextBoxColumn.ReadOnly = true;
this.logTimeDataGridViewTextBoxColumn.Width = 105;
//
// rFIDContentBindingSource
//
this.rFIDContentBindingSource.DataSource = typeof(HighWayIot.Repository.domain.RFIDContent);
//
// IPText
//
this.IPText.Location = new System.Drawing.Point(117, 28);
this.IPText.Margin = new System.Windows.Forms.Padding(2);
this.IPText.MaxLength = 20;
this.IPText.Name = "IPText";
this.IPText.Size = new System.Drawing.Size(98, 21);
this.IPText.TabIndex = 7;
this.IPText.Text = "127.0.0.1";
//
// SetAddress
//
this.SetAddress.Location = new System.Drawing.Point(268, 15);
this.SetAddress.Margin = new System.Windows.Forms.Padding(2);
this.SetAddress.Name = "SetAddress";
this.SetAddress.Size = new System.Drawing.Size(105, 45);
this.SetAddress.TabIndex = 6;
this.SetAddress.Text = "确认服务端地址";
this.SetAddress.UseVisualStyleBackColor = true;
this.SetAddress.Click += new System.EventHandler(this.SetPort_Click);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(12, 32);
this.label1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(101, 12);
this.label1.TabIndex = 1;
this.label1.Text = "服务端IP端口号";
//
// PortText
//
this.PortText.Location = new System.Drawing.Point(219, 28);
this.PortText.Margin = new System.Windows.Forms.Padding(2);
this.PortText.MaxLength = 6;
this.PortText.Name = "PortText";
this.PortText.Size = new System.Drawing.Size(45, 21);
this.PortText.TabIndex = 0;
this.PortText.Text = "1234";
//
// MonitorOnOff
//
this.MonitorOnOff.Location = new System.Drawing.Point(5, 64);
this.MonitorOnOff.Location = new System.Drawing.Point(5, 19);
this.MonitorOnOff.Margin = new System.Windows.Forms.Padding(2);
this.MonitorOnOff.Name = "MonitorOnOff";
this.MonitorOnOff.Size = new System.Drawing.Size(159, 45);
this.MonitorOnOff.Size = new System.Drawing.Size(165, 45);
this.MonitorOnOff.TabIndex = 7;
this.MonitorOnOff.Text = "启动监听";
this.MonitorOnOff.UseVisualStyleBackColor = true;
@ -172,7 +173,7 @@
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(13, 118);
this.label4.Location = new System.Drawing.Point(19, 81);
this.label4.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(65, 12);
@ -183,7 +184,7 @@
//
this.MonitorState.AutoSize = true;
this.MonitorState.BackColor = System.Drawing.Color.Transparent;
this.MonitorState.Location = new System.Drawing.Point(82, 118);
this.MonitorState.Location = new System.Drawing.Point(88, 81);
this.MonitorState.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.MonitorState.Name = "MonitorState";
this.MonitorState.Size = new System.Drawing.Size(17, 12);
@ -218,7 +219,7 @@
// PgDn
//
this.PgDn.Dock = System.Windows.Forms.DockStyle.Right;
this.PgDn.Location = new System.Drawing.Point(682, 17);
this.PgDn.Location = new System.Drawing.Point(276, 17);
this.PgDn.Margin = new System.Windows.Forms.Padding(2);
this.PgDn.Name = "PgDn";
this.PgDn.Size = new System.Drawing.Size(96, 45);
@ -256,10 +257,10 @@
//
// LogStart
//
this.LogStart.Location = new System.Drawing.Point(268, 64);
this.LogStart.Location = new System.Drawing.Point(275, 20);
this.LogStart.Margin = new System.Windows.Forms.Padding(2);
this.LogStart.Name = "LogStart";
this.LogStart.Size = new System.Drawing.Size(105, 45);
this.LogStart.Size = new System.Drawing.Size(95, 43);
this.LogStart.TabIndex = 16;
this.LogStart.Text = "日志查询";
this.LogStart.UseVisualStyleBackColor = true;
@ -268,6 +269,8 @@
// ControlGrupbox
//
this.ControlGrupbox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.ControlGrupbox.Controls.Add(this.label1);
this.ControlGrupbox.Controls.Add(this.comboBox1);
this.ControlGrupbox.Controls.Add(this.BinAudlt);
this.ControlGrupbox.Controls.Add(this.label2);
this.ControlGrupbox.Controls.Add(this.ConnectCountLabel);
@ -275,22 +278,38 @@
this.ControlGrupbox.Controls.Add(this.MonitorOnOff);
this.ControlGrupbox.Controls.Add(this.label4);
this.ControlGrupbox.Controls.Add(this.MonitorState);
this.ControlGrupbox.Controls.Add(this.IPText);
this.ControlGrupbox.Controls.Add(this.PortText);
this.ControlGrupbox.Controls.Add(this.SetAddress);
this.ControlGrupbox.Controls.Add(this.label1);
this.ControlGrupbox.Location = new System.Drawing.Point(799, 12);
this.ControlGrupbox.Location = new System.Drawing.Point(798, 12);
this.ControlGrupbox.Name = "ControlGrupbox";
this.ControlGrupbox.Size = new System.Drawing.Size(375, 163);
this.ControlGrupbox.Size = new System.Drawing.Size(375, 144);
this.ControlGrupbox.TabIndex = 17;
this.ControlGrupbox.TabStop = false;
this.ControlGrupbox.Text = "控制面板";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("宋体", 12F);
this.label1.Location = new System.Drawing.Point(18, 111);
this.label1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(87, 16);
this.label1.TabIndex = 27;
this.label1.Text = "线体选择:";
//
// comboBox1
//
this.comboBox1.Font = new System.Drawing.Font("宋体", 12F);
this.comboBox1.FormattingEnabled = true;
this.comboBox1.Location = new System.Drawing.Point(110, 107);
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(146, 24);
this.comboBox1.TabIndex = 26;
//
// BinAudlt
//
this.BinAudlt.Location = new System.Drawing.Point(218, 114);
this.BinAudlt.Location = new System.Drawing.Point(175, 20);
this.BinAudlt.Name = "BinAudlt";
this.BinAudlt.Size = new System.Drawing.Size(151, 43);
this.BinAudlt.Size = new System.Drawing.Size(95, 43);
this.BinAudlt.TabIndex = 25;
this.BinAudlt.Text = "格口盘点";
this.BinAudlt.UseVisualStyleBackColor = true;
@ -299,7 +318,7 @@
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(13, 140);
this.label2.Location = new System.Drawing.Point(118, 81);
this.label2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(65, 12);
@ -310,7 +329,7 @@
//
this.ConnectCountLabel.AutoSize = true;
this.ConnectCountLabel.BackColor = System.Drawing.Color.Transparent;
this.ConnectCountLabel.Location = new System.Drawing.Point(82, 140);
this.ConnectCountLabel.Location = new System.Drawing.Point(187, 81);
this.ConnectCountLabel.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.ConnectCountLabel.Name = "ConnectCountLabel";
this.ConnectCountLabel.Size = new System.Drawing.Size(11, 12);
@ -324,23 +343,22 @@
| System.Windows.Forms.AnchorStyles.Right)));
this.MainReadGroupBox.AutoSize = true;
this.MainReadGroupBox.Controls.Add(this.CotentData);
this.MainReadGroupBox.Location = new System.Drawing.Point(12, 83);
this.MainReadGroupBox.Location = new System.Drawing.Point(12, 12);
this.MainReadGroupBox.Name = "MainReadGroupBox";
this.MainReadGroupBox.Size = new System.Drawing.Size(781, 723);
this.MainReadGroupBox.Size = new System.Drawing.Size(780, 819);
this.MainReadGroupBox.TabIndex = 18;
this.MainReadGroupBox.TabStop = false;
this.MainReadGroupBox.Text = "数据监控(此界面多200条全部数据在日志查询中查询";
this.MainReadGroupBox.Text = "数据监控(此界面多200条全部数据在日志查询中查询";
//
// PageGroupBox
//
this.PageGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.PageGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.PageGroupBox.Controls.Add(this.panel1);
this.PageGroupBox.Controls.Add(this.PgDn);
this.PageGroupBox.Controls.Add(this.PgUp);
this.PageGroupBox.Location = new System.Drawing.Point(12, 12);
this.PageGroupBox.Location = new System.Drawing.Point(798, 162);
this.PageGroupBox.Name = "PageGroupBox";
this.PageGroupBox.Size = new System.Drawing.Size(781, 65);
this.PageGroupBox.Size = new System.Drawing.Size(375, 65);
this.PageGroupBox.TabIndex = 0;
this.PageGroupBox.TabStop = false;
this.PageGroupBox.Text = "页码控制";
@ -351,7 +369,7 @@
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(98, 17);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(584, 45);
this.panel1.Size = new System.Drawing.Size(178, 45);
this.panel1.TabIndex = 16;
//
// panel2
@ -359,7 +377,7 @@
this.panel2.Anchor = System.Windows.Forms.AnchorStyles.None;
this.panel2.Controls.Add(this.PageRange);
this.panel2.Controls.Add(this.label3);
this.panel2.Location = new System.Drawing.Point(197, 3);
this.panel2.Location = new System.Drawing.Point(-3, 3);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(190, 39);
this.panel2.TabIndex = 16;
@ -379,9 +397,9 @@
this.groupBox1.Controls.Add(this.label8);
this.groupBox1.Controls.Add(this.label7);
this.groupBox1.Controls.Add(this.label5);
this.groupBox1.Location = new System.Drawing.Point(799, 181);
this.groupBox1.Location = new System.Drawing.Point(798, 233);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(375, 625);
this.groupBox1.Size = new System.Drawing.Size(375, 598);
this.groupBox1.TabIndex = 19;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "状态面板";
@ -450,7 +468,7 @@
this.groupBox3.Location = new System.Drawing.Point(6, 202);
this.groupBox3.Margin = new System.Windows.Forms.Padding(3, 15, 3, 3);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(363, 423);
this.groupBox3.Size = new System.Drawing.Size(363, 390);
this.groupBox3.TabIndex = 6;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "异常统计最近200条";
@ -470,7 +488,7 @@
this.ErrorCountDataGridView.ReadOnly = true;
this.ErrorCountDataGridView.RowHeadersVisible = false;
this.ErrorCountDataGridView.RowTemplate.Height = 17;
this.ErrorCountDataGridView.Size = new System.Drawing.Size(357, 403);
this.ErrorCountDataGridView.Size = new System.Drawing.Size(357, 370);
this.ErrorCountDataGridView.TabIndex = 0;
//
// BinNo
@ -543,56 +561,12 @@
this.label5.TabIndex = 0;
this.label5.Text = "工作状态:";
//
// ID
//
this.ID.DataPropertyName = "ID";
this.ID.HeaderText = "编号";
this.ID.Name = "ID";
this.ID.ReadOnly = true;
this.ID.Width = 40;
//
// deviceNoDataGridViewTextBoxColumn
//
this.deviceNoDataGridViewTextBoxColumn.DataPropertyName = "DeviceNo";
this.deviceNoDataGridViewTextBoxColumn.HeaderText = "格口";
this.deviceNoDataGridViewTextBoxColumn.MinimumWidth = 6;
this.deviceNoDataGridViewTextBoxColumn.Name = "deviceNoDataGridViewTextBoxColumn";
this.deviceNoDataGridViewTextBoxColumn.ReadOnly = true;
this.deviceNoDataGridViewTextBoxColumn.Width = 40;
//
// readKindDataGridViewTextBoxColumn
//
this.readKindDataGridViewTextBoxColumn.DataPropertyName = "ReadKind";
this.readKindDataGridViewTextBoxColumn.HeaderText = "读码结果";
this.readKindDataGridViewTextBoxColumn.MinimumWidth = 6;
this.readKindDataGridViewTextBoxColumn.Name = "readKindDataGridViewTextBoxColumn";
this.readKindDataGridViewTextBoxColumn.ReadOnly = true;
this.readKindDataGridViewTextBoxColumn.Width = 60;
//
// contentDataGridViewTextBoxColumn
//
this.contentDataGridViewTextBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
this.contentDataGridViewTextBoxColumn.DataPropertyName = "Content";
this.contentDataGridViewTextBoxColumn.HeaderText = "条码内容";
this.contentDataGridViewTextBoxColumn.MinimumWidth = 6;
this.contentDataGridViewTextBoxColumn.Name = "contentDataGridViewTextBoxColumn";
this.contentDataGridViewTextBoxColumn.ReadOnly = true;
//
// logTimeDataGridViewTextBoxColumn
//
this.logTimeDataGridViewTextBoxColumn.DataPropertyName = "LogTime";
this.logTimeDataGridViewTextBoxColumn.HeaderText = "读取时间";
this.logTimeDataGridViewTextBoxColumn.MinimumWidth = 6;
this.logTimeDataGridViewTextBoxColumn.Name = "logTimeDataGridViewTextBoxColumn";
this.logTimeDataGridViewTextBoxColumn.ReadOnly = true;
this.logTimeDataGridViewTextBoxColumn.Width = 105;
//
// RFIDSocket
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.AutoScroll = true;
this.ClientSize = new System.Drawing.Size(1186, 817);
this.ClientSize = new System.Drawing.Size(1185, 842);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.PageGroupBox);
this.Controls.Add(this.MainReadGroupBox);
@ -625,14 +599,10 @@
#endregion
private System.Windows.Forms.DataGridView CotentData;
private System.Windows.Forms.Button SetAddress;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox PortText;
private System.Windows.Forms.Button MonitorOnOff;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label MonitorState;
private System.Windows.Forms.Timer TableTimer;
private System.Windows.Forms.TextBox IPText;
private System.Windows.Forms.BindingSource rFIDContentBindingSource;
private System.Windows.Forms.BindingSource rFIDStateBindingSource;
private System.Windows.Forms.BindingSource rFIDHeartbeatBindingSource;
@ -669,6 +639,8 @@
private System.Windows.Forms.DataGridViewTextBoxColumn readKindDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn contentDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn logTimeDataGridViewTextBoxColumn;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.ComboBox comboBox1;
}
}

@ -1,4 +1,5 @@
using HighWayIot.Repository.domain;
using HighWayIot.Common;
using HighWayIot.Repository.domain;
using HighWayIot.TouchSocket;
using System;
using System.Collections.Generic;
@ -21,10 +22,7 @@ namespace RFIDSocket
private static ServerDataAnalysis RFIDData = ServerDataAnalysis.Instance;
Configuration Config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
string Port = string.Empty;
string IP = string.Empty;
XmlUtil _xmlUtil = XmlUtil.Instance;
int PageNo = 1;
@ -50,12 +48,6 @@ namespace RFIDSocket
MonitorState.Text = "开";
MonitorState.BackColor = Color.LightGreen;
}
IPText.Text = ConfigurationManager.AppSettings["IpSetting"];
PortText.Text = ConfigurationManager.AppSettings["PortSetting"];
Port = PortText.Text;
IP = IPText.Text;
}
/// <summary>
@ -67,7 +59,7 @@ namespace RFIDSocket
{
if (Server.State != ServerState.Running)
{
if (Server.ServerStart(IP, Port))
if (Server.ServerStart(_xmlUtil.ServerReader()))
{
MessageBox.Show("监听服务启动成功如更改ip端口号请重新启动监听");
TableTimer.Enabled = true;
@ -91,21 +83,6 @@ namespace RFIDSocket
}
}
/// <summary>
/// 服务端IP端口设置
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void SetPort_Click(object sender, EventArgs e)
{
Config.AppSettings.Settings["IpSetting"].Value = IPText.Text;
Config.AppSettings.Settings["PortSetting"].Value = PortText.Text;
Config.Save();
Port = PortText.Text;
IP = IPText.Text;
MessageBox.Show("服务端IP端口号设置成功");
}
/// <summary>
/// Timer刷新
/// </summary>

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\EntityFramework.6.4.4\build\EntityFramework.props" Condition="Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@ -29,6 +30,8 @@
<UseApplicationTrust>false</UseApplicationTrust>
<PublishWizardCompleted>true</PublishWizardCompleted>
<BootstrapperEnabled>true</BootstrapperEnabled>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
@ -59,7 +62,7 @@
<GenerateManifests>true</GenerateManifests>
</PropertyGroup>
<PropertyGroup>
<SignManifests>true</SignManifests>
<SignManifests>false</SignManifests>
</PropertyGroup>
<PropertyGroup>
<TargetZone>LocalIntranet</TargetZone>
@ -67,10 +70,19 @@
<PropertyGroup>
<ApplicationManifest>Properties\app.manifest</ApplicationManifest>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>false</SignAssembly>
</PropertyGroup>
<ItemGroup>
<Reference Include="BouncyCastle.Cryptography, Version=2.0.0.0, Culture=neutral, PublicKeyToken=072edcf4a5328938, processorArchitecture=MSIL">
<HintPath>..\packages\BouncyCastle.Cryptography.2.3.1\lib\net461\BouncyCastle.Cryptography.dll</HintPath>
</Reference>
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.dll</HintPath>
</Reference>
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.SqlServer.dll</HintPath>
</Reference>
<Reference Include="Google.Protobuf, Version=3.26.1.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<HintPath>..\packages\Google.Protobuf.3.26.1\lib\net45\Google.Protobuf.dll</HintPath>
</Reference>
@ -93,14 +105,20 @@
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
</Reference>
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Configuration" />
<Reference Include="System.Configuration.ConfigurationManager, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Configuration.ConfigurationManager.8.0.0\lib\net462\System.Configuration.ConfigurationManager.dll</HintPath>
</Reference>
<Reference Include="System.Core" />
<Reference Include="System.Data.SQLite, Version=1.0.102.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\Dll\System.Data.SQLite.dll</HintPath>
<Reference Include="System.Data.SQLite, Version=1.0.119.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<HintPath>..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.119.0\lib\net46\System.Data.SQLite.dll</HintPath>
</Reference>
<Reference Include="System.Data.SQLite.EF6, Version=1.0.119.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<HintPath>..\packages\System.Data.SQLite.EF6.1.0.119.0\lib\net46\System.Data.SQLite.EF6.dll</HintPath>
</Reference>
<Reference Include="System.Data.SQLite.Linq, Version=1.0.119.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
<HintPath>..\packages\System.Data.SQLite.Linq.1.0.119.0\lib\net46\System.Data.SQLite.Linq.dll</HintPath>
</Reference>
<Reference Include="System.Diagnostics.DiagnosticSource, Version=8.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Diagnostics.DiagnosticSource.8.0.1\lib\net462\System.Diagnostics.DiagnosticSource.dll</HintPath>
@ -217,6 +235,10 @@
</None>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\HighWayIot.Common\HighWayIot.Common.csproj">
<Project>{89a1edd9-d79e-468d-b6d3-7d07b8843562}</Project>
<Name>HighWayIot.Common</Name>
</ProjectReference>
<ProjectReference Include="..\HighWayIot.Log4net\HighWayIot.Log4net.csproj">
<Project>{DEABC30C-EC6F-472E-BD67-D65702FDAF74}</Project>
<Name>HighWayIot.Log4net</Name>
@ -246,6 +268,9 @@
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<Content Include="RFIDConfiguration.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Configuration.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
@ -254,4 +279,14 @@
</Content>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.4\build\EntityFramework.props'))" />
<Error Condition="!Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.4\build\EntityFramework.targets'))" />
<Error Condition="!Exists('..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.119.0\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.119.0\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets'))" />
</Target>
<Import Project="..\packages\EntityFramework.6.4.4\build\EntityFramework.targets" Condition="Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" />
<Import Project="..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.119.0\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets" Condition="Exists('..\packages\Stub.System.Data.SQLite.Core.NetFramework.1.0.119.0\build\net46\Stub.System.Data.SQLite.Core.NetFramework.targets')" />
</Project>

@ -123,6 +123,9 @@
<metadata name="rFIDContentBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>159, 17</value>
</metadata>
<metadata name="ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="rFIDContentBindingSource.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>159, 17</value>
</metadata>
@ -147,7 +150,4 @@
<metadata name="ErrorCount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

@ -1,14 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="BouncyCastle.Cryptography" version="2.3.1" targetFramework="net48" />
<package id="EntityFramework" version="6.4.4" targetFramework="net48" />
<package id="Google.Protobuf" version="3.26.1" targetFramework="net48" />
<package id="K4os.Compression.LZ4" version="1.3.8" targetFramework="net48" />
<package id="K4os.Compression.LZ4.Streams" version="1.3.8" targetFramework="net48" />
<package id="K4os.Hash.xxHash" version="1.0.8" targetFramework="net48" />
<package id="Microsoft.Bcl.AsyncInterfaces" version="5.0.0" targetFramework="net48" />
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net48" />
<package id="Stub.System.Data.SQLite.Core.NetFramework" version="1.0.119.0" targetFramework="net48" />
<package id="System.Buffers" version="4.5.1" targetFramework="net48" />
<package id="System.Configuration.ConfigurationManager" version="8.0.0" targetFramework="net48" />
<package id="System.Data.SQLite" version="1.0.119.0" targetFramework="net48" />
<package id="System.Data.SQLite.Core" version="1.0.119.0" targetFramework="net48" />
<package id="System.Data.SQLite.EF6" version="1.0.119.0" targetFramework="net48" />
<package id="System.Data.SQLite.Linq" version="1.0.119.0" targetFramework="net48" />
<package id="System.Diagnostics.DiagnosticSource" version="8.0.1" targetFramework="net48" />
<package id="System.IO.Pipelines" version="5.0.2" targetFramework="net48" />
<package id="System.Memory" version="4.5.5" targetFramework="net48" />

Loading…
Cancel
Save