摘要: // Restart current process Method 1 System.Windows.Forms.Application.Restart(); Application.Current.Shutdown(); // Restart current process Method 2 Sy 阅读全文
posted @ 2020-04-28 18:45 搬砖的L先生 阅读(900) 评论(0) 推荐(0)
摘要: HwndSource hwndSource = PresentationSource.FromVisual(this) as HwndSource;//窗口过程 if (hwndSource != null) { hwndSource.AddHook(new HwndSourceHook(Devei 阅读全文
posted @ 2019-12-31 14:19 搬砖的L先生 阅读(1168) 评论(0) 推荐(0)
摘要: /// /// GB2312转换成UTF8 /// /// /// public static string gb2312_utf8(string text) { //声明字符集 System.Text.Encoding utf8, gb2312; //gb2312 gb2312 = System. 阅读全文
posted @ 2019-12-20 16:32 搬砖的L先生 阅读(2095) 评论(0) 推荐(0)
摘要: ushort Tbed = 2255; byte gao = (byte)(Tbed 8); byte di = (byte)(Tbed & 0xff); ushort a = (ushort)(gao << 8); ushort b = (ushort)di; //ushort newBed = 阅读全文
posted @ 2019-12-19 15:56 搬砖的L先生 阅读(1526) 评论(0) 推荐(0)
摘要: [DllImport("psapi.dll")] private static extern int EmptyWorkingSet(int hProcess); public void HandleSetGC() { GC.Collect(); GC.WaitForPendingFinalizer 阅读全文
posted @ 2019-12-19 10:02 搬砖的L先生 阅读(722) 评论(0) 推荐(0)
摘要: 常碰到的几种数据结构:Array,ArrayList,List,LinkedList,Queue,Stack,Dictionary; 1.数组是最简单的数据结构。其具有如下特点: 数组存储在连续的内存上。 数组的内容都是相同类型。 数组可以直接通过下标访问。 创建一个新的数组时将在 CLR 托管堆中 阅读全文
posted @ 2019-11-18 09:46 搬砖的L先生 阅读(1788) 评论(0) 推荐(0)
摘要: 1、配置MySQL80的环境 安装好MySQL,为MySQL配置环境变量。MySQL默认安装在C:\Program Files下。 1)新建MYSQL_HOME变量,并配置:C:\Program Files\MySQL\MySQL Server 5.6 MYSQL_HOME:C:\Program F 阅读全文
posted @ 2019-11-15 16:14 搬砖的L先生 阅读(1171) 评论(0) 推荐(0)
摘要: 一:Conditional:条件特性,预定义了一个条件方法。 使用方法: [Conditional("DEBUG")] public void test() { MessageBox.Show("xxxx"); Console.WriteLine("xxxxxxx"); } 上述特性表示:只有处于D 阅读全文
posted @ 2019-11-14 16:01 搬砖的L先生 阅读(406) 评论(0) 推荐(0)
摘要: region 用于绑定ViewModel部分 public ICommand Command { get { return (ICommand)GetValue(CommandProperty); } set { SetValue(CommandProperty, value); } } // Us 阅读全文
posted @ 2019-11-13 21:38 搬砖的L先生 阅读(457) 评论(0) 推荐(0)
摘要: [TypeConverter(typeof(ExpandableObjectConverter))] public A MyA { get{..} set{..} } 阅读全文
posted @ 2019-11-13 10:18 搬砖的L先生 阅读(578) 评论(0) 推荐(0)