摘要: //获取程序的基目录。System.AppDomain.CurrentDomain.BaseDirectory//获取模块的完整路径。System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName//获取和设置当前目录(该进程从中启动的目录)的完全限定目录。System.Environment.CurrentDirectory//获取应用程序的当前工作目录。System.IO.Directory.GetCurrentDirectory()//获取和设置包括该应用程序的目录的名称。System.AppDomain.Curren 阅读全文
posted @ 2013-08-08 10:00 Thyiad 阅读(181) 评论(0) 推荐(0) 编辑
摘要: .netFramework4.0中对读取64位注册表做了支持,只需要一个RegistryView:RegistryKey localMachine = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry64); 阅读全文
posted @ 2013-08-08 09:56 Thyiad 阅读(168) 评论(0) 推荐(0) 编辑
摘要: RT,不赘述,代码以下: 1 const int WM_SYSCOMMAND = 0x112; 2 const int SC_CLOSE = 0xF060; 3 const int SC_MINIMIZE = 0xF020; 4 const int SC_MAXIMIZE = 0xF030; 5 protected override void WndProc(ref Message m) 6 { 7 if (m.Msg == WM_SYSCOMMAND) 8 { 9 if (m.WParam.ToInt32() == SC_MINIMIZE) 10 ... 阅读全文
posted @ 2013-08-08 09:27 Thyiad 阅读(240) 评论(0) 推荐(0) 编辑
摘要: 之前在做一个任务时, 需要比较字符串的相似度, 最终整理了一个出来, 以下: 1 /* 2 * Copyright (c) 2013 Thyiad 3 * Author: Thyiad 4 * Create date: 2013/08/08 5 */ 6 7 using System; 8 9 namespace Thyiad.Utility 10 { 11 /// 12 /// Operates about string. 13 /// 14 public static class StringUtil 15 { 16... 阅读全文
posted @ 2013-08-08 09:15 Thyiad 阅读(265) 评论(0) 推荐(0) 编辑
摘要: 决定从今天开始, 记录一下工作和生活中碰到的点点滴滴。包括工作中遇见并纠结过的一些问题啦,还有总结过的一些代码, 都准备慢慢的贴上来做个标记先以代码为主, 如果有帮助的话可以留个言 - -如果有问题的话,也可以留言相询 O(∩_∩)O~待续...... 阅读全文
posted @ 2013-08-05 11:08 Thyiad 阅读(170) 评论(2) 推荐(0) 编辑