成人免费xxxxx在线视频软件_久久精品久久久_亚洲国产精品久久久_天天色天天色_亚洲人成一区_欧美一级欧美三级在线观看

利用Visual Studio 2008宏實現自動注釋

開發 后端
我們今天要介紹的是利用Visual Studio 2008宏實現自動注釋功能,希望這個小工具能給大家有所幫助。

1. Tool中選擇Macros,打開Macro IDE

2. MyMacros 刪除默認文件 Module1.vb,添加文件CommentHelper.Vb代碼內容

  1. Imports System  
  2. Imports EnvDTE  
  3. Imports EnvDTE80  
  4. Imports EnvDTE90  
  5. Imports System.Diagnostics  
  6. '注釋幫助模塊  
  7. Public Module CommentHelper  
  8. Sub AddClassComment()  
  9. '定義選擇區域  
  10. Dim DocSel As EnvDTE.TextSelection  
  11. '初始化選擇區域是當前文檔的選擇  
  12. DocSel = DTE.ActiveDocument.Selection  
  13. '選擇區域移動到文檔的開頭  
  14. DocSel.StartOfDocument()  
  15. DocSel.Text = "/*******************************************************************" 
  16. DocSel.NewLine()  
  17. DocSel.Text = "* Copyright (C) abc Corporation" 
  18. DocSel.NewLine()  
  19. DocSel.Text = "* All rights reserved." 
  20. DocSel.NewLine()  
  21. DocSel.Text = "*" 
  22. DocSel.NewLine()  
  23. DocSel.Text = "Author: HBB0b0 (hbb0b0@163.com)" 
  24. DocSel.NewLine()  
  25. DocSel.Text = "Create Date:" + DateTime.Now.ToString()  
  26. DocSel.NewLine()  
  27. DocSel.Text = "Description:" + DTE.ActiveDocument.Name  
  28. DocSel.NewLine()  
  29. DocSel.Text = "*" 
  30. DocSel.NewLine()  
  31. DocSel.Text = "* Date Author Description" 
  32. DocSel.NewLine()  
  33. DocSel.Text = "*******************************************************************/" 
  34. DocSel.NewLine()  
  35. End Sub 
  36. End Module 

3. 在需要添加注釋的項目中打開Macro 瀏覽器,如果看不到AddClassComment宏,則需要導入宏項目

4. 打開需要注釋文件,雙擊或運行AddClassComment,就會添加如下效果的注釋。

  1. /*******************************************************************  
  2. * * Copyright (C) abc Corporation  
  3. * * All rights reserved.  
  4. * *  
  5. * Author: HBB0b0 (hbb0b0@163.com)  
  6. * Create Date:2011-3-21 19:51:03  
  7. * Description:Program.cs  
  8. * *  
  9. * * Date Author Description  
  10. * *******************************************************************/  
  11. using System;  
  12. using System.Collections.Generic;  
  13. using System.Linq;  
  14. using System.Text;  
  15. namespace MacroApplication  
  16. {  
  17. class Program  
  18. {  
  19. static void Main(string[] args)  
  20. {  
  21. }  
  22. }  

如果覺得這種方式不方便,可以把它做成ToolBar,下個項目使用的只需要運行ToolBar中的對應按鈕就可以了。

1. Tools中選擇自定義

2. 新添ToolBar 名稱為CommentHelper

3. 在命令頁簽Macros選擇AddClassComment

4. 按住Macro.MyMacros.CommentHelper.AddClassComment,把它拖到CommentHelper容器上

5. 拖放后的效果如下

6. 在以后的使用時不用再次打開宏項目,直接單擊CommentHelperAddClassComment按鈕就可以添加類注釋了。

原文鏈接:http://www.cnblogs.com/hbb0b0/archive/2011/03/22/1990670.html

【編輯推薦】

 

  1. Visual Studio 2008在Web.config文件中注冊web用戶控件
  2. Visual Studio 2008中創建web用戶控件
  3. Visual Studio 2008的ListView數據排序
  4. Visual Studio 2008的標記導航功能
  5. Visual Studio 2008中綁定ListView控件
責任編輯:彭凡 來源: 博客園
相關推薦

2010-09-27 09:13:36

Visual Stud

2010-05-25 13:50:35

Visual Stud

2009-11-12 09:15:33

Visual Stud

2009-12-16 15:44:20

Visual Stud

2009-12-18 13:39:40

Visual Stud

2009-12-17 15:38:21

Visual Stud

2013-05-29 14:54:49

Visual Stud

2009-07-01 17:11:32

標記導航Visual Stud

2009-12-16 14:51:27

Visual Stud

2009-12-17 15:22:27

Visual Stud

2009-07-01 17:15:25

ListView數據排Visual Stud

2009-12-14 15:46:38

visual stud

2009-07-01 17:04:13

ListViewVisual Stud

2010-09-10 09:35:59

Visual Stud

2009-12-02 17:22:16

Visual Stud

2009-12-11 17:20:36

Visual Stud

2009-12-15 10:56:01

Visual Stud

2009-07-01 16:36:40

CSS樣式工具Visual Stud

2009-12-15 10:41:06

Visual Stud

2009-07-01 16:49:29

拆分視圖Visual Stud
點贊
收藏

51CTO技術棧公眾號

主站蜘蛛池模板: 成人欧美一区二区 | 国产午夜精品久久久久 | 精品成人免费视频 | 成人无遮挡毛片免费看 | 久久精品中文字幕 | 一区二区三区视频在线免费观看 | 欧美黄在线观看 | 视频一区中文字幕 | 欧美日韩亚洲国产综合 | 91精品国产乱码久久久久久久久 | 日韩成人免费av | 国产精品一区二区在线免费观看 | 国产激情片在线观看 | 天天操天天天干 | 中文字幕第一页在线 | 国产精品毛片 | 中文字幕一区二区三区乱码在线 | 亚洲免费视频在线观看 | 韩国欧洲一级毛片 | 成人免费小视频 | 中文字幕一区二区三区在线乱码 | 亚洲综合一区二区三区 | 欧美精品在线播放 | 日韩精品一区二区三区中文字幕 | 国产精品美女久久久 | 国产精品777一区二区 | 国产日韩欧美精品一区二区三区 | 欧美三级不卡 | 国产精品成人一区 | 亚洲国产成人精 | 国产一区二区 | 欧美毛片免费观看 | 国产目拍亚洲精品99久久精品 | 国产成人久久精品 | 91免费入口 | 99精品视频一区二区三区 | 久久精品国产99国产 | 亚洲国产精品一区二区三区 | 99精品免费久久久久久久久日本 | 韩三级在线观看 | 精品九九九 |