Skip to content
This repository has been archived by the owner on Oct 16, 2020. It is now read-only.

Windows Forms Template Update #569

Open
wants to merge 4 commits into
base: 4.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 35 additions & 58 deletions data/templates/file/VB/VB.Forms.Form.xft
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
<?xml version="1.0"?>
<Template author="Mike Krueger" version="1.0">

<Config
name = "${res:Templates.File.WindowsForm.Name}"
icon = "VBNet.File.Form"
category = "VB"
subcategory = "${res:Templates.File.Categories.WindowsApplications}"
defaultname = "Form${Number}.vb"
language = "VB"
/>

<Template author="TFSThiago1112" version="1.0">
<Config name="${res:Templates.File.WindowsForm.Name}" icon="VBNet.File.Form" category="VB" subcategory="${res:Templates.File.Categories.WindowsApplications}" defaultname="Form${Number}.vb" language="VB"/>
<Description>${res:Templates.File.WindowsForm.Description}</Description>

<References>
<Reference include="System.Drawing" />
<Reference include="System.Windows.Forms" />
</References>

<!--
Special new file templates:
${StandardNamespace} -> Standardnamespace of the current project or FileNameWithoutExtension
Expand All @@ -27,56 +16,44 @@
${Path} -> Full path of the file
-->
<Files>

<File name="${Path}/${FileNameWithoutExtension}.Designer.vb" DependentUpon="${FileName}" language="VBNET"><![CDATA[${StandardHeader.VBNET}
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class ${ClassName}
Inherits System.Windows.Forms.Form

''' <summary>
''' Designer variable used to keep track of non-visual components.
''' </summary>
Private components As System.ComponentModel.IContainer

''' <summary>
''' Disposes resources used by the form.
''' </summary>
''' <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If components IsNot Nothing Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

''' <summary>
''' This method is required for Windows Forms designer support.
''' Do not change the method contents inside the source code editor. The Forms designer might
''' not be able to load this method if it was changed manually.
''' </summary>
Private Sub InitializeComponent()
'
'${ClassName}
'
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.Name = "${ClassName}"
Me.Text = "${ClassName}"
End Sub
Inherits System.Windows.Forms.Form

'Form overrides dispose to clean up the component list.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub

'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
components = New System.ComponentModel.Container
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.Text = "${ClassName}"
End Sub
End Class
]]></File>
<File name="${FullName}" language="VBNET"><![CDATA[${StandardHeader.VBNET}
Public Partial Class ${ClassName}
Public Sub New()
' The Me.InitializeComponent call is required for Windows Forms designer support.
Me.InitializeComponent()

'
' TODO : Add constructor code after InitializeComponents
'
End Sub
]]>
</File>
<File name="${FullName}" language="VBNET"><![CDATA[${StandardHeader.VBNET}
Public Class ${ClassName}

End Class
]]></File>
</Files>

<AdditionalOptions/>
</Template>
72 changes: 29 additions & 43 deletions data/templates/file/VB/VB.Forms.UserControl.xft
Original file line number Diff line number Diff line change
Expand Up @@ -27,56 +27,42 @@
-->
<Files>
<File name="${Path}/${FileNameWithoutExtension}.Designer.vb" DependentUpon="${FileName}" language="VBNET"><![CDATA[${StandardHeader.VBNET}
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class ${ClassName}
''' <summary>
''' Designer variable used to keep track of non-visual components.
''' </summary>
Private components As System.ComponentModel.IContainer

''' <summary>
''' Disposes resources used by the control.
''' </summary>
''' <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If components IsNot Nothing Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

''' <summary>
''' This method is required for Windows Forms designer support.
''' Do not change the method contents inside the source code editor. The Forms designer might
''' not be able to load this method if it was changed manually.
''' </summary>
Private Sub InitializeComponent()
'
'${ClassName}
'
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.Name = "${ClassName}"
End Sub
Inherits System.Windows.Forms.UserControl

'UserControl overrides dispose to clean up the component list.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub

'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
components = New System.ComponentModel.Container()
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
End Sub

End Class
]]></File>
<File name="${FullName}" language="VBNET"><![CDATA[${StandardHeader.VBNET}
Public Partial Class ${ClassName}
Inherits System.Windows.Forms.UserControl

Public Sub New()
' The Me.InitializeComponent call is required for Windows Forms designer support.
Me.InitializeComponent()

'
' TODO : Add constructor code after InitializeComponents
'
End Sub
Public Class ${ClassName}

End Class
]]></File>
</Files>

