Can ENCODE and DECODE two-way conversion, support copy, paste
Public class form1 inherits system.windows.Forms.form
#Region "Windows Form Designer Generated Code"
Public Sub new () mybase.new ()
'This call is required for the Windows Form Designer. InitializeComponent ()
'Add any initialization after INITIALIZECOMPONENT ()
End Sub
'Form rewriting disposal to clean the component list. Protected overloads overrides sub dispose (byval disposing as boolean) ing disponation kiln (Components Is Nothing) Then components.dispose () end if endiffs) End sub
'Windows Form Designer Supply Private Components as System.comPonentModel.icontainer
'Note: The following procedure is necessary to use the Windows Form Designer to modify this process using the Windows Form Designer. 'Don't modify it using the code editor.
Friend WithEvents Panel1 As System.Windows.Forms.Panel Friend WithEvents Panel2 As System.Windows.Forms.Panel Friend WithEvents RichTextBox1 As System.Windows.Forms.RichTextBox Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents btnFromClient As System. Windows.Forms.Button Friend WithEvents btnToClient As System.Windows.Forms.Button Friend WithEvents btnSelectAll As System.Windows.Forms.Button Friend WithEvents btnCopy As System.Windows.Forms.Button Friend WithEvents btnPaste As System.Windows.Forms.Button < System.Diagnostics.DebuggerStepThrough ()> Private Sub InitializeComponent () Me.Panel1 = New System.Windows.Forms.Panel () Me.btnFromClient = New System.Windows.Forms.Button () Me.Label1 = New System.Windows. Forms.label () me.btntoclient = new system.windows.Forms.Button () me.btnselectll = new system.windows.Forms.Button () me.btncopy = new system.windows.Forms.Button () me.panel2 = New Syste m.Windows.Forms.Panel () Me.RichTextBox1 = New System.Windows.Forms.RichTextBox () Me.btnPaste = New System.Windows.Forms.Button () Me.Panel1.SuspendLayout () Me.Panel2.SuspendLayout ( ) Me.SuspendlayOut () 'panel1' me.Panel1.controls.addrange (new system.windows.forms.control () {me.btnfromclient, me.lable1, me.btntoclient, me.btnselectall, me.btncopy, ME .btnpaste}) Me.Panel1.dock = system.windows.Forms.dockStyle.top me.Panel1.name = "panel1" me.panel1.size = new system.drawing.size (768, 56) me.panel1.tabindex = 1 '' btnfromclient '
Me.btnFromClient.Location = New System.Drawing.Point (96, 8) Me.btnFromClient.Name = "btnFromClient" Me.btnFromClient.Size = New System.Drawing.Size (80, 40) Me.btnFromClient.TabIndex = 1 Me.btnfromclient.text = "encode" '' Label1 'me.label1.location = new system.drawing.point (496, 16) me.label1.name = "label1" me.label1.size = new system.drawing. Size (224, 32) me.label1.tabindex = 0 me.label1.text = "Instructions: Transfer the client JavaScript script to the pre-output in VB.NET, double click on the left mover" '' btntoclient 'me.btntoclient .Location = New System.Drawing.Point (376, 8) Me.btnToClient.Name = "btnToClient" Me.btnToClient.Size = New System.Drawing.Size (88, 40) Me.btnToClient.TabIndex = 1 Me.btnToClient .Text = "decode" '' btnselectall 'me.btnselectall.location = new system.drawing.point (192, 16) me.btnselectall.name = "btnselectall" me.btnselectall.size = new SY Stem.drawing.size (72, 24) me.btnselectall.tabindex = 1 me.btnselectall.text = "selectall" 'btncopy' me.dncopy.location = new system.drawing.point (280, 16) me.btncopy .Name = "btncopy" me.btncopy.size = new system.drawing.size (72, 24) me.btncopy.tabindex = 1 me.btncopy.text = "copy" '' panel2 '
Me.Panel2.Controls.AddRange (New System.Windows.Forms.Control () {Me.RichTextBox1}) Me.Panel2.Dock = System.Windows.Forms.DockStyle.Fill Me.Panel2.Location = New System.Drawing. Point (0, 56) me.panel2.name = "panel2" me.Panel2.size = new system.drawing.size (768, 406) me.panel2.tabindex = 2 '' richtextbox1 'me.richtextbox1.dock = system .Windows.Forms.DockStyle.Fill Me.RichTextBox1.Name = "RichTextBox1" Me.RichTextBox1.Size = New System.Drawing.Size (768, 406) Me.RichTextBox1.TabIndex = 1 Me.RichTextBox1.Text = "Description : Converting the client JavaScript script to pre-output in VB.NET, double-click Left-click "'' btnpaste 'me.btnpaste.location = new system.drawing.point (16, 16) me.btnpaste.name =" btnpaste "Me.btnpaste.size = new system.drawing.size (64, 24) me.btnpaste.tabindex = 1 me.btnpaste.text =" paste "'' Form1 'me.autoscalebasesize = new system.drawing.size (6 14) Me.ClientSize = new system.drawing.size (768, 462) Me.Controls.addrange (new system.windows.forms.control () {me.panel2, me.panel1}) me.name = "form1" me. Text = "form1" me.Panel1.ResumeLayout (false) me.Panel2.ResumeLayout (false) me.ResumeLayout (false) End Sub
#End region
Private Sub RichTextBox1_MouseDown (ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) If e.Clicks = 2 And e.Button = MouseButtons.Left Then Dim s () As String = Me.RichTextBox1.Lines Dim SRC As String Dst As String = "DIM S AS String =" "" & VBCRLF & _ "& VBCRLF DIM I AS INTEGER FOR I = 0 to S.LENGTH - 2 SRC = S (i) DST & = (VBTAB & VBTAB & VBTAB & CHR (34) & Src.Replace (CHR (34). Tostring, (CHR (34) & CHR (34)). Tostring) & Chr (34) & "& VBCRLF & _") & VBCRLF NEXT SRC = S (i) DST & = (VBTAB & VBTAB & VBTAB & CHR (34) & Src.Replace (CHR (34) .tostring, (CHR (34) & chr (34)). Tostring) & chr ( 34) & "& vbcrlf") & vbcrlfme.richtextbox1.text = DST
Elseif E.Clicks = 2 and E.Button = mousebuttons.right1 =r.richtextbox1.clear () me.richtextbox1.appendtext ("Instructions: Transfer the client JavaScript script to the pre-output in VB.NET, double click left button Conversion ") endiff
End Sub
Private Sub btnFromClient_Click (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnFromClient.Click Dim s () As String = Me.RichTextBox1.Lines Dim src As String Dim dst As String = "Dim s as String =" "" & vbrlf & _ "& vbcrlf Dim I as integer for i = 0 to s.Length - 1 SRC = S (i) DST & = (VBTAB & VBTAB & VBTAB & CHR (34) & src.replace (chr (34). Tostring, (CHR (34) & chr (34)). Tostring) & chr (34) & "& vbcrlf & _") & vbcrlf Next if Dst.Length> 5 THEN DST = DST.Remove (DST .Lene - 6, 6) end if me.richtextbox1.text = dstend SUB
Private Sub btnToClient_Click (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnToClient.Click Dim s () As String = Me.RichTextBox1.Lines Dim src As String Dim dst As String = "" Dim i As Integer For I = 1 to S.LENGTH - 1 SRC = S (i) IF SRC <> "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" LastIndexof ("" & vbrlf "), src.length - src.lastIndexof (" "& vbrlf")) SRC = src.replace ((CHR (34) & chr (34)). Tostring, CHR (34) .Tostring) DST & = (SRC & VBCRLF) end if Next if Dst.Length> 5 THEN DST = DST.Remove (Dst.Length - 2, 2) end if me.richtextbox1.text = DST
End Sub
Private Sub btnSelectAll_Click (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSelectAll.Click Me.RichTextBox1.SelectAll () End SubPrivate Sub btnCopy_Click (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCopy .Click me.richtextbox1.copy () End Sub
PRIVATE SUB BTNPASTE_CLICK (Byval E AS System.EventArgs) Handles BtnPaste.Click Me.richtextBox1.Clear () me.richtextbox1.paste () End Subend Class