07 2022 档案

摘要:WPF 窗口大小自适应 在设置桌面不同分辨率以及较大DPI下,窗口如何显示的问题。 方案一 设置窗口最大值和最小值显示 通过对比当前屏幕的可显示区域,将窗口高宽最大值和最小值,设置为窗口的实际高宽(此例中仅设置高度) 界面设置 设置窗口内容自适应SizeToContent="WidthAndHeig 阅读全文
posted @ 2022-07-29 13:15 搬砖的L先生 阅读(285) 评论(0) 推荐(0) 编辑
摘要:<Window.Resources> </Window.Resources> 阅读全文
posted @ 2022-07-27 16:25 搬砖的L先生 阅读(351) 评论(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先生 阅读(254) 评论(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先生 阅读(128) 评论(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先生 阅读(341) 评论(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先生 阅读(1032) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示