zoukankan      html  css  js  c++  java
  • tmp

    Imports System
    Imports System.IO
    Imports EnvDTE
    Imports EnvDTE80
    Imports EnvDTE90
    Imports System.Diagnostics
    
    Public Module ModuleListShortCut
    
        Public Sub ListShortcutsInHTML()
    
            'Declare a StreamWriter
            Dim sw As System.IO.StreamWriter
            sw = New StreamWriter("d:\demo\Shortcuts.html")
    
            'Write the beginning HTML
            WriteHTMLStart(sw)
    
    
            ' Add a row for each keyboard shortcut
            For Each c As Command In DTE.Commands
                If c.Name <> "" Then
                    Dim bindings As System.Array
                    bindings = CType(c.Bindings, System.Array)
                    For i As Integer = 0 To bindings.Length - 1
                        sw.WriteLine("<tr>")
                        sw.WriteLine("<td>" + c.Name + "</td>")
                        sw.WriteLine("<td>" + bindings(i) + "</td>")
                        sw.WriteLine("</tr>")
                    Next
    
                End If
            Next
    
            'Write the end HTML
            WriteHTMLEnd(sw)
    
            'Flush and close the stream
            sw.Flush()
            sw.Close()
        End Sub
        Public Sub WriteHTMLStart(ByVal sw As System.IO.StreamWriter)
            sw.WriteLine("<html>")
            sw.WriteLine("<head>")
            sw.WriteLine("<title>")
    
            sw.WriteLine("Visual Studio Keyboard Shortcuts")
            sw.WriteLine("</title>")
            sw.WriteLine("</head>")
    
            sw.WriteLine("<body>")
            sw.WriteLine("<h1>Visual Studio 2005 Keyboard Shortcuts</h1>")
            sw.WriteLine("<font size=""2"" face=""Verdana"">")
            sw.WriteLine("<table border=""1"">")
            sw.WriteLine("<tr BGCOLOR=""#018FFF""><td align=""center""><b>Command</b></td><td align=""center""><b>Shortcut</b></td></tr>")
    
    
        End Sub
    
        Public Sub WriteHTMLEnd(ByVal sw As System.IO.StreamWriter)
            sw.WriteLine("</table>")
            sw.WriteLine("</font>")
            sw.WriteLine("</body>")
            sw.WriteLine("</html>")
        End Sub
    
    End Module
  • 相关阅读:
    Mac-安装Git以及Git的配置
    Mac 安装Maven,并设置环境变量
    Mac Tab自动补全键
    Eclipse 代码快捷键模板(一)
    网易博客迁移(2011-05-27)
    前端JS插件整理
    Ajax请求二进制流并在页面展示
    IDE中使用System.getProperty()获取一些属性
    Spring Boot:快速入门(二)
    c 语言 指针 与地址
  • 原文地址:https://www.cnblogs.com/wenwujuncheng/p/3726931.html
Copyright © 2011-2022 走看看