|
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.