Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

Declarations Generator

, 29 Jun 2010 GPL3
A tool which helps in generating codes for events/properties, so that users of your classes can use events/properties of embedded classes
DeclarationsGenerator_0.0.0.3.zip
DeclarationsGenerator 0.0.0.3
EventsDeclarationsGenerator
bin
Debug
DeclarationsGenerator.exe
Release
DeclarationsGenerator.vbproj.user
Forms
Icons
AssemblyImg.bmp
ClassImg.bmp
Module & Classes
My Project
Application.myapp
Settings.settings
Temp
Tutorial
EventsPropertiesDeclarationsGenerator.gif
Tutorial AR.doc
Tutorial ENG.doc
EventsDeclarationsGenerator.suo
Public Class frm_CodeViewer

    Private m_GeneratedCode As String
    Public Property GeneratedCode() As String
        Get
            Return m_GeneratedCode
        End Get
        Set(ByVal value As String)
            m_GeneratedCode = value
            Me.txt_GenertedCode.Text = CodeAuthorSignature() & value
        End Set
    End Property

  
    Private Function CodeAuthorSignature() As String
        Dim AppInfo = My.Application.Info
        Dim _CodeAuthorSignature As String = _
                    "'Next Code is autogenerated " & vbCrLf & _
                    "'By a Tool '" & AppInfo.ProductName & "'" & vbCrLf & _
                    "'Version " & AppInfo.Version.ToString & vbCrLf & _
                    "'Done By Yasser Daheek" & vbCrLf & _
                    "'cotact with the Author yasserdaheek@windowslive.com" & vbCrLf & _
                    "'-----------------------------------------" & vbCrLf

        Return _CodeAuthorSignature

    End Function

    Private Sub btn_Export_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_Export.Click
        Dim TargetFile As String = ""
        TargetFile = FilesDealer.GetFilePath("Choose the File to save the declarations to", _
                                             "Text Files (*.txt)|*.txt|vb Codes (*.vb)|*.vb")
        If TargetFile = "" Then
            Exit Sub
        End If
        My.Computer.FileSystem.WriteAllText(TargetFile, Me.txt_GenertedCode.Text, False)
    End Sub

    Private Sub btn_CopyToClipboard_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_CopyToClipboard.Click
        My.Computer.Clipboard.SetText(Me.txt_GenertedCode.Text)
    End Sub
End Class

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The GNU General Public License (GPLv3)

Share

About the Author

vbnetskywalker
Software Developer
Syrian Arab Republic Syrian Arab Republic
The more I learn the more I see my ignorance.

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.150224.1 | Last Updated 29 Jun 2010
Article Copyright 2010 by vbnetskywalker
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid