403Webshell
Server IP : 209.209.40.120  /  Your IP : 216.73.217.112
Web Server : Microsoft-IIS/10.0
System : Windows NT NEWWWW 10.0 build 17763 (Windows Server 2019) i586
User : NEWWWW$ ( 0)
PHP Version : 8.3.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Program Files/SMSC client .NET/samples/vb-net/CIMD2/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Program Files/SMSC client .NET/samples/vb-net/CIMD2/Main.vb
'------------------------------------------------------------------------------
' SMSC client .NET components CIMD2 sample application
'
' $Header: $
' Copyright (c) 2003-2013 Tops. All rights reserved.
'------------------------------------------------------------------------------

Option Strict Off
Option Explicit On 

Imports System.Windows.Forms
Imports smscc
Imports smscc.CIMD2

Friend Class fmMain
    Inherits System.Windows.Forms.Form

#Region "Windows Form Designer generated code "
    Public Sub New()
        MyBase.New()
        'This call is required by the Windows Form Designer.
        InitializeComponent()
    End Sub
    'Form overrides dispose to clean up the component list.
    Protected Overloads Overrides Sub Dispose(ByVal Disposing As Boolean)
        If Disposing Then
            If Not components Is Nothing Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(Disposing)
    End Sub
    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer
    Public WithEvents chkDirectDisplay As System.Windows.Forms.CheckBox
    Public WithEvents chkStatusReport As System.Windows.Forms.CheckBox
    Public WithEvents txtUDH As System.Windows.Forms.TextBox
    Public WithEvents cbEncoding As System.Windows.Forms.ComboBox
    Public WithEvents txtOriginator As System.Windows.Forms.TextBox
    Public WithEvents txtPassword As System.Windows.Forms.TextBox
    Public WithEvents cmdInitialize As System.Windows.Forms.Button
    Public WithEvents txtUserID As System.Windows.Forms.TextBox
    Public WithEvents txtDestination As System.Windows.Forms.TextBox
    Public WithEvents txtLog As System.Windows.Forms.TextBox
    Public WithEvents cmdDisconnect As System.Windows.Forms.Button
    Public WithEvents txtPort As System.Windows.Forms.TextBox
    Public WithEvents txtHost As System.Windows.Forms.TextBox
    Public WithEvents cmdConnect As System.Windows.Forms.Button
    Public WithEvents Label10 As System.Windows.Forms.Label
    Public WithEvents Line1 As System.Windows.Forms.Label
    Public WithEvents Line4 As System.Windows.Forms.Label
    Public WithEvents Line2 As System.Windows.Forms.Label
    Public WithEvents Label8 As System.Windows.Forms.Label
    Public WithEvents Label9 As System.Windows.Forms.Label
    Public WithEvents Label5 As System.Windows.Forms.Label
    Public WithEvents Label4 As System.Windows.Forms.Label
    Public WithEvents Label7 As System.Windows.Forms.Label
    Public WithEvents Label6 As System.Windows.Forms.Label
    Public WithEvents Label3 As System.Windows.Forms.Label
    Public WithEvents Label2 As System.Windows.Forms.Label
    Public WithEvents Label1 As System.Windows.Forms.Label
    '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.
    Public WithEvents cmdSubmit As System.Windows.Forms.Button
    Public WithEvents txtSubmit As System.Windows.Forms.TextBox
    Friend WithEvents SMSCclientCIMD2 As SMSCclientCIMD2
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.chkDirectDisplay = New System.Windows.Forms.CheckBox
        Me.chkStatusReport = New System.Windows.Forms.CheckBox
        Me.txtUDH = New System.Windows.Forms.TextBox
        Me.cbEncoding = New System.Windows.Forms.ComboBox
        Me.txtOriginator = New System.Windows.Forms.TextBox
        Me.txtPassword = New System.Windows.Forms.TextBox
        Me.cmdInitialize = New System.Windows.Forms.Button
        Me.txtUserID = New System.Windows.Forms.TextBox
        Me.txtDestination = New System.Windows.Forms.TextBox
        Me.txtLog = New System.Windows.Forms.TextBox
        Me.cmdSubmit = New System.Windows.Forms.Button
        Me.txtSubmit = New System.Windows.Forms.TextBox
        Me.cmdDisconnect = New System.Windows.Forms.Button
        Me.txtPort = New System.Windows.Forms.TextBox
        Me.txtHost = New System.Windows.Forms.TextBox
        Me.cmdConnect = New System.Windows.Forms.Button
        Me.Label10 = New System.Windows.Forms.Label
        Me.Line1 = New System.Windows.Forms.Label
        Me.Line4 = New System.Windows.Forms.Label
        Me.Line2 = New System.Windows.Forms.Label
        Me.Label8 = New System.Windows.Forms.Label
        Me.Label9 = New System.Windows.Forms.Label
        Me.Label5 = New System.Windows.Forms.Label
        Me.Label4 = New System.Windows.Forms.Label
        Me.Label7 = New System.Windows.Forms.Label
        Me.Label6 = New System.Windows.Forms.Label
        Me.Label3 = New System.Windows.Forms.Label
        Me.Label2 = New System.Windows.Forms.Label
        Me.Label1 = New System.Windows.Forms.Label
        Me.SMSCclientCIMD2 = New smscc.CIMD2.SMSCclientCIMD2
        Me.SuspendLayout()
        '
        'chkDirectDisplay
        '
        Me.chkDirectDisplay.BackColor = System.Drawing.SystemColors.Control
        Me.chkDirectDisplay.Cursor = System.Windows.Forms.Cursors.Default
        Me.chkDirectDisplay.ForeColor = System.Drawing.SystemColors.ControlText
        Me.chkDirectDisplay.Location = New System.Drawing.Point(100, 348)
        Me.chkDirectDisplay.Name = "chkDirectDisplay"
        Me.chkDirectDisplay.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.chkDirectDisplay.Size = New System.Drawing.Size(201, 17)
        Me.chkDirectDisplay.TabIndex = 14
        Me.chkDirectDisplay.Text = "Direct display (Flash SMS)"
        Me.chkDirectDisplay.TextAlign = System.Drawing.ContentAlignment.BottomLeft
        Me.chkDirectDisplay.UseVisualStyleBackColor = False
        '
        'chkStatusReport
        '
        Me.chkStatusReport.BackColor = System.Drawing.SystemColors.Control
        Me.chkStatusReport.Checked = True
        Me.chkStatusReport.CheckState = System.Windows.Forms.CheckState.Checked
        Me.chkStatusReport.Cursor = System.Windows.Forms.Cursors.Default
        Me.chkStatusReport.ForeColor = System.Drawing.SystemColors.ControlText
        Me.chkStatusReport.Location = New System.Drawing.Point(100, 332)
        Me.chkStatusReport.Name = "chkStatusReport"
        Me.chkStatusReport.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.chkStatusReport.Size = New System.Drawing.Size(220, 17)
        Me.chkStatusReport.TabIndex = 13
        Me.chkStatusReport.Text = "Request status report for the message"
        Me.chkStatusReport.TextAlign = System.Drawing.ContentAlignment.BottomLeft
        Me.chkStatusReport.UseVisualStyleBackColor = False
        '
        'txtUDH
        '
        Me.txtUDH.AcceptsReturn = True
        Me.txtUDH.BackColor = System.Drawing.SystemColors.Window
        Me.txtUDH.Cursor = System.Windows.Forms.Cursors.IBeam
        Me.txtUDH.ForeColor = System.Drawing.SystemColors.WindowText
        Me.txtUDH.Location = New System.Drawing.Point(100, 260)
        Me.txtUDH.MaxLength = 0
        Me.txtUDH.Multiline = True
        Me.txtUDH.Name = "txtUDH"
        Me.txtUDH.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.txtUDH.Size = New System.Drawing.Size(201, 33)
        Me.txtUDH.TabIndex = 11
        '
        'cbEncoding
        '
        Me.cbEncoding.BackColor = System.Drawing.SystemColors.Window
        Me.cbEncoding.Cursor = System.Windows.Forms.Cursors.Default
        Me.cbEncoding.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
        Me.cbEncoding.ForeColor = System.Drawing.SystemColors.WindowText
        Me.cbEncoding.Items.AddRange(New Object() {"7 bit encoded text", "8 bit encoded data", "UCS2 encoded text"})
        Me.cbEncoding.Location = New System.Drawing.Point(100, 296)
        Me.cbEncoding.Name = "cbEncoding"
        Me.cbEncoding.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.cbEncoding.Size = New System.Drawing.Size(201, 21)
        Me.cbEncoding.TabIndex = 12
        '
        'txtOriginator
        '
        Me.txtOriginator.AcceptsReturn = True
        Me.txtOriginator.BackColor = System.Drawing.SystemColors.Window
        Me.txtOriginator.Cursor = System.Windows.Forms.Cursors.IBeam
        Me.txtOriginator.ForeColor = System.Drawing.SystemColors.WindowText
        Me.txtOriginator.Location = New System.Drawing.Point(100, 156)
        Me.txtOriginator.MaxLength = 0
        Me.txtOriginator.Name = "txtOriginator"
        Me.txtOriginator.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.txtOriginator.Size = New System.Drawing.Size(201, 20)
        Me.txtOriginator.TabIndex = 8
        '
        'txtPassword
        '
        Me.txtPassword.AcceptsReturn = True
        Me.txtPassword.BackColor = System.Drawing.SystemColors.Window
        Me.txtPassword.Cursor = System.Windows.Forms.Cursors.IBeam
        Me.txtPassword.ForeColor = System.Drawing.SystemColors.WindowText
        Me.txtPassword.Location = New System.Drawing.Point(100, 112)
        Me.txtPassword.MaxLength = 0
        Me.txtPassword.Name = "txtPassword"
        Me.txtPassword.PasswordChar = Global.Microsoft.VisualBasic.ChrW(42)
        Me.txtPassword.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.txtPassword.Size = New System.Drawing.Size(201, 20)
        Me.txtPassword.TabIndex = 7
        '
        'cmdInitialize
        '
        Me.cmdInitialize.BackColor = System.Drawing.SystemColors.Control
        Me.cmdInitialize.Cursor = System.Windows.Forms.Cursors.Default
        Me.cmdInitialize.ForeColor = System.Drawing.SystemColors.ControlText
        Me.cmdInitialize.Location = New System.Drawing.Point(320, 88)
        Me.cmdInitialize.Name = "cmdInitialize"
        Me.cmdInitialize.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.cmdInitialize.Size = New System.Drawing.Size(69, 23)
        Me.cmdInitialize.TabIndex = 2
        Me.cmdInitialize.Text = "Initialize"
        Me.cmdInitialize.UseVisualStyleBackColor = False
        '
        'txtUserID
        '
        Me.txtUserID.AcceptsReturn = True
        Me.txtUserID.BackColor = System.Drawing.SystemColors.Window
        Me.txtUserID.Cursor = System.Windows.Forms.Cursors.IBeam
        Me.txtUserID.ForeColor = System.Drawing.SystemColors.WindowText
        Me.txtUserID.Location = New System.Drawing.Point(100, 88)
        Me.txtUserID.MaxLength = 0
        Me.txtUserID.Name = "txtUserID"
        Me.txtUserID.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.txtUserID.Size = New System.Drawing.Size(201, 20)
        Me.txtUserID.TabIndex = 6
        '
        'txtDestination
        '
        Me.txtDestination.AcceptsReturn = True
        Me.txtDestination.BackColor = System.Drawing.SystemColors.Window
        Me.txtDestination.Cursor = System.Windows.Forms.Cursors.IBeam
        Me.txtDestination.ForeColor = System.Drawing.SystemColors.WindowText
        Me.txtDestination.Location = New System.Drawing.Point(100, 180)
        Me.txtDestination.MaxLength = 0
        Me.txtDestination.Name = "txtDestination"
        Me.txtDestination.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.txtDestination.Size = New System.Drawing.Size(201, 20)
        Me.txtDestination.TabIndex = 9
        '
        'txtLog
        '
        Me.txtLog.AcceptsReturn = True
        Me.txtLog.BackColor = System.Drawing.SystemColors.Window
        Me.txtLog.Cursor = System.Windows.Forms.Cursors.IBeam
        Me.txtLog.ForeColor = System.Drawing.SystemColors.WindowText
        Me.txtLog.Location = New System.Drawing.Point(20, 396)
        Me.txtLog.MaxLength = 0
        Me.txtLog.Multiline = True
        Me.txtLog.Name = "txtLog"
        Me.txtLog.ReadOnly = True
        Me.txtLog.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.txtLog.ScrollBars = System.Windows.Forms.ScrollBars.Both
        Me.txtLog.Size = New System.Drawing.Size(373, 101)
        Me.txtLog.TabIndex = 15
        Me.txtLog.WordWrap = False
        '
        'cmdSubmit
        '
        Me.cmdSubmit.BackColor = System.Drawing.SystemColors.Control
        Me.cmdSubmit.Cursor = System.Windows.Forms.Cursors.Default
        Me.cmdSubmit.ForeColor = System.Drawing.SystemColors.ControlText
        Me.cmdSubmit.Location = New System.Drawing.Point(320, 156)
        Me.cmdSubmit.Name = "cmdSubmit"
        Me.cmdSubmit.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.cmdSubmit.Size = New System.Drawing.Size(69, 23)
        Me.cmdSubmit.TabIndex = 3
        Me.cmdSubmit.Text = "Submit"
        Me.cmdSubmit.UseVisualStyleBackColor = False
        '
        'txtSubmit
        '
        Me.txtSubmit.AcceptsReturn = True
        Me.txtSubmit.BackColor = System.Drawing.SystemColors.Window
        Me.txtSubmit.Cursor = System.Windows.Forms.Cursors.IBeam
        Me.txtSubmit.ForeColor = System.Drawing.SystemColors.WindowText
        Me.txtSubmit.Location = New System.Drawing.Point(100, 204)
        Me.txtSubmit.MaxLength = 0
        Me.txtSubmit.Multiline = True
        Me.txtSubmit.Name = "txtSubmit"
        Me.txtSubmit.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.txtSubmit.Size = New System.Drawing.Size(201, 53)
        Me.txtSubmit.TabIndex = 10
        '
        'cmdDisconnect
        '
        Me.cmdDisconnect.BackColor = System.Drawing.SystemColors.Control
        Me.cmdDisconnect.Cursor = System.Windows.Forms.Cursors.Default
        Me.cmdDisconnect.ForeColor = System.Drawing.SystemColors.ControlText
        Me.cmdDisconnect.Location = New System.Drawing.Point(320, 44)
        Me.cmdDisconnect.Name = "cmdDisconnect"
        Me.cmdDisconnect.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.cmdDisconnect.Size = New System.Drawing.Size(69, 23)
        Me.cmdDisconnect.TabIndex = 1
        Me.cmdDisconnect.Text = "Disconnect"
        Me.cmdDisconnect.UseVisualStyleBackColor = False
        '
        'txtPort
        '
        Me.txtPort.AcceptsReturn = True
        Me.txtPort.BackColor = System.Drawing.SystemColors.Window
        Me.txtPort.Cursor = System.Windows.Forms.Cursors.IBeam
        Me.txtPort.ForeColor = System.Drawing.SystemColors.WindowText
        Me.txtPort.Location = New System.Drawing.Point(260, 12)
        Me.txtPort.MaxLength = 0
        Me.txtPort.Name = "txtPort"
        Me.txtPort.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.txtPort.Size = New System.Drawing.Size(41, 20)
        Me.txtPort.TabIndex = 5
        Me.txtPort.Text = "0"
        '
        'txtHost
        '
        Me.txtHost.AcceptsReturn = True
        Me.txtHost.BackColor = System.Drawing.SystemColors.Window
        Me.txtHost.Cursor = System.Windows.Forms.Cursors.IBeam
        Me.txtHost.ForeColor = System.Drawing.SystemColors.WindowText
        Me.txtHost.Location = New System.Drawing.Point(100, 12)
        Me.txtHost.MaxLength = 0
        Me.txtHost.Name = "txtHost"
        Me.txtHost.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.txtHost.Size = New System.Drawing.Size(117, 20)
        Me.txtHost.TabIndex = 4
        Me.txtHost.Text = "0.0.0.0"
        '
        'cmdConnect
        '
        Me.cmdConnect.BackColor = System.Drawing.SystemColors.Control
        Me.cmdConnect.Cursor = System.Windows.Forms.Cursors.Default
        Me.cmdConnect.ForeColor = System.Drawing.SystemColors.ControlText
        Me.cmdConnect.Location = New System.Drawing.Point(320, 12)
        Me.cmdConnect.Name = "cmdConnect"
        Me.cmdConnect.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.cmdConnect.Size = New System.Drawing.Size(69, 23)
        Me.cmdConnect.TabIndex = 0
        Me.cmdConnect.Text = "Connect"
        Me.cmdConnect.UseVisualStyleBackColor = False
        '
        'Label10
        '
        Me.Label10.AutoSize = True
        Me.Label10.BackColor = System.Drawing.SystemColors.Control
        Me.Label10.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label10.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label10.Location = New System.Drawing.Point(20, 380)
        Me.Label10.Name = "Label10"
        Me.Label10.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label10.Size = New System.Drawing.Size(55, 13)
        Me.Label10.TabIndex = 25
        Me.Label10.Text = "Event log:"
        '
        'Line1
        '
        Me.Line1.BackColor = System.Drawing.SystemColors.AppWorkspace
        Me.Line1.Location = New System.Drawing.Point(16, 372)
        Me.Line1.Name = "Line1"
        Me.Line1.Size = New System.Drawing.Size(380, 1)
        Me.Line1.TabIndex = 26
        '
        'Line4
        '
        Me.Line4.BackColor = System.Drawing.SystemColors.AppWorkspace
        Me.Line4.Location = New System.Drawing.Point(16, 144)
        Me.Line4.Name = "Line4"
        Me.Line4.Size = New System.Drawing.Size(380, 1)
        Me.Line4.TabIndex = 27
        '
        'Line2
        '
        Me.Line2.BackColor = System.Drawing.SystemColors.AppWorkspace
        Me.Line2.Location = New System.Drawing.Point(16, 76)
        Me.Line2.Name = "Line2"
        Me.Line2.Size = New System.Drawing.Size(380, 1)
        Me.Line2.TabIndex = 28
        '
        'Label8
        '
        Me.Label8.BackColor = System.Drawing.SystemColors.Control
        Me.Label8.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label8.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label8.Location = New System.Drawing.Point(20, 260)
        Me.Label8.Name = "Label8"
        Me.Label8.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label8.Size = New System.Drawing.Size(57, 29)
        Me.Label8.TabIndex = 24
        Me.Label8.Text = "User Data Header:"
        '
        'Label9
        '
        Me.Label9.AutoSize = True
        Me.Label9.BackColor = System.Drawing.SystemColors.Control
        Me.Label9.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label9.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label9.Location = New System.Drawing.Point(20, 300)
        Me.Label9.Name = "Label9"
        Me.Label9.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label9.Size = New System.Drawing.Size(55, 13)
        Me.Label9.TabIndex = 23
        Me.Label9.Text = "Encoding:"
        '
        'Label5
        '
        Me.Label5.AutoSize = True
        Me.Label5.BackColor = System.Drawing.SystemColors.Control
        Me.Label5.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label5.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label5.Location = New System.Drawing.Point(20, 160)
        Me.Label5.Name = "Label5"
        Me.Label5.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label5.Size = New System.Drawing.Size(55, 13)
        Me.Label5.TabIndex = 22
        Me.Label5.Text = "Originator:"
        '
        'Label4
        '
        Me.Label4.AutoSize = True
        Me.Label4.BackColor = System.Drawing.SystemColors.Control
        Me.Label4.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label4.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label4.Location = New System.Drawing.Point(20, 116)
        Me.Label4.Name = "Label4"
        Me.Label4.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label4.Size = New System.Drawing.Size(56, 13)
        Me.Label4.TabIndex = 21
        Me.Label4.Text = "Password:"
        '
        'Label7
        '
        Me.Label7.AutoSize = True
        Me.Label7.BackColor = System.Drawing.SystemColors.Control
        Me.Label7.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label7.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label7.Location = New System.Drawing.Point(20, 212)
        Me.Label7.Name = "Label7"
        Me.Label7.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label7.Size = New System.Drawing.Size(53, 13)
        Me.Label7.TabIndex = 20
        Me.Label7.Text = "Message:"
        '
        'Label6
        '
        Me.Label6.AutoSize = True
        Me.Label6.BackColor = System.Drawing.SystemColors.Control
        Me.Label6.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label6.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label6.Location = New System.Drawing.Point(20, 184)
        Me.Label6.Name = "Label6"
        Me.Label6.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label6.Size = New System.Drawing.Size(63, 13)
        Me.Label6.TabIndex = 19
        Me.Label6.Text = "Destination:"
        '
        'Label3
        '
        Me.Label3.AutoSize = True
        Me.Label3.BackColor = System.Drawing.SystemColors.Control
        Me.Label3.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label3.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label3.Location = New System.Drawing.Point(20, 92)
        Me.Label3.Name = "Label3"
        Me.Label3.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label3.Size = New System.Drawing.Size(46, 13)
        Me.Label3.TabIndex = 18
        Me.Label3.Text = "User ID:"
        '
        'Label2
        '
        Me.Label2.AutoSize = True
        Me.Label2.BackColor = System.Drawing.SystemColors.Control
        Me.Label2.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label2.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label2.Location = New System.Drawing.Point(224, 16)
        Me.Label2.Name = "Label2"
        Me.Label2.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label2.Size = New System.Drawing.Size(29, 13)
        Me.Label2.TabIndex = 17
        Me.Label2.Text = "Port:"
        '
        'Label1
        '
        Me.Label1.AutoSize = True
        Me.Label1.BackColor = System.Drawing.SystemColors.Control
        Me.Label1.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label1.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label1.Location = New System.Drawing.Point(20, 16)
        Me.Label1.Name = "Label1"
        Me.Label1.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label1.Size = New System.Drawing.Size(80, 13)
        Me.Label1.TabIndex = 16
        Me.Label1.Text = "SMSC address:"
        '
        'SMSCclientCIMD2
        '
        Me.SMSCclientCIMD2.ImmediateResponse = False
        Me.SMSCclientCIMD2.KeepAliveInterval = 10
        Me.SMSCclientCIMD2.ResponseTimeOut = 10
        '
        'fmMain
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
        Me.ClientSize = New System.Drawing.Size(414, 516)
        Me.Controls.Add(Me.chkStatusReport)
        Me.Controls.Add(Me.txtUDH)
        Me.Controls.Add(Me.cbEncoding)
        Me.Controls.Add(Me.txtOriginator)
        Me.Controls.Add(Me.txtPassword)
        Me.Controls.Add(Me.cmdInitialize)
        Me.Controls.Add(Me.txtUserID)
        Me.Controls.Add(Me.txtDestination)
        Me.Controls.Add(Me.txtLog)
        Me.Controls.Add(Me.cmdSubmit)
        Me.Controls.Add(Me.txtSubmit)
        Me.Controls.Add(Me.cmdDisconnect)
        Me.Controls.Add(Me.txtPort)
        Me.Controls.Add(Me.txtHost)
        Me.Controls.Add(Me.cmdConnect)
        Me.Controls.Add(Me.Label10)
        Me.Controls.Add(Me.Line1)
        Me.Controls.Add(Me.Line4)
        Me.Controls.Add(Me.Line2)
        Me.Controls.Add(Me.Label8)
        Me.Controls.Add(Me.Label9)
        Me.Controls.Add(Me.Label5)
        Me.Controls.Add(Me.Label4)
        Me.Controls.Add(Me.Label7)
        Me.Controls.Add(Me.Label6)
        Me.Controls.Add(Me.Label3)
        Me.Controls.Add(Me.Label2)
        Me.Controls.Add(Me.Label1)
        Me.Controls.Add(Me.chkDirectDisplay)
        Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog
        Me.MaximizeBox = False
        Me.MinimizeBox = False
        Me.Name = "fmMain"
        Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
        Me.Text = "SMSC client .NET CIMD2 sample"
        Me.ResumeLayout(False)
        Me.PerformLayout()

    End Sub
