上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 56 下一页
摘要: public string GetLocalIPStr() { string localIP = string.Empty; using (Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, 0)) { s 阅读全文
posted @ 2022-12-09 13:34 double64 阅读(50) 评论(0) 推荐(0)
摘要: static void AddFileFix(string fileFullName, string prefix, string suffix) { try { if (string.IsNullOrEmpty(prefix) && string.IsNullOrEmpty(suffix)) { 阅读全文
posted @ 2022-12-09 13:30 double64 阅读(345) 评论(0) 推荐(0)
摘要: public class SerialNum { public SerialNum() { m_NumByteArr = new byte[4] { 48, 48, 48, 48 }; //m_NumByteArr = new byte[4] { 90, 90, 90, 90 }; ExcludeC 阅读全文
posted @ 2022-12-02 18:06 double64 阅读(290) 评论(0) 推荐(0)
摘要: BitConverter 类进行字节转换——MSDN byte[] dd = BitConverter.GetBytes(49490); // 转换出来的是:低位在前,高位在后,也就是 ABCD Console.WriteLine(BitConverter.ToInt32(dd, 0)); dd = 阅读全文
posted @ 2022-11-26 09:23 double64 阅读(2055) 评论(0) 推荐(0)
摘要: 一般而言: **输入寄存器:**输入寄存器的值对于master来说就只能读取。 // 只读 **保持型寄存器:**值可以读取也可以修改。// 可读可写 阅读全文
posted @ 2022-11-25 11:58 double64 阅读(1468) 评论(0) 推荐(0)
摘要: public static void ForceClearDir(string dirPath) { DirectoryInfo dirInfo = new DirectoryInfo(dirPath); dirInfo.Delete(true); } 注:path是你要删除的非空目录; true: 阅读全文
posted @ 2022-11-24 09:57 double64 阅读(265) 评论(0) 推荐(0)
摘要: 文件夹路径最好用微软的反斜杠\\形式。 public void BackUpFiles(string srcDir, string dstDir) { Directory.CreateDirectory(dstDir); if (!Directory.Exists(srcDir)) { return 阅读全文
posted @ 2022-11-23 17:10 double64 阅读(505) 评论(0) 推荐(0)
摘要: 用这个: lstbDynamicNote.ScrollIntoView(lstbDynamicNote.Items[lstbDynamicNote.Items.Count - 1]); private void DynamicNoteShow(string dynamicNote) { if (ls 阅读全文
posted @ 2022-11-22 18:32 double64 阅读(590) 评论(0) 推荐(1)
摘要: 续这篇测试:https://www.cnblogs.com/huvjie/p/16909290.html 测试页面: <Window x:Class="MyWPFSimple3.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xa 阅读全文
posted @ 2022-11-20 20:18 double64 阅读(93) 评论(0) 推荐(0)
摘要: ViewModel: 测试:这样子赋值是没问题,绑定能找到派生类元素: public MainWindow() { InitializeComponent(); Myc myc = new VMMainWindow(); DataContext = myc; } CS: public class V 阅读全文
posted @ 2022-11-20 20:00 double64 阅读(42) 评论(0) 推荐(0)
上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 56 下一页