2017年4月1日

存位置

摘要: public string Path = "C:\\Users\\" + Environment.UserName + "\\AppData\\Roaming\\ParaInfor.xml"; if (Path != null) { if (XmlSerializeHelper.Load(Path) 阅读全文

posted @ 2017-04-01 09:31 MILUMI 阅读(158) 评论(0) 推荐(0) 编辑

2017年3月30日

成功

摘要: byte[] RxBuffer; int length = 12; //结构体长度 void pt_DataReceived(object sender, PortDataReciveEventArgs e) { int loopIndex = 0; byte[] data = new byte[l 阅读全文

posted @ 2017-03-30 09:45 MILUMI 阅读(246) 评论(0) 推荐(0) 编辑

2017年3月28日

疯掉的拼接

摘要: //if (flag) //{ bytReceiveArray = e.Data; // flag = false; // num = bytReceiveArray.Length / by.Length; // renum = bytReceiveArray.Length % by.Length; 阅读全文

posted @ 2017-03-28 20:32 MILUMI 阅读(143) 评论(0) 推荐(0) 编辑

解析发送

摘要: //发送测试 dt = ParaToDataTableHelper.GetDataTable(); byte[] bytSendArray = new byte[1000]; //发送数据缓冲区 byte[] by = new byte[12]; //单条信息发送数组 int num = 5;//发 阅读全文

posted @ 2017-03-28 15:27 MILUMI 阅读(200) 评论(0) 推荐(0) 编辑

一条条发

摘要: comPort.Open(); //发送 dt = ParaToDataTableHelper.GetDataTable(); byte[] bytSendArray = new byte[100]; //发送数据缓冲区 SampRepInfor para = new SampRepInfor(); 阅读全文

posted @ 2017-03-28 15:26 MILUMI 阅读(208) 评论(0) 推荐(0) 编辑

com发送

摘要: comPort.Open(); //发送 dt = ParaToDataTableHelper.GetDataTable(); byte[] bytSendArray = new byte[100]; //发送数据缓冲区 SampRepInfor para = new SampRepInfor(); 阅读全文

posted @ 2017-03-28 10:29 MILUMI 阅读(285) 评论(0) 推荐(0) 编辑

字符串拼接

摘要: all = new byte[(by.Length + bytSendArray.Length)*20]; for (i = 0; i < 10; i++ ) { Buffer.BlockCopy(by, 0, all, i*(by.Length + bytSendArray.Length), by 阅读全文

posted @ 2017-03-28 10:25 MILUMI 阅读(123) 评论(0) 推荐(0) 编辑

2017年3月27日

COM

摘要: // byte[] bytSendArray = new byte[100]; //发送数据缓冲区 // for (int i = 0; i < 100; i++) // { // bytSendArray[i] = 0xAC; // } // //bytSendArray[1] = 0xAA; / 阅读全文

posted @ 2017-03-27 10:59 MILUMI 阅读(219) 评论(0) 推荐(0) 编辑

2017年3月22日

笨方法的combox级联

摘要: private void SuckRegion_SelectionChanged(object sender, SelectionChangedEventArgs e) { //var para = ViewModelHelper.SampArmMainWindowViewModel.SampArm 阅读全文

posted @ 2017-03-22 18:58 MILUMI 阅读(289) 评论(0) 推荐(0) 编辑

2017年2月27日

c# excel

摘要: C#读取Excel几种方法的体会 (1) OleDb: 用这种方法读取Excel速度还是非常的快的,但这种方式读取数据的时候不太灵活,不过可以在 DataTable 中对数据进行一些删减修改 优点:读取方式简单、读取速度快 缺点:除了读取过程不太灵活之外,这种读取方式还有个弊端就是,当Excel数据 阅读全文

posted @ 2017-02-27 11:07 MILUMI 阅读(203) 评论(0) 推荐(0) 编辑

导航