#End Region

    Private Log As EventLog

    ' Connect to SMSC
    Private Sub cmdConnect_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmdConnect.Click
        Dim Result As Integer

        txtLog.Text = ""
        txtLog.Refresh()

        Result = SMSCclientCIMD2.tcpConnect(txtHost.Text, CInt(txtPort.Text))

        If Result <> 0 Then
            Log.AddConnectionErrorEvent(Result)
        Else
            Log.AddConnectedEvent()
        End If
    End Sub

    ' Disonnect from SMSC
    Private Sub cmdDisconnect_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmdDisconnect.Click
        SMSCclientCIMD2.tcpDisconnect()
    End Sub

    ' Initialize session with SMSC
    Private Sub cmdInitialize_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmdInitialize.Click
        Dim Result As Integer

        Result = SMSCclientCIMD2.cimd2InitializeSession(txtUserID.Text, txtPassword.Text)

        If Result <> 0 Then
            Log.AddInitializationErrorEvent(Result)
        Else
            Log.AddInitializedEvent()
        End If
    End Sub

    ' Submit message to the SMSC
    Private Sub cmdSubmit_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles cmdSubmit.Click
        Dim Result As Integer
        Dim TimeStamp As Date
        Dim Encoding As EncodingEnum
        Dim Options As Integer

        Select Case cbEncoding.SelectedIndex
            Case 2
                Encoding = EncodingEnum.etUCS2Text
            Case 1
                Encoding = EncodingEnum.et8BitHexadecimal
            Case Else
                Encoding = EncodingEnum.et7BitText
        End Select

        Options = 0
        If chkStatusReport.CheckState = CheckState.Checked Then Options = Options Or SubmitOptionEnum.soRequestStatusReport
        If chkDirectDisplay.CheckState = CheckState.Checked Then Options = Options Or SubmitOptionEnum.soDirectDisplay

        Result = SMSCclientCIMD2.cimd2SubmitMessage(txtDestination.Text, txtOriginator.Text, txtSubmit.Text, Encoding, txtUDH.Text, Options, "", TimeStamp)

        If Result <> 0 Then
            Log.AddMessageSubmissionErrorEvent(Result)
        Else
            Log.AddMessageSubmitedEvent(TimeStamp)
        End If
    End Sub

    Private Sub fmMain_Load(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles MyBase.Load
        Log = New EventLog(txtLog)
        cbEncoding.SelectedIndex = 0
    End Sub

    ' Disconnected from SMSC
    Private Sub SMSCclientCIMD2_OnTcpDisconnected(ByVal sender As Object, ByVal e As tcpDisconnectedEventArgs) Handles SMSCclientCIMD2.OnTcpDisconnected
        Log.AddDisconnectedEvent(e.Reason)
    End Sub

    ' Message received from SMSC
    Private Sub SMSCclientCIMD2_OnCimd2MessageReceived(ByVal Sender As Object, ByVal e As cimd2MessageReceivedEventArgs) Handles SMSCclientCIMD2.OnCimd2MessageReceived
        Log.AddMessageReceivedEvent(e.Destination, e.Originator, e.Content, e.Encoding, e.UserDataHeader, e.TimeStamp)
    End Sub

    ' Status Report (SR) received from SMSC
    Private Sub SMSCclientCIMD2_OnCimd2StatusReportReceived(ByVal Sender As Object, ByVal e As cimd2StatusReportReceivedEventArgs) Handles SMSCclientCIMD2.OnCimd2StatusReportReceived
        Log.AddStatusReportReceivedEvent(e.MessageTimeStamp, e.Destination, e.StatusCode, e.StatusErrorCode, e.TimeStamp)
    End Sub
End Class

Youez - 2016 - github.com/yon3zu
LinuXploit