![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
c#
jena_wy
这个作者很懒,什么都没留下…
展开
-
c#禁止重复点击button
btn.IsEnabled = false; this.Cursor = Cursors.Wait; Check(info); btn.IsEnabled = true; this.Cursor = Cursors.Arrow;原创 2022-04-12 11:59:26 · 1881 阅读 · 0 评论 -
c#自动换Table和自动换行
tabGrid.SelectedIndex = 0; System.Windows.Forms.Application.DoEvents(); foreach (Excel429Info item in dataGrid10.ItemsSource) { Check(item); dataGrid10.SelectedItem = item; ...原创 2022-04-12 11:57:21 · 632 阅读 · 0 评论 -
C#中的串口读写
问题描述:做项目时用到了串口读写,将扫码枪的数据显示到界面上。虽然很简单,但对于编程瓜皮的我,还是记录下来,方便以后学习。。。public class{ public static SerialPort serialPort = null;public delegate void showScanerTrayNumEventHandler();public static event showScanerTrayNumEventHandler showScanerTrayNum;...转载 2020-09-14 09:15:39 · 1541 阅读 · 0 评论 -
c#读xml
XmlDocument DocICD; SystemCollection sysColl; void ReadHRICDFile(string Path) { if (string.IsNullOrEmpty(Path)) { return; } sysColl = new SystemCollection(); ...原创 2020-06-18 15:25:41 · 139 阅读 · 0 评论 -
c#写xml
public static bool CreateMapXml_HR(SystemInfo si) { try { ICDCollection SendICDColl = new ICDCollection(); //ICDCollection RecieveICDColl = new ICDCollection(); if (si.BlockC...原创 2020-06-18 15:23:11 · 154 阅读 · 0 评论 -
echartsjs网址
https://www.echartsjs.com/examples/zh/index.html转载 2020-02-19 02:52:48 · 2451 阅读 · 0 评论 -
c#doule 与byte数组转换
double dd = 3.14; byte []bb = BitConverter.GetBytes(dd); //double转byte数组 double ddd = BitConverter.ToDouble(bb,0); //byte数组转double原创 2019-12-16 18:36:11 · 3682 阅读 · 0 评论 -
c#写文件
StreamWriter sw = new StreamWriter(AppDomain.CurrentDomain.BaseDirectory + "test.txt", false, Encoding.Default); sw.WriteLine("test");原创 2019-10-31 19:39:42 · 130 阅读 · 0 评论 -
c#读文件
StreamReader aa = new StreamReader(filename, Encoding.ASCII); string line = ""; while ((line = aa.ReadLine()) != null) { if (lin...原创 2019-10-31 15:44:28 · 89 阅读 · 0 评论 -
c#去掉字符串的\0
"\0\0\053"得到"53"string data[i] ="\0\0\053";data[i] = new string((from c in data[i].ToCharArray() where !char.IsControl(c) select c).ToArray());原创 2019-10-31 15:17:04 · 4782 阅读 · 0 评论 -
c#字符串转十六进制
"14"得到20private static byte HexStringToByte(string str) { byte bt; if (str != "") { bt = Convert.ToByte(str, 16); retur...原创 2019-10-31 15:13:03 · 1149 阅读 · 0 评论 -
string 转double
string str ="3.14";double data = Convert.ToDouble(str);double data1 = double.Parse(str);原创 2019-10-12 09:07:23 · 2135 阅读 · 0 评论 -
byte[]转string
byte []buff =new byte[1024];string ss1 = System.Text.Encoding.UTF8.GetString(buff);原创 2019-10-12 09:00:31 · 84 阅读 · 0 评论 -
c# 字符串分割
string s = "123,345,678";string []arry = s.Split(',');原创 2019-10-12 08:22:31 · 106 阅读 · 0 评论