09 2020 档案
WPF 依赖属性
摘要:using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Text; using System.Threading.Tasks; using 阅读全文
posted @ 2020-09-25 11:55 永恒921 阅读(279) 评论(0) 推荐(0)
WPF 禁用窗体最大最小按键
摘要:/// <summary> /// 禁用窗体最大最小按键 /// </summary> internal static class WindowExtensions { [DllImport("user32.dll")] internal extern static int SetWindowLon 阅读全文
posted @ 2020-09-22 15:10 永恒921 阅读(430) 评论(0) 推荐(0)
C# 通过反射获取类/方法的属性描述
摘要:public class testDescrible { int _tt; [Description("123")] public int ttt { get { return _tt; } set { _tt = value; } } [Description("测试1")] public voi 阅读全文
posted @ 2020-09-22 14:37 永恒921 阅读(2339) 评论(0) 推荐(0)
C# 利用SendMessage实现winform与wpf之间的消息传递
摘要:WPF 接收初始化 /// <summary> /// 初始化窗体句柄消息接收函数 /// </summary> private void InitailWinHand() { HwndSource hWndSource; WindowInteropHelper wih = new WindowIn 阅读全文
posted @ 2020-09-22 12:29 永恒921 阅读(954) 评论(0) 推荐(0)
WPF Datagrid 点击选择item
摘要:public static object GetElementFromPoint(System.Windows.Controls.ItemsControl itemsControl, Point point) { UIElement element = itemsControl.InputHitTe 阅读全文
posted @ 2020-09-22 11:44 永恒921 阅读(656) 评论(0) 推荐(0)
C# 检测IP地址是否合法
摘要:/// <summary> /// 检测IP地址是否合法 /// </summary> /// <param name="strJudgeString"></param> /// <returns></returns> public static bool JudgeIPFormat(string 阅读全文
posted @ 2020-09-22 11:41 永恒921 阅读(683) 评论(0) 推荐(0)
C# 正则表达式数字匹配
摘要:/// <summary> /// 带小数点数字匹配 /// </summary> /// <param name="input"></param> /// <returns></returns> public static bool IsNumber(string input) { string 阅读全文
posted @ 2020-09-22 11:33 永恒921 阅读(6294) 评论(0) 推荐(0)