.Net版行号消除器
使用效果;
下面代碼每行前面有11個空格;一共31行;填入下圖數字;
點擊 走您 按鈕之后,效果如下;
使用說明
一. 假定有如下一段代碼;前面帶有行號;
10 ? ? ? ? /// <returns></returns>
11 ? ? ? ? public static RegistryKey GetRootRegisterKey(WRegisterRootKeyType rootKeyType)
12 ? ? ? ? {
13 ? ? ? ? ? ? switch (rootKeyType)
14 ? ? ? ? ? ? {
15 ? ? ? ? ? ? ? ? case WRegisterRootKeyType.HKEY_CLASSES_ROOT:
16 ? ? ? ? ? ? ? ? ? ? return Registry.ClassesRoot;
17 ? ? ? ? ? ? ? ? case WRegisterRootKeyType.HKEY_CURRENT_CONFIG:
18 ? ? ? ? ? ? ? ? ? ? return Registry.CurrentConfig;
19 ? ? ? ? ? ? ? ? case WRegisterRootKeyType.HKEY_CURRENT_USER:
20 ? ? ? ? ? ? ? ? ? ? return Registry.CurrentUser;
21 ? ? ? ? ? ? ? ? case WRegisterRootKeyType.HKEY_LOCAL_MACHINE:
22 ? ? ? ? ? ? ? ? ? ? return Registry.LocalMachine;
23 ? ? ? ? ? ? ? ? default:
24 ? ? ? ? ? ? ? ? ? ? throw new Exception("注冊表類型未定義!");
25 ? ? ? ? ? ? }
26 ? ? ? ? }
27?
28 ? ? ? ? /// <summary>
29 ? ? ? ? /// 在指定注冊表項下創建注冊表子項
30 ? ? ? ? /// </summary>
31 ? ? ? ? /// <param name="fatherKey">父注冊表項</param>
32 ? ? ? ? /// <param name="keyPath">注冊表路徑</param>
33 ? ? ? ? /// <returns></returns>
34 ? ? ? ? public static RegistryKey CreateRegistryKey(RegistryKey fatherKey, string keyPath)
35 ? ? ? ? {
36 ? ? ? ? ? ? RegistryKey returnKey = fatherKey.CreateSubKey(keyPath);
37 ? ? ? ? ? ? return returnKey;
38 ? ? ? ? }
39?
40 ? ? ? ? /// <summary>
二. 把此段代碼拷貝到行號消除器中;
三. 由于其前面有兩個行號,需要按2個Del消除;在“向下發送2個Del次數”提示的文本框中,輸入數字31(代碼有31行);
? ? 把光標移動到第一行的行首;
? ? 點擊該文本框后的“走您!”按鈕;
? ? 自動刪除所有行號;相當于手工在每行開頭鍵入2次DEL鍵;
四. 注意1
? ? 刪除行號之前光標一定要移動到開始刪除的第一行的行首。
五. 注意2
? ? 如果是如下的代碼,
1 ?/// <summary>
2 ? ? /// 注冊表操作類
3 ? ? /// </summary>
4 ? ? public class WRegisterTool
5 ? ? {
6 ? ? ? ? /// <summary>
7 ? ? ? ? /// 獲得根節點注冊表
8 ? ? ? ? /// </summary>
9 ? ? ? ? /// <param name="rootKeyType">根節點類型</param>
10 ? ? ? ? /// <returns></returns>
11 ? ? ? ? public static RegistryKey GetRootRegisterKey(WRegisterRootKeyType rootKeyType)
12 ? ? ? ? {
13 ? ? ? ? ? ? switch (rootKeyType)
14 ? ? ? ? ? ? {
15 ? ? ? ? ? ? ? ? case WRegisterRootKeyType.HKEY_CLASSES_ROOT:
16 ? ? ? ? ? ? ? ? ? ? return Registry.ClassesRoot;
17 ? ? ? ? ? ? ? ? case WRegisterRootKeyType.HKEY_CURRENT_CONFIG:
18 ? ? ? ? ? ? ? ? ? ? return Registry.CurrentConfig;
19 ? ? ? ? ? ? ? ? case WRegisterRootKeyType.HKEY_CURRENT_USER:
20 ? ? ? ? ? ? ? ? ? ? return Registry.CurrentUser;
21 ? ? ? ? ? ? ? ? case WRegisterRootKeyType.HKEY_LOCAL_MACHINE:
22 ? ? ? ? ? ? ? ? ? ? return Registry.LocalMachine;
23 ? ? ? ? ? ? ? ? default:
24 ? ? ? ? ? ? ? ? ? ? throw new Exception("注冊表類型未定義!");
25 ? ? ? ? ? ? }
26 ? ? ? ? }
? ? 可能應該先使用 1個Del 刪除功能來刪除前面數行的1個行號;再使用 2個Del 刪除功能來刪除后面的行號;
六. 自己可根據需要,先輸入要在每行行首鍵入的Del鍵次數,再鍵入向下發送次數,然后用“走您!”來刪除;
使用效果
? ? 如果你的電腦還比較快的話,通常是嗖的一下,行號就沒了;
下面一排4個按鈕的功能還未完成,下一版本實現;
ddd1-2-0.exe 是用.net framework 2.0生成;
ddd1-3-5.exe 是用.net framework 3.5生成;
ddd1-4-0.exe 是用.net framework 4.0生成;
功能一樣;
通常Win8默認打開的.net版本為4.0; Win7默認打開的.net版本為3.5;
自己看哪個版本能跑;
下載內容包括可執行文件和源碼;
http://pan.baidu.com/s/1o8qyWLs
ddd.rar
總結
以上是生活随笔為你收集整理的.Net版行号消除器的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: WebKit和Chrome源码分析
- 下一篇: newLisp使用初步