上一页 1 2 3 4 5 6 ··· 9 下一页
摘要: private string hexStrToStr(string str) { //去除字符串中的空格 string[] strT = str.Split(' '); string strA = ""; foreach (string strB in strT) { strA += strB; } 阅读全文
posted @ 2022-08-16 18:09 搬砖的L先生 阅读(461) 评论(0) 推荐(0) 编辑
摘要: WPF 窗口大小自适应 在设置桌面不同分辨率以及较大DPI下,窗口如何显示的问题。 方案一 设置窗口最大值和最小值显示 通过对比当前屏幕的可显示区域,将窗口高宽最大值和最小值,设置为窗口的实际高宽(此例中仅设置高度) 界面设置 设置窗口内容自适应SizeToContent="WidthAndHeig 阅读全文
posted @ 2022-07-29 13:15 搬砖的L先生 阅读(190) 评论(0) 推荐(0) 编辑
摘要: <Window.Resources> </Window.Resources> 阅读全文
posted @ 2022-07-27 16:25 搬砖的L先生 阅读(298) 评论(0) 推荐(0) 编辑
摘要: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System. 阅读全文
posted @ 2022-07-22 10:31 搬砖的L先生 阅读(217) 评论(0) 推荐(0) 编辑
摘要: public void TestA() { int time = 1658310821; string str = time.ToString("X4"); byte[] testb = strToHexByte(str); } /// <summary> /// 16进制字符串转换成16进制byt 阅读全文
posted @ 2022-07-20 10:03 搬砖的L先生 阅读(113) 评论(0) 推荐(0) 编辑
摘要: public void Test() { byte[] results = new byte[1]; results[0] = 0xff; int temp = results[0]; byte b = SetBit(results[0], 7, 0); Console.WriteLine(b); 阅读全文
posted @ 2022-07-19 17:43 搬砖的L先生 阅读(293) 评论(0) 推荐(0) 编辑
摘要: /// /// 获取字节中的指定Bit的值 /// /// 字节 /// Bit的索引值(0-7) /// public int GetBit(byte test, int index) { byte x = 1; switch (index) { case 0: { x = 0x01; } bre 阅读全文
posted @ 2022-07-19 17:30 搬砖的L先生 阅读(936) 评论(0) 推荐(0) 编辑
摘要: using System.Web; 引用system.web。 textBox2.Text = System.Web.HttpUtility.UrlDecode(textBox1.Text, System.Text.Encoding.GetEncoding("GB2312"));//将Url中的编码 阅读全文
posted @ 2022-05-26 14:56 搬砖的L先生 阅读(1097) 评论(0) 推荐(0) 编辑
摘要: WPF程序最大化被任务栏遮挡的解决办法 this.MaxHeight = SystemParameters.MaximizedPrimaryScreenHeight; this.MaxWidth = SystemParameters.MaximizedPrimaryScreenWidth; WINF 阅读全文
posted @ 2022-05-05 13:26 搬砖的L先生 阅读(576) 评论(0) 推荐(1) 编辑
摘要: ... 阅读全文
posted @ 2021-11-05 15:48 搬砖的L先生 阅读(17) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 9 下一页