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 :  /Program Files/SMSC client .NET/samples/vb-net/SEMA/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

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

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 cbEncoding As System.Windows.Forms.ComboBox
    Public WithEvents txtUDH As System.Windows.Forms.TextBox
    Public WithEvents chkStatusReport As System.Windows.Forms.CheckBox
    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 txtOriginator 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 Line3 As System.Windows.Forms.Label
    Public WithEvents Label17 As System.Windows.Forms.Label
    Public WithEvents Label16 As System.Windows.Forms.Label
    Public WithEvents Line1 As System.Windows.Forms.Label
    Public WithEvents Line2 As System.Windows.Forms.Label
    Public WithEvents Label9 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 SMSCclientSEMA As SMSCclientSEMA
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.chkDirectDisplay = New System.Windows.Forms.CheckBox
        Me.cbEncoding = New System.Windows.Forms.ComboBox
        Me.txtUDH = New System.Windows.Forms.TextBox
        Me.chkStatusReport = New System.Windows.Forms.CheckBox
        Me.cmdInitialize = New System.Windows.Forms.Button
        Me.txtNPI = New System.Windows.Forms.TextBox
        Me.txtTON = New System.Windows.Forms.TextBox
        Me.txtOriginator = 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.Line3 = New System.Windows.Forms.Label
        Me.Label17 = New System.Windows.Forms.Label
        Me.Label16 = New System.Windows.Forms.Label
        Me.Line1 = New System.Windows.Forms.Label
        Me.Line2 = New System.Windows.Forms.Label
        Me.Label9 = 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.SMSCclientSEMA = New smscc.SEMA.SMSCclientSEMA
        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, 320)
        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
        '
        '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, 272)
        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
        '
        '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, 236)
        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
        '
        '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, 304)
        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
        '
        '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(220, 112)
        Me.txtNPI.MaxLength = 0
        Me.txtNPI.Name = "txtNPI"
        Me.txtNPI.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.txtNPI.Size = New System.Drawing.Size(81, 20)
        Me.txtNPI.TabIndex = 8
        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(100, 112)
        Me.txtTON.MaxLength = 0
        Me.txtTON.Name = "txtTON"
        Me.txtTON.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.txtTON.Size = New System.Drawing.Size(77, 20)
        Me.txtTON.TabIndex = 7
        Me.txtTON.Text = "1"
        '
        '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, 88)
        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 = 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, 156)
        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, 368)
        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, 180)
        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
        '
        'Line3
        '
        Me.Line3.BackColor = System.Drawing.SystemColors.AppWorkspace
        Me.Line3.Location = New System.Drawing.Point(16, 344)
        Me.Line3.Name = "Line3"
        Me.Line3.Size = New System.Drawing.Size(380, 1)
        Me.Line3.TabIndex = 17
        '
        'Label17
        '
        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, 352)
        Me.Label17.Name = "Label17"
        Me.Label17.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label17.Size = New System.Drawing.Size(60, 17)
        Me.Label17.TabIndex = 25
        Me.Label17.Text = "Event log:"
        '
        '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, 236)
        Me.Label16.Name = "Label16"
        Me.Label16.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label16.Size = New System.Drawing.Size(57, 29)
        Me.Label16.TabIndex = 24
        Me.Label16.Text = "User Data Header:"
        '
        'Line1
        '
        Me.Line1.BackColor = System.Drawing.SystemColors.AppWorkspace
        Me.Line1.Location = New System.Drawing.Point(16, 144)
        Me.Line1.Name = "Line1"
        Me.Line1.Size = New System.Drawing.Size(380, 1)
        Me.Line1.TabIndex = 26
        '
        '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 = 27
        '
        'Label9
        '
        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, 276)
        Me.Label9.Name = "Label9"
        Me.Label9.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label9.Size = New System.Drawing.Size(53, 13)
        Me.Label9.TabIndex = 23
        Me.Label9.Text = "Encoding:"
        '
        '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, 184)
        Me.Label7.Name = "Label7"
        Me.Label7.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label7.Size = New System.Drawing.Size(53, 13)
        Me.Label7.TabIndex = 22
        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, 160)
        Me.Label6.Name = "Label6"
        Me.Label6.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label6.Size = New System.Drawing.Size(63, 13)
        Me.Label6.TabIndex = 21
        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(188, 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 = 20
        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(20, 116)
        Me.Label4.Name = "Label4"
        Me.Label4.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label4.Size = New System.Drawing.Size(33, 13)
        Me.Label4.TabIndex = 19
        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(55, 13)
        Me.Label3.TabIndex = 18
        Me.Label3.Text = "Originator:"
        '
        '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:"
        '
        'SMSCclientSEMA
        '
        Me.SMSCclientSEMA.ImmediateResponse = False
        Me.SMSCclientSEMA.KeepAliveInterval = 10
        Me.SMSCclientSEMA.ResponseTimeOut = 10
        '
        'fmMain
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
        Me.ClientSize = New System.Drawing.Size(414, 488)
        Me.Controls.Add(Me.cbEncoding)
        Me.Controls.Add(Me.txtUDH)
        Me.Controls.Add(Me.chkStatusReport)
        Me.Controls.Add(Me.cmdInitialize)
        Me.Controls.Add(Me.txtNPI)
        Me.Controls.Add(Me.txtTON)
        Me.Controls.Add(Me.txtOriginator)
        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.Line3)
        Me.Controls.Add(Me.Label17)
        Me.Controls.Add(Me.Label16)
        Me.Controls.Add(Me.Line1)
        Me.Controls.Add(Me.Line2)
        Me.Controls.Add(Me.Label9)
        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 SEMA 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 = SMSCclientSEMA.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
        SMSCclientSEMA.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 = SMSCclientSEMA.semaInitializeSession(txtOriginator.Text, CByte(txtTON.Text), CByte(txtNPI.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 TimeStamp As Date
        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 = SMSCclientSEMA.semaSubmitMessage(txtDestination.Text, txtOriginator.Text, CByte(txtTON.Text), CByte(txtNPI.Text), txtSubmit.Text, Encoding, txtUDH.Text, Options, MessageID, TimeStamp)

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

    ' Message received from SMSC
    Private Sub SMSCRelaySEMA_OnSemaMessageReceived(ByVal sender As Object, ByVal e As semaMessageReceivedEventArgs) Handles SMSCclientSEMA.OnSemaMessageReceived
        Log.AddMessageReceivedEvent(e.Destination, e.Originator, e.Content, e.Encoding, e.UserDataHeader, e.TimeStamp)
    End Sub

    ' Status Report (SR) received from SMSC
    Private Sub SMSCRelaySEMA_OnSemaStatusReportReceived(ByVal Sender As Object, ByVal e As semaStatusReportReceivedEventArgs) Handles SMSCclientSEMA.OnSemaStatusReportReceived
        Log.AddStatusReportReceivedEvent(e.MessageID, e.MessageTimeStamp, e.Destination, e.Originator, e.MessageStatus, e.DeliveryFailureReason, e.TimeStamp)
    End Sub
End Class

Youez - 2016 - github.com/yon3zu
LinuXploit