宏 (编写代码时实用的)



Public Module Normal

    'Ctrl +  小键盘 2

    Sub NetHelper_MethodHeader_Ctrl_2()
        DTE.ActiveDocument.Selection.Text = "///"
        DTE.ActiveDocument.Selection.LineDown()
        DTE.ActiveDocument.Selection.EndOfLine()
        DTE.ActiveDocument.Selection.NewLine()
        DTE.ActiveDocument.Selection.Text = "<remark>"
        DTE.ActiveDocument.Selection.NewLine()
        DTE.ActiveDocument.Selection.LineUp()
        DTE.ActiveDocument.Selection.EndOfLine()
        DTE.ActiveDocument.Selection.NewLine()
        DTE.ActiveDocument.Selection.Text = "<para/>Author   :  AnDequan"
        DTE.ActiveDocument.Selection.NewLine()
        DTE.ActiveDocument.Selection.Text = "<para/>Date     :  " + FormatDateTime(Date.Today, 2)
    End Sub

    'Ctrl +  小键盘 1
    Sub NetHelper_SingleLine_Ctrl_1()
        DTE.ActiveDocument.Selection.Text = "// []"
        DTE.ActiveDocument.Selection.CharLeft()
        DTE.ActiveDocument.Selection.Text = " "
        DTE.ActiveDocument.Selection.CharLeft()
        DTE.ActiveDocument.Selection.Text = " "
    End Sub

    'Alt + J

    Sub NetHelper_Javascript_Alt_J()
        DTE.ActiveDocument.Selection.Text = "<script language=""javascript"" type=""text/javascript"">"
        DTE.ActiveDocument.Selection.NewLine()
        DTE.ActiveDocument.Selection.LineUp()
        DTE.ActiveDocument.Selection.EndOfLine()
        DTE.ActiveDocument.Selection.NewLine()
        DTE.ActiveDocument.Save()
    End Sub


    'Ctrl + 5
    Sub NetHelper_Table_Normal_Ctrl_5()
        DTE.ActiveDocument.Selection.Text = "<table class=""normal"" bordercolor=""#a0c6e5"" cellpadding="""""
        DTE.ActiveDocument.Selection.CharLeft()
        DTE.ActiveDocument.Selection.Text = "0"
        DTE.ActiveDocument.Selection.CharRight()
        DTE.ActiveDocument.Selection.Text = " cellspacing ="""""
        DTE.ActiveDocument.Selection.CharLeft()
        DTE.ActiveDocument.Selection.Text = "0"
        DTE.ActiveDocument.Selection.CharRight()
        DTE.ActiveDocument.Selection.Text = " border=""1"">"
        DTE.ActiveDocument.Selection.NewLine()
        DTE.ActiveDocument.Selection.LineUp()
        DTE.ActiveDocument.Selection.EndOfLine()
        DTE.ActiveDocument.Selection.NewLine()
    End Sub

    'Alt + 3

    Sub NetHelper_Table_Normal_tr_td_Ctrl_3()
        DTE.ActiveDocument.Selection.Text = "<tr>"
        DTE.ActiveDocument.Selection.NewLine()
        DTE.ActiveDocument.Selection.LineUp()
        DTE.ActiveDocument.Selection.EndOfLine()
        DTE.ActiveDocument.Selection.NewLine()
        DTE.ActiveDocument.Selection.Text = "<td>"
        DTE.ActiveDocument.Selection.CharLeft()
        DTE.ActiveDocument.Selection.Text = " class=""odd"""
        DTE.ActiveDocument.Selection.EndOfLine()
        DTE.ActiveDocument.Selection.Text = "<td>"
        DTE.ActiveDocument.Selection.CharLeft()
        DTE.ActiveDocument.Selection.Text = " class=""even"""
        DTE.ActiveDocument.Selection.StartOfLine(vsStartOfLineOptions.vsStartOfLineOptionsFirstText)
        DTE.ActiveDocument.Selection.Indent()
    End Sub

    'Ctrl + 4
    Sub NetHelper_InputText_Ctrl_4()
        DTE.ActiveDocument.Selection.Text = "<input id=""txt"" type=""text"" runat=""server"">"
        DTE.ActiveDocument.Selection.CharLeft(False, 31)
    End Sub

    'Alt + B
    Sub NetHelper_InputButton_Alt_B()
        DTE.ActiveDocument.Selection.Text = "<asp:Button ID=""btn"" runat=""server"" Text="""" CssClass=""btn"">"
        DTE.ActiveDocument.Selection.CharLeft(False, 42)
    End Sub

    'Alt + E
    Sub NetHelper_Eval_Alt_E()
        DTE.ActiveDocument.Selection.Text = "<%#Eval()"
        DTE.ActiveDocument.Selection.CharLeft()
        DTE.ActiveDocument.Selection.Text = """"""
        DTE.ActiveDocument.Selection.CharLeft()
    End Sub

End Module


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

安得权

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值