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/SMPP/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Program Files/SMSC client .NET/samples/vb-net/SMPP/Main.vb
'------------------------------------------------------------------------------
' SMSC client .NET components SMPP 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.SMPP

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 txtDestTON As System.Windows.Forms.TextBox
    Public WithEvents txtDestNPI As System.Windows.Forms.TextBox
    Public WithEvents txtOrigTON As System.Windows.Forms.TextBox
    Public WithEvents txtOrigNPI As System.Windows.Forms.TextBox
    Public WithEvents txtSystemType As System.Windows.Forms.TextBox
    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 txtNPI As System.Windows.Forms.TextBox
    Public WithEvents txtTON As System.Windows.Forms.TextBox
    Public WithEvents txtSystemID 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 Label17 As System.Windows.Forms.Label
    Public WithEvents Line2 As System.Windows.Forms.Label
    Public WithEvents Label16 As System.Windows.Forms.Label
    Public WithEvents Line1 As System.Windows.Forms.Label
    Public WithEvents Line5 As System.Windows.Forms.Label
    Public WithEvents Label15 As System.Windows.Forms.Label
    Public WithEvents Label14 As System.Windows.Forms.Label
    Public WithEvents Label11 As System.Windows.Forms.Label
    Public WithEvents Label13 As System.Windows.Forms.Label
    Public WithEvents Label12 As System.Windows.Forms.Label
    Public WithEvents Label10 As System.Windows.Forms.Label
    Public WithEvents Label9 As System.Windows.Forms.Label
    Public WithEvents Label8 As System.Windows.Forms.Label
    Public WithEvents Label7 As System.Windows.Forms.Label
    Public WithEvents Label6 As System.Windows.Forms.Label
    Public WithEvents Label5 As System.Windows.Forms.Label
    Public WithEvents Label4 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 SMSCclientSMPP As SMSCclientSMPP
    <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.txtDestTON = New System.Windows.Forms.TextBox
        Me.txtDestNPI = New System.Windows.Forms.TextBox
        Me.txtOrigTON = New System.Windows.Forms.TextBox
        Me.txtOrigNPI = New System.Windows.Forms.TextBox
        Me.txtSystemType = New System.Windows.Forms.TextBox
        Me.txtOriginator = New System.Windows.Forms.TextBox
        Me.txtPassword = New System.Windows.Forms.TextBox
        Me.cmdInitialize = New System.Windows.Forms.Button
        Me.txtNPI = New System.Windows.Forms.TextBox
        Me.txtTON = New System.Windows.Forms.TextBox
        Me.txtSystemID = 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.Label17 = New System.Windows.Forms.Label
        Me.Line2 = New System.Windows.Forms.Label
        Me.Label16 = New System.Windows.Forms.Label
        Me.Line1 = New System.Windows.Forms.Label
        Me.Line5 = New System.Windows.Forms.Label
        Me.Label15 = New System.Windows.Forms.Label
        Me.Label14 = New System.Windows.Forms.Label
        Me.Label11 = New System.Windows.Forms.Label
        Me.Label13 = New System.Windows.Forms.Label
        Me.Label12 = New System.Windows.Forms.Label
        Me.Label10 = New System.Windows.Forms.Label
        Me.Label9 = New System.Windows.Forms.Label
        Me.Label8 = New System.Windows.Forms.Label
        Me.Label7 = New System.Windows.Forms.Label
        Me.Label6 = New System.Windows.Forms.Label
        Me.Label5 = New System.Windows.Forms.Label
        Me.Label4 = 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.SMSCclientSMPP = New smscc.SMPP.SMSCclientSMPP
        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, 416)
        Me.chkDirectDisplay.Name = "chkDirectDisplay"
        Me.chkDirectDisplay.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.chkDirectDisplay.Size = New System.Drawing.Size(201, 17)
        Me.chkDirectDisplay.TabIndex = 21
        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, 400)
        Me.chkStatusReport.Name = "chkStatusReport"
        Me.chkStatusReport.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.chkStatusReport.Size = New System.Drawing.Size(216, 16)
        Me.chkStatusReport.TabIndex = 20
        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, 332)
        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 = 18
        '
        '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, 368)
        Me.cbEncoding.Name = "cbEncoding"
        Me.cbEncoding.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.cbEncoding.Size = New System.Drawing.Size(201, 21)
        Me.cbEncoding.TabIndex = 19
        '
        'txtDestTON
        '
        Me.txtDestTON.AcceptsReturn = True
        Me.txtDestTON.BackColor = System.Drawing.SystemColors.Window
        Me.txtDestTON.Cursor = System.Windows.Forms.Cursors.IBeam
        Me.txtDestTON.ForeColor = System.Drawing.SystemColors.WindowText
        Me.txtDestTON.Location = New System.Drawing.Point(100, 252)
        Me.txtDestTON.MaxLength = 0
        Me.txtDestTON.Name = "txtDestTON"
        Me.txtDestTON.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.txtDestTON.Size = New System.Drawing.Size(65, 20)
        Me.txtDestTON.TabIndex = 15
        Me.txtDestTON.Text = "1"
        '
        'txtDestNPI
        '
        Me.txtDestNPI.AcceptsReturn = True
        Me.txtDestNPI.BackColor = System.Drawing.SystemColors.Window
        Me.txtDestNPI.Cursor = System.Windows.Forms.Cursors.IBeam
        Me.txtDestNPI.ForeColor = System.Drawing.SystemColors.WindowText
        Me.txtDestNPI.Location = New System.Drawing.Point(236, 252)
        Me.txtDestNPI.MaxLength = 0
        Me.txtDestNPI.Name = "txtDestNPI"
        Me.txtDestNPI.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.txtDestNPI.Size = New System.Drawing.Size(65, 20)
        Me.txtDestNPI.TabIndex = 16
        Me.txtDestNPI.Text = "1"
        '
        'txtOrigTON
        '
        Me.txtOrigTON.AcceptsReturn = True
        Me.txtOrigTON.BackColor = System.Drawing.SystemColors.Window
        Me.txtOrigTON.Cursor = System.Windows.Forms.Cursors.IBeam
        Me.txtOrigTON.ForeColor = System.Drawing.SystemColors.WindowText
        Me.txtOrigTON.Location = New System.Drawing.Point(100, 204)
        Me.txtOrigTON.MaxLength = 0
        Me.txtOrigTON.Name = "txtOrigTON"
        Me.txtOrigTON.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.txtOrigTON.Size = New System.Drawing.Size(65, 20)
        Me.txtOrigTON.TabIndex = 12
        Me.txtOrigTON.Text = "1"
        '
        'txtOrigNPI
        '
        Me.txtOrigNPI.AcceptsReturn = True
        Me.txtOrigNPI.BackColor = System.Drawing.SystemColors.Window
        Me.txtOrigNPI.Cursor = System.Windows.Forms.Cursors.IBeam
        Me.txtOrigNPI.ForeColor = System.Drawing.SystemColors.WindowText
        Me.txtOrigNPI.Location = New System.Drawing.Point(236, 204)
        Me.txtOrigNPI.MaxLength = 0
        Me.txtOrigNPI.Name = "txtOrigNPI"
        Me.txtOrigNPI.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.txtOrigNPI.Size = New System.Drawing.Size(65, 20)
        Me.txtOrigNPI.TabIndex = 13
        Me.txtOrigNPI.Text = "1"
        '
        'txtSystemType
        '
        Me.txtSystemType.AcceptsReturn = True
        Me.txtSystemType.BackColor = System.Drawing.SystemColors.Window
        Me.txtSystemType.Cursor = System.Windows.Forms.Cursors.IBeam
        Me.txtSystemType.ForeColor = System.Drawing.SystemColors.WindowText
        Me.txtSystemType.ImeMode = System.Windows.Forms.ImeMode.Disable
        Me.txtSystemType.Location = New System.Drawing.Point(100, 136)
        Me.txtSystemType.MaxLength = 0
        Me.txtSystemType.Name = "txtSystemType"
        Me.txtSystemType.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.txtSystemType.Size = New System.Drawing.Size(117, 20)
        Me.txtSystemType.TabIndex = 10
        '
        '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, 180)
        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 = 11
        '
        '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(117, 20)
        Me.txtPassword.TabIndex = 8
        '
        '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
        '
        'txtNPI
        '
        Me.txtNPI.AcceptsReturn = True
        Me.txtNPI.BackColor = System.Drawing.SystemColors.Window
        Me.txtNPI.Cursor = System.Windows.Forms.Cursors.IBeam
        Me.txtNPI.ForeColor = System.Drawing.SystemColors.WindowText
        Me.txtNPI.Location = New System.Drawing.Point(260, 112)
        Me.txtNPI.MaxLength = 0
        Me.txtNPI.Name = "txtNPI"
        Me.txtNPI.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.txtNPI.Size = New System.Drawing.Size(41, 20)
        Me.txtNPI.TabIndex = 9
        Me.txtNPI.Text = "1"
        '
        'txtTON
        '
        Me.txtTON.AcceptsReturn = True
        Me.txtTON.BackColor = System.Drawing.SystemColors.Window
        Me.txtTON.Cursor = System.Windows.Forms.Cursors.IBeam
        Me.txtTON.ForeColor = System.Drawing.SystemColors.WindowText
        Me.txtTON.Location = New System.Drawing.Point(260, 88)
        Me.txtTON.MaxLength = 0
        Me.txtTON.Name = "txtTON"
        Me.txtTON.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.txtTON.Size = New System.Drawing.Size(41, 20)
        Me.txtTON.TabIndex = 7
        Me.txtTON.Text = "1"
        '
        'txtSystemID
        '
        Me.txtSystemID.AcceptsReturn = True
        Me.txtSystemID.BackColor = System.Drawing.SystemColors.Window
        Me.txtSystemID.Cursor = System.Windows.Forms.Cursors.IBeam
        Me.txtSystemID.ForeColor = System.Drawing.SystemColors.WindowText
        Me.txtSystemID.Location = New System.Drawing.Point(100, 88)
        Me.txtSystemID.MaxLength = 0
        Me.txtSystemID.Name = "txtSystemID"
        Me.txtSystemID.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.txtSystemID.Size = New System.Drawing.Size(117, 20)
        Me.txtSystemID.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, 228)
        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 = 14
        '
        '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, 464)
        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 = 22
        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, 180)
        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, 276)
        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 = 17
        '
        '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.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(238, Byte))
        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
        '
        'Label17
        '
        Me.Label17.AutoSize = True
        Me.Label17.BackColor = System.Drawing.SystemColors.Control
        Me.Label17.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label17.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label17.Location = New System.Drawing.Point(20, 448)
        Me.Label17.Name = "Label17"
        Me.Label17.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label17.Size = New System.Drawing.Size(55, 13)
        Me.Label17.TabIndex = 39
        Me.Label17.Text = "Event log:"
        '
        'Line2
        '
        Me.Line2.BackColor = System.Drawing.SystemColors.AppWorkspace
        Me.Line2.Location = New System.Drawing.Point(16, 440)
        Me.Line2.Name = "Line2"
        Me.Line2.Size = New System.Drawing.Size(380, 1)
        Me.Line2.TabIndex = 40
        '
        'Label16
        '
        Me.Label16.BackColor = System.Drawing.SystemColors.Control
        Me.Label16.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label16.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label16.Location = New System.Drawing.Point(20, 332)
        Me.Label16.Name = "Label16"
        Me.Label16.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label16.Size = New System.Drawing.Size(57, 29)
        Me.Label16.TabIndex = 38
        Me.Label16.Text = "User Data Header:"
        '
        'Line1
        '
        Me.Line1.BackColor = System.Drawing.SystemColors.AppWorkspace
        Me.Line1.Location = New System.Drawing.Point(16, 76)
        Me.Line1.Name = "Line1"
        Me.Line1.Size = New System.Drawing.Size(380, 1)
        Me.Line1.TabIndex = 41
        '
        'Line5
        '
        Me.Line5.BackColor = System.Drawing.SystemColors.AppWorkspace
        Me.Line5.Location = New System.Drawing.Point(16, 168)
        Me.Line5.Name = "Line5"
        Me.Line5.Size = New System.Drawing.Size(380, 1)
        Me.Line5.TabIndex = 42
        '
        'Label15
        '
        Me.Label15.BackColor = System.Drawing.SystemColors.Control
        Me.Label15.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label15.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label15.Location = New System.Drawing.Point(20, 372)
        Me.Label15.Name = "Label15"
        Me.Label15.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label15.Size = New System.Drawing.Size(57, 13)
        Me.Label15.TabIndex = 37
        Me.Label15.Text = "Encoding:"
        '
        'Label14
        '
        Me.Label14.AutoSize = True
        Me.Label14.BackColor = System.Drawing.SystemColors.Control
        Me.Label14.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label14.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label14.Location = New System.Drawing.Point(184, 256)
        Me.Label14.Name = "Label14"
        Me.Label14.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label14.Size = New System.Drawing.Size(56, 13)
        Me.Label14.TabIndex = 36
        Me.Label14.Text = "Dest. NPI:"
        '
        'Label11
        '
        Me.Label11.AutoSize = True
        Me.Label11.BackColor = System.Drawing.SystemColors.Control
        Me.Label11.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label11.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label11.Location = New System.Drawing.Point(20, 256)
        Me.Label11.Name = "Label11"
        Me.Label11.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label11.Size = New System.Drawing.Size(61, 13)
        Me.Label11.TabIndex = 35
        Me.Label11.Text = "Dest. TON:"
        '
        'Label13
        '
        Me.Label13.AutoSize = True
        Me.Label13.BackColor = System.Drawing.SystemColors.Control
        Me.Label13.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label13.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label13.Location = New System.Drawing.Point(184, 208)
        Me.Label13.Name = "Label13"
        Me.Label13.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label13.Size = New System.Drawing.Size(53, 13)
        Me.Label13.TabIndex = 34
        Me.Label13.Text = "Orig. NPI:"
        '
        'Label12
        '
        Me.Label12.AutoSize = True
        Me.Label12.BackColor = System.Drawing.SystemColors.Control
        Me.Label12.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label12.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label12.Location = New System.Drawing.Point(20, 208)
        Me.Label12.Name = "Label12"
        Me.Label12.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label12.Size = New System.Drawing.Size(58, 13)
        Me.Label12.TabIndex = 33
        Me.Label12.Text = "Orig. TON:"
        '
        '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, 140)
        Me.Label10.Name = "Label10"
        Me.Label10.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label10.Size = New System.Drawing.Size(71, 13)
        Me.Label10.TabIndex = 32
        Me.Label10.Text = "System Type:"
        '
        '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, 184)
        Me.Label9.Name = "Label9"
        Me.Label9.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label9.Size = New System.Drawing.Size(55, 13)
        Me.Label9.TabIndex = 31
        Me.Label9.Text = "Originator:"
        '
        'Label8
        '
        Me.Label8.AutoSize = True
        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, 116)
        Me.Label8.Name = "Label8"
        Me.Label8.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label8.Size = New System.Drawing.Size(56, 13)
        Me.Label8.TabIndex = 30
        Me.Label8.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, 280)
        Me.Label7.Name = "Label7"
        Me.Label7.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label7.Size = New System.Drawing.Size(53, 13)
        Me.Label7.TabIndex = 29
        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, 232)
        Me.Label6.Name = "Label6"
        Me.Label6.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label6.Size = New System.Drawing.Size(63, 13)
        Me.Label6.TabIndex = 28
        Me.Label6.Text = "Destination:"
        '
        '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(224, 116)
        Me.Label5.Name = "Label5"
        Me.Label5.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label5.Size = New System.Drawing.Size(28, 13)
        Me.Label5.TabIndex = 27
        Me.Label5.Text = "NPI:"
        '
        '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(224, 92)
        Me.Label4.Name = "Label4"
        Me.Label4.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label4.Size = New System.Drawing.Size(33, 13)
        Me.Label4.TabIndex = 26
        Me.Label4.Text = "TON:"
        '
        '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(58, 13)
        Me.Label3.TabIndex = 25
        Me.Label3.Text = "System 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 = 24
        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 = 23
        Me.Label1.Text = "SMSC address:"
        '
        'SMSCclientSMPP
        '
        Me.SMSCclientSMPP.ImmediateResponse = False
        Me.SMSCclientSMPP.KeepAliveInterval = 10
        Me.SMSCclientSMPP.ResponseTimeOut = 10
        Me.SMSCclientSMPP.ThrottleRate = 0
        '
        'fmMain
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
        Me.ClientSize = New System.Drawing.Size(414, 585)
        Me.Controls.Add(Me.chkStatusReport)
        Me.Controls.Add(Me.txtUDH)
        Me.Controls.Add(Me.cbEncoding)
        Me.Controls.Add(Me.txtDestTON)
        Me.Controls.Add(Me.txtDestNPI)
        Me.Controls.Add(Me.txtOrigTON)
        Me.Controls.Add(Me.txtOrigNPI)
        Me.Controls.Add(Me.txtSystemType)
        Me.Controls.Add(Me.txtOriginator)
        Me.Controls.Add(Me.txtPassword)
        Me.Controls.Add(Me.cmdInitialize)
        Me.Controls.Add(Me.txtNPI)
        Me.Controls.Add(Me.txtTON)
        Me.Controls.Add(Me.txtSystemID)
        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.Label17)
        Me.Controls.Add(Me.Line2)
        Me.Controls.Add(Me.Label16)
        Me.Controls.Add(Me.Line1)
        Me.Controls.Add(Me.Line5)
        Me.Controls.Add(Me.Label15)
        Me.Controls.Add(Me.Label14)
        Me.Controls.Add(Me.Label11)
        Me.Controls.Add(Me.Label13)
        Me.Controls.Add(Me.Label12)
        Me.Controls.Add(Me.Label10)
        Me.Controls.Add(Me.Label9)
        Me.Controls.Add(Me.Label8)
        Me.Controls.Add(Me.Label7)
        Me.Controls.Add(Me.Label6)
        Me.Controls.Add(Me.Label5)
        Me.Controls.Add(Me.Label4)
        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 SMPP 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 = SMSCclientSMPP.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
        SMSCclientSMPP.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 = SMSCclientSMPP.smppInitializeSession(txtSystemID.Text, txtPassword.Text, CByte(txtTON.Text), CByte(txtNPI.Text), txtSystemType.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 MessageID As String
        Dim Encoding As EncodingEnum
        Dim Options As Integer

        MessageID = ""

        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 = SMSCclientSMPP.smppSubmitMessage(txtDestination.Text, CByte(txtDestTON.Text), CByte(txtDestNPI.Text), txtOriginator.Text, CByte(txtOrigTON.Text), CByte(txtOrigNPI.Text), txtSubmit.Text, Encoding, txtUDH.Text, Options, MessageID)

        If Result <> 0 Then
            Log.AddMessageSubmissionErrorEvent(Result)
        Else
            Log.AddMessageSubmitedEvent(MessageID)
        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 SMSCRelaySMPP_OnTcpDisconnected(ByVal sender As Object, ByVal e As tcpDisconnectedEventArgs) Handles SMSCclientSMPP.OnTcpDisconnected
        Log.AddDisconnectedEvent(e.Reason)
    End Sub

    ' Message received from SMSC
    Private Sub SMSCRelaySMPP_OnSmppMessageReceived(ByVal sender As Object, ByVal e As smppMessageReceivedEventArgs) Handles SMSCclientSMPP.OnSmppMessageReceived
        Log.AddMessageReceivedEvent(e.Destination, e.Originator, e.Content, e.Encoding, e.UserDataHeader)
    End Sub

    ' Status Report (SR) received from SMSC
    Private Sub SMSCRelaySMPP_OnSmppStatusReportReceived(ByVal sender As Object, ByVal e As smppStatusReportReceivedEventArgs) Handles SMSCclientSMPP.OnSmppStatusReportReceived
        Log.AddStatusReportReceivedEvent(e.MessageID, e.Destination, e.Originator, e.MessageState, e.NetworkErrorCode)
    End Sub

End Class

Youez - 2016 - github.com/yon3zu
LinuXploit