My vb.net source code posting tool is now online and can be found on my personal web server at http://www.reddinghaze.com/codeformatter.aspx.
You can optionally assign width and height to the output div and toggle whether or not it scrolls overflow. Here's some output generated by the code posting tool (a chunk of the code posting tool page's own code... run through itself... trippy!
Public Class codeformatter
Inherits Page
Private txtInput, txtOutput, txtWidth, txtHeight As TextBox
Private chkScroll As CheckBox
Private objForm As HtmlForm
Private WithEvents btnFormat As Button
Private Tokens As New System.Collections.Generic.List(Of String)
Private Keywords As New System.Collections.Generic.List(Of String)
Protected Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Me.Init
Me.InitializeControls()
Me.Controls.Add(New LiteralControl("<html><head><title>emachine's vb.net post formatter</title></head><body><center><h1>emachine's vb.net post formatter*</h1>" & _
"<font size=""2"">*now with zero aesthetic appeal</font>"))
Me.Controls.Add(Me.objForm)
With Me.objForm
.Controls.Add(New LiteralControl("<br />Paste from your IDE <font size=""2"">(tip: Ctrl+A, Ctrl+V)</font><br />"))
.Controls.Add(Me.txtInput)
.Controls.Add(New LiteralControl("<br />width:"))
.Controls.Add(Me.txtWidth)
.Controls.Add(New LiteralControl("px, height:"))
.Controls.Add(Me.txtHeight)
.Controls.Add(New LiteralControl("px "))
.Controls.Add(Me.chkScroll)
.Controls.Add(New LiteralControl("<br /><br />"))
.Controls.Add(Me.btnFormat)
.Controls.Add(New LiteralControl("<br /><br />Copy to your blog <font size=""2"">(tip: Ctrl+A, Ctrl+C)</font><br />"))
.Controls.Add(Me.txtOutput)
End With
Me.Controls.Add(New LiteralControl("Preview:<br />"))
'etc.
Inherits Page
Private txtInput, txtOutput, txtWidth, txtHeight As TextBox
Private chkScroll As CheckBox
Private objForm As HtmlForm
Private WithEvents btnFormat As Button
Private Tokens As New System.Collections.Generic.List(Of String)
Private Keywords As New System.Collections.Generic.List(Of String)
Protected Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Me.Init
Me.InitializeControls()
Me.Controls.Add(New LiteralControl("<html><head><title>emachine's vb.net post formatter</title></head><body><center><h1>emachine's vb.net post formatter*</h1>" & _
"<font size=""2"">*now with zero aesthetic appeal</font>"))
Me.Controls.Add(Me.objForm)
With Me.objForm
.Controls.Add(New LiteralControl("<br />Paste from your IDE <font size=""2"">(tip: Ctrl+A, Ctrl+V)</font><br />"))
.Controls.Add(Me.txtInput)
.Controls.Add(New LiteralControl("<br />width:"))
.Controls.Add(Me.txtWidth)
.Controls.Add(New LiteralControl("px, height:"))
.Controls.Add(Me.txtHeight)
.Controls.Add(New LiteralControl("px "))
.Controls.Add(Me.chkScroll)
.Controls.Add(New LiteralControl("<br /><br />"))
.Controls.Add(Me.btnFormat)
.Controls.Add(New LiteralControl("<br /><br />Copy to your blog <font size=""2"">(tip: Ctrl+A, Ctrl+C)</font><br />"))
.Controls.Add(Me.txtOutput)
End With
Me.Controls.Add(New LiteralControl("Preview:<br />"))
'etc.
Oh yea, it knows the difference between keywords and properties now, too:
If ItsAClass.End Then
"No more blue .Ends!"
End If
"No more blue .Ends!"
End If
0 comments:
Post a Comment