SourceFormatX

軟體簡介

主要功能

為什麼要使用

源碼美化演示

整合和插件

界面預覽

常見問題

升級歷史

所獲獎項

用戶評價

許可協議

CodeToHtml

VB.NET原始碼美化效果演示

現在購買
下載試用

程式碼美化工具功能

SourceFormatX 使用強大的VB.NET詞法解析引擎全面地分析您的原始碼並根據用戶自定義的VB.NET原始碼風格重構和美化VB.NET原始碼檔案,因此它能精細地根據不同的原始碼風格美化多種原始碼,甚至是下面這些極度混亂的原始碼:

C/C++ Java C# Delphi (Pascal)
PHP JSP ASP JavaScript
Visual Basic VB.NET VBScript HTML Components
80x86 ASM 8051 ASM CORBA IDL


這是一個非常極端的 VB.NET 原始碼美化的範例,其目的是為了展示 SourceFormatX VB.NET程式碼美化工具詞法解析引擎的威力。這份混亂到無法閱讀的 VB.NET 原始碼檔案在1秒種內即可被 SourceFormatX 美化和縮排成整潔且可讀性強的美觀風格樣式。

  '----- 原始碼美化之前的VB.NET原始碼 -----

  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"
  ' Generics
  Private Function HandleAction(ByVal action As CAction) As Boolean
  'MsgBox(action.Caption)
  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
  ' Special
  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

  '----- 原始碼美化之後的VB.NET原始碼 -----

  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"
          ' Generics
  
          Private Function HandleAction(ByVal action As CAction) As Boolean
              'MsgBox(action.Caption)
              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
  
          ' Special
          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

  不要再浪費寶貴的時間手動整理美化VB.NET語言原始碼了! 現在就下載SourceFormatX原始碼美化工具