zoukankan      html  css  js  c++  java
  • vs2008快捷键生成

     1:  Imports System
     2:  Imports EnvDTE
     3:  Imports EnvDTE80
     4:  Imports EnvDTE90
     5:  Imports System.Diagnostics
     6:  Imports System.IO
     7:   
     8:   
     9:  Public Module Module1
    10:      Public Sub ListShortcutsInHTML()
    11:          'Declare a StreamWriter
    12:          Dim sw As System.IO.StreamWriter
    13:          sw = New StreamWriter("d:\\Shortcuts.html")
    14:   
    15:          'Write the beginning HTML
    16:          WriteHTMLStart(sw)
    17:   
    18:          ' Add a row for each keyboard shortcut
    19:          For Each c As Command In DTE.Commands
    20:              If c.Name <> "" Then
    21:                  Dim bindings As System.Array
    22:                  bindings = CType(c.Bindings, System.Array)
    23:                  For i As Integer = 0 To bindings.Length - 1
    24:                      sw.WriteLine("<tr>")
    25:                      sw.WriteLine("<td>" + c.Name + "</td>")
    26:                      sw.WriteLine("<td>" + bindings(i) + "</td>")
    27:                      sw.WriteLine("</tr>")
    28:                  Next
    29:  
    30:              End If
    31:          Next
    32:  
    33:          'Write the end HTML
    34:          WriteHTMLEnd(sw)
    35:   
    36:          'Flush and close the stream
    37:          sw.Flush()
    38:          sw.Close()
    39:   
    40:      End Sub
    41:  
    42:      'Declare a StreamWriter
    43:  
    44:      Public Sub WriteHTMLStart(ByVal sw As System.IO.StreamWriter)
    45:          sw.WriteLine("<html>")
    46:          sw.WriteLine("<head>")
    47:          sw.WriteLine("<title>")
    48:   
    49:          sw.WriteLine("Visual Studio Keyboard Shortcuts")
    50:          sw.WriteLine("</title>")
    51:          sw.WriteLine("</head>")
    52:   
    53:          sw.WriteLine("<body>")
    54:          sw.WriteLine("<h1>Visual Studio 2005 Keyboard Shortcuts</h1>")
    55:          sw.WriteLine("<font size=""2"" face=""Verdana"">")
    56:          sw.WriteLine("<table border=""1"">")
    57:          sw.WriteLine("<tr BGCOLOR=""#018FFF""><td align=""center""><b>Command</b></td><tdalign=""center""><b>Shortcut</b></td></tr>")
    58:   
    59:   
    60:      End Sub
    61:  
    62:      Public Sub WriteHTMLEnd(ByVal sw As System.IO.StreamWriter)
    63:          sw.WriteLine("</table>")
    64:          sw.WriteLine("</font>")
    65:          sw.WriteLine("</body>")
    66:          sw.WriteLine("</html>")
    67:      End Sub
    68:  
    69:  End Module
    70:  
    71:  
    Bookmark and Share
  • 相关阅读:
    《20170914-构建之法:现代软件工程-阅读笔记》
    《结对-贪吃蛇游戏-开发环境搭建过程》
    《结对-贪吃蛇游戏-设计文档》
    《自我介绍》
    对于软件工程的期望
    GIT的使用方法
    结对-贪吃蛇-需求分析
    团队-井字棋-需求分析
    团队-井字棋-成员简介及分工
    新的目标
  • 原文地址:https://www.cnblogs.com/LifelongLearning/p/1667325.html
Copyright © 2011-2022 走看看