|
VB.NET / VB Dot Net Source Code Formatting Show |
|
| |
|
|
SourceFormatX code formatter bases on powerful syntax parse engines so it can beautify and format source code files with omnifarious styles, even these messy source code examples below:
|
This is an extreme VB.NET code formatting example, the purpose of it is to show the power of VB.NET / VB DotNet syntax parse engine powered by SourceFormatX VB.NET Code Formatter.
Imports System.ComponentModel
Imports System.Drawing
Imports System.Windows.Forms
Imports System.IO
Public Class FCommand
Inherits System.Windows.Forms.Form
#Region "Encapsulation"
Private m_Actions As NActions
Private m_AcsRecent As NActions
Private m_Status As StatusBar
#End Region
#Region "Events, Handlers and Overrides"
Private Function HandleAction(ByVal action As CAction) As Boolean
m_Status.Text = Nothing
Return True
End Function
Private Sub HandleHint(ByVal action As CAction)
m_Status.Text = action.Hint
End Sub
Protected Overrides Sub OnMenuComplete(ByVal e As System.EventArgs)
m_Status.Text = Nothing
End Sub
Private Function HandleExit(ByVal action As CAction) As Boolean
Application.Exit
End Function
Private Function HandleUndo(ByVal action As CAction) As Boolean
With action
.Hint = "Can't undo right now"
.Enabled = False
End With
End Function
Private Function HandleCutCopy(ByVal action As CAction) As Boolean
With m_Actions("Paste")
.Enabled = True
End With
End Function
#End Region
End Class
Imports System.ComponentModel
Imports System.Drawing
Imports System.Windows.Forms
Imports System.IO
Public Class FCommand
Inherits System.Windows.Forms.Form
#Region "Encapsulation"
Private m_Actions As NActions
Private m_AcsRecent As NActions
Private m_Status As StatusBar
#End Region
#Region "Events, Handlers and Overrides"
Private Function HandleAction(ByVal action As CAction) As Boolean
m_Status.Text = Nothing
Return True
End Function
Private Sub HandleHint(ByVal action As CAction)
m_Status.Text = action.Hint
End Sub
Protected Overrides Sub OnMenuComplete(ByVal e As System.EventArgs)
m_Status.Text = Nothing
End Sub
Private Function HandleExit(ByVal action As CAction) As Boolean
Application.Exit
End Function
Private Function HandleUndo(ByVal action As CAction) As Boolean
With action
.Hint = "Can't undo right now"
.Enabled = False
End With
End Function
Private Function HandleCutCopy(ByVal action As CAction) As Boolean
With m_Actions("Paste")
.Enabled = True
End With
End Function
#End Region
End Class
Don't waste time on formatting VB.NET code by hand any more! Download SourceFormatX Free Trial Now!
|