<AdditionalOptions/>
</Template>


76 changes: 31 additions & 45 deletions data/templates/project/VB/ControlLibrary.xpt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<Template originator = "Markus Palme"
<Template originator = "TFSThiago1112"
created = "11/24/2002"
lastModified = "07/20/2005">
lastModified = "28/09/2014">

<!-- Template Header -->
<TemplateConfiguration>
Expand Down Expand Up @@ -44,56 +44,42 @@

<Files>
<File name="UserControl1.vb"><![CDATA[${StandardHeader.VBNET}
Public Partial Class UserControl1
Inherits System.Windows.Forms.UserControl

Public Sub New()
' The Me.InitializeComponent call is required for Windows Forms designer support.
Me.InitializeComponent()

'
' TODO : Add constructor code after InitializeComponents
'
End Sub
Public Class UserControl1

End Class
]]></File>
<File name="UserControl1.Designer.vb" DependentUpon="UserControl1.vb"><![CDATA[${StandardHeader.VBNET}
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class UserControl1
''' <summary>
''' Designer variable used to keep track of non-visual components.
''' </summary>
Private components As System.ComponentModel.IContainer

''' <summary>
''' Disposes resources used by the control.
''' </summary>
''' <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If components IsNot Nothing Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

''' <summary>
''' This method is required for Windows Forms designer support.
''' Do not change the method contents inside the source code editor. The Forms designer might
''' not be able to load this method if it was changed manually.
''' </summary>
Private Sub InitializeComponent()
'
'UserControl1
'
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.Name = "UserControl1"
End Sub
Inherits System.Windows.Forms.UserControl

'UserControl overrides dispose to clean up the component list.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub

'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
components = New System.ComponentModel.Container()
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
End Sub

End Class
]]></File>
<File name="Properties\AssemblyInfo.vb" src="DefaultAssemblyInfo.vb"/>
</Files>
</Project>
</Template>


75 changes: 31 additions & 44 deletions data/templates/project/VB/FormsProject.xpt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<Template originator = "Markus Palme"
<Template originator = "TFSThiago1112"
created = "15/04/2002"
lastModified = "07/20/2005">
lastModified = "28/09/2014">

<!-- Template Header -->
<TemplateConfiguration>
Expand Down Expand Up @@ -45,53 +45,40 @@
<Files>
<File name="MainForm.vb">
<![CDATA[${StandardHeader.VBNET}
Public Partial Class MainForm
Public Sub New()
' The Me.InitializeComponent call is required for Windows Forms designer support.
Me.InitializeComponent()

'
' TODO : Add constructor code after InitializeComponents
'
End Sub
Public Class MainForm

End Class
]]></File>
<File name="MainForm.Designer.vb" DependentUpon="MainForm.vb">
<![CDATA[${StandardHeader.VBNET}
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class MainForm
Inherits System.Windows.Forms.Form

''' <summary>
''' Designer variable used to keep track of non-visual components.
''' </summary>
Private components As System.ComponentModel.IContainer

''' <summary>
''' Disposes resources used by the form.
''' </summary>
''' <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If components IsNot Nothing Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

''' <summary>
''' This method is required for Windows Forms designer support.
''' Do not change the method contents inside the source code editor. The Forms designer might
''' not be able to load this method if it was changed manually.
''' </summary>
Private Sub InitializeComponent()
'
'MainForm
'
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.Name = "MainForm"
Me.Text = "${ProjectName}"
End Sub
Inherits System.Windows.Forms.Form

'Form overrides dispose to clean up the component list.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub

'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
components = New System.ComponentModel.Container
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.Text = "MainForm"
End Sub
End Class
]]></File>
<File name="Program.vb">
Expand Down