⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pdu encoder.vb

📁 输入手机短信的服务中心号码
💻 VB
📖 第 1 页 / 共 2 页
字号:
'########################################################
'               PDU Encoder Demo Project
'*Author:
'   Hesicong
'
'*Last Modify Date:
'   2005/5/28
'
'*Description:
'       This program demostrates my PDU Encoder and gives a
'   convience way to get PDU Encoder by simply set some 
'   properties.
'       This program is only a demo, so the code is not very
'   well written. Maybe some bugs are hidden, and some cashed
'   may happen.You can use this code as the base of your project.
''
'*Note:
'   You can use and modify this code freely. But if you find or fixed 
'this code, please send your code to me. This helps me to improve my code
'and more people will be benefited from your code! Thanks!
'
'*Contace me:
'   Email:hesicong@mail.sc.cninfo.net
'   HomePage(Chinese): http://dream-world.nease.net
'   CSDN Blog: http://blog.csdn.net/hesicong
'   Tencent QQ: 38288890
'   MSN Spaces: http://spaces.msn.com/members/hesicong

Imports PDU_Encoder__New_Windows_Form_.SMS.Encoder.SMS
Imports PDU_Encoder__New_Windows_Form_.SMS.Encoder.ConcatenatedShortMessage
Public Class frmMain
    Inherits System.Windows.Forms.Form
    Dim SMSObject 'Object To Store SMS or ConcatenatedShortMessage. Late Blinding.
    Dim DataCodingScheme As ENUM_TP_DCS
    Dim ValidPeriod As ENUM_TP_VPF
    Dim PDUCodes() As String

#Region " Windows 窗体设计器生成的代码 "

    Public Sub New()
        MyBase.New()

        '该调用是 Windows 窗体设计器所必需的。
        InitializeComponent()

        '在 InitializeComponent() 调用之后添加任何初始化

    End Sub

    '窗体重写 dispose 以清理组件列表。
    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

    'Windows 窗体设计器所必需的
    Private components As System.ComponentModel.IContainer

    '注意: 以下过程是 Windows 窗体设计器所必需的
    '可以使用 Windows 窗体设计器修改此过程。
    '不要使用代码编辑器修改它。
    Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
    Friend WithEvents txtMsgRef As System.Windows.Forms.TextBox
    Friend WithEvents cmbValidPeriod As System.Windows.Forms.ComboBox
    Friend WithEvents cmbDataCodingScheme As System.Windows.Forms.ComboBox
    Friend WithEvents Label5 As System.Windows.Forms.Label
    Friend WithEvents Label4 As System.Windows.Forms.Label
    Friend WithEvents Label3 As System.Windows.Forms.Label
    Friend WithEvents chkStatusReport As System.Windows.Forms.CheckBox
    Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
    Friend WithEvents txtDestNum As System.Windows.Forms.TextBox
    Friend WithEvents Label2 As System.Windows.Forms.Label
    Friend WithEvents txtServiceCenterNum As System.Windows.Forms.TextBox
    Friend WithEvents Label1 As System.Windows.Forms.Label
    Friend WithEvents GroupBox3 As System.Windows.Forms.GroupBox
    Friend WithEvents txtUserData As System.Windows.Forms.TextBox
    Friend WithEvents GroupBox4 As System.Windows.Forms.GroupBox
    Friend WithEvents cmdReset As System.Windows.Forms.Button
    Friend WithEvents cmdGetPDU As System.Windows.Forms.Button
    Friend WithEvents stsBar As System.Windows.Forms.StatusBar
    Friend WithEvents stsBarCharCount As System.Windows.Forms.StatusBarPanel
    Friend WithEvents GroupBox5 As System.Windows.Forms.GroupBox
    Friend WithEvents lblMSN As System.Windows.Forms.LinkLabel
    Friend WithEvents lblBlog As System.Windows.Forms.LinkLabel
    Friend WithEvents lblEmail As System.Windows.Forms.LinkLabel
    Friend WithEvents lblHomePage As System.Windows.Forms.LinkLabel
    Friend WithEvents txtPDU As System.Windows.Forms.TextBox
    Friend WithEvents cmdCopyToClipboard As System.Windows.Forms.Button
    Friend WithEvents stsPDULength As System.Windows.Forms.StatusBarPanel
    Friend WithEvents cmdAbout As System.Windows.Forms.Button
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.GroupBox2 = New System.Windows.Forms.GroupBox
        Me.txtMsgRef = New System.Windows.Forms.TextBox
        Me.cmbValidPeriod = New System.Windows.Forms.ComboBox
        Me.cmbDataCodingScheme = New System.Windows.Forms.ComboBox
        Me.Label5 = New System.Windows.Forms.Label
        Me.Label4 = New System.Windows.Forms.Label
        Me.Label3 = New System.Windows.Forms.Label
        Me.chkStatusReport = New System.Windows.Forms.CheckBox
        Me.GroupBox1 = New System.Windows.Forms.GroupBox
        Me.txtDestNum = New System.Windows.Forms.TextBox
        Me.Label2 = New System.Windows.Forms.Label
        Me.txtServiceCenterNum = New System.Windows.Forms.TextBox
        Me.Label1 = New System.Windows.Forms.Label
        Me.GroupBox3 = New System.Windows.Forms.GroupBox
        Me.txtUserData = New System.Windows.Forms.TextBox
        Me.GroupBox4 = New System.Windows.Forms.GroupBox
        Me.txtPDU = New System.Windows.Forms.TextBox
        Me.cmdReset = New System.Windows.Forms.Button
        Me.cmdGetPDU = New System.Windows.Forms.Button
        Me.stsBar = New System.Windows.Forms.StatusBar
        Me.stsBarCharCount = New System.Windows.Forms.StatusBarPanel
        Me.stsPDULength = New System.Windows.Forms.StatusBarPanel
        Me.cmdCopyToClipboard = New System.Windows.Forms.Button
        Me.GroupBox5 = New System.Windows.Forms.GroupBox
        Me.lblEmail = New System.Windows.Forms.LinkLabel
        Me.lblMSN = New System.Windows.Forms.LinkLabel
        Me.lblBlog = New System.Windows.Forms.LinkLabel
        Me.lblHomePage = New System.Windows.Forms.LinkLabel
        Me.cmdAbout = New System.Windows.Forms.Button
        Me.GroupBox2.SuspendLayout()
        Me.GroupBox1.SuspendLayout()
        Me.GroupBox3.SuspendLayout()
        Me.GroupBox4.SuspendLayout()
        CType(Me.stsBarCharCount, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.stsPDULength, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.GroupBox5.SuspendLayout()
        Me.SuspendLayout()
        '
        'GroupBox2
        '
        Me.GroupBox2.Controls.Add(Me.txtMsgRef)
        Me.GroupBox2.Controls.Add(Me.cmbValidPeriod)
        Me.GroupBox2.Controls.Add(Me.cmbDataCodingScheme)
        Me.GroupBox2.Controls.Add(Me.Label5)
        Me.GroupBox2.Controls.Add(Me.Label4)
        Me.GroupBox2.Controls.Add(Me.Label3)
        Me.GroupBox2.Controls.Add(Me.chkStatusReport)
        Me.GroupBox2.Controls.Add(Me.cmdReset)
        Me.GroupBox2.Location = New System.Drawing.Point(8, 112)
        Me.GroupBox2.Name = "GroupBox2"
        Me.GroupBox2.Size = New System.Drawing.Size(336, 156)
        Me.GroupBox2.TabIndex = 7
        Me.GroupBox2.TabStop = False
        Me.GroupBox2.Text = "Options"
        '
        'txtMsgRef
        '
        Me.txtMsgRef.Location = New System.Drawing.Point(164, 88)
        Me.txtMsgRef.Name = "txtMsgRef"
        Me.txtMsgRef.Size = New System.Drawing.Size(160, 21)
        Me.txtMsgRef.TabIndex = 9
        Me.txtMsgRef.Text = ""
        '
        'cmbValidPeriod
        '
        Me.cmbValidPeriod.Location = New System.Drawing.Point(164, 56)
        Me.cmbValidPeriod.Name = "cmbValidPeriod"
        Me.cmbValidPeriod.Size = New System.Drawing.Size(164, 20)
        Me.cmbValidPeriod.TabIndex = 8
        '
        'cmbDataCodingScheme
        '
        Me.cmbDataCodingScheme.Location = New System.Drawing.Point(164, 24)
        Me.cmbDataCodingScheme.Name = "cmbDataCodingScheme"
        Me.cmbDataCodingScheme.Size = New System.Drawing.Size(164, 20)
        Me.cmbDataCodingScheme.TabIndex = 7
        '
        'Label5
        '
        Me.Label5.Location = New System.Drawing.Point(28, 92)
        Me.Label5.Name = "Label5"
        Me.Label5.Size = New System.Drawing.Size(112, 16)
        Me.Label5.TabIndex = 5
        Me.Label5.Text = "Message Reference"
        Me.Label5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
        '
        'Label4
        '
        Me.Label4.Location = New System.Drawing.Point(28, 60)
        Me.Label4.Name = "Label4"
        Me.Label4.Size = New System.Drawing.Size(112, 16)
        Me.Label4.TabIndex = 3
        Me.Label4.Text = "ValidityPeriod"
        Me.Label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
        '
        'Label3
        '
        Me.Label3.Location = New System.Drawing.Point(28, 28)
        Me.Label3.Name = "Label3"
        Me.Label3.Size = New System.Drawing.Size(112, 16)
        Me.Label3.TabIndex = 1
        Me.Label3.Text = "DataCodingScheme"
        Me.Label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
        '
        'chkStatusReport
        '
        Me.chkStatusReport.CheckAlign = System.Drawing.ContentAlignment.BottomRight
        Me.chkStatusReport.FlatStyle = System.Windows.Forms.FlatStyle.System
        Me.chkStatusReport.Location = New System.Drawing.Point(32, 124)
        Me.chkStatusReport.Name = "chkStatusReport"
        Me.chkStatusReport.Size = New System.Drawing.Size(144, 16)
        Me.chkStatusReport.TabIndex = 0
        Me.chkStatusReport.Text = "Status Report"
        Me.chkStatusReport.TextAlign = System.Drawing.ContentAlignment.BottomLeft
        '
        'GroupBox1
        '
        Me.GroupBox1.Controls.Add(Me.txtDestNum)
        Me.GroupBox1.Controls.Add(Me.Label2)
        Me.GroupBox1.Controls.Add(Me.txtServiceCenterNum)
        Me.GroupBox1.Controls.Add(Me.Label1)
        Me.GroupBox1.Location = New System.Drawing.Point(8, 12)
        Me.GroupBox1.Name = "GroupBox1"
        Me.GroupBox1.Size = New System.Drawing.Size(336, 92)
        Me.GroupBox1.TabIndex = 6
        Me.GroupBox1.TabStop = False
        Me.GroupBox1.Text = "Number"
        '
        'txtDestNum
        '
        Me.txtDestNum.Location = New System.Drawing.Point(164, 58)
        Me.txtDestNum.Name = "txtDestNum"
        Me.txtDestNum.Size = New System.Drawing.Size(164, 21)
        Me.txtDestNum.TabIndex = 7
        Me.txtDestNum.Text = ""
        '
        'Label2
        '
        Me.Label2.Location = New System.Drawing.Point(16, 56)
        Me.Label2.Name = "Label2"
        Me.Label2.Size = New System.Drawing.Size(128, 24)
        Me.Label2.TabIndex = 6
        Me.Label2.Text = "Destination Number"
        Me.Label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
        '
        'txtServiceCenterNum
        '
        Me.txtServiceCenterNum.Location = New System.Drawing.Point(164, 26)
        Me.txtServiceCenterNum.Name = "txtServiceCenterNum"
        Me.txtServiceCenterNum.Size = New System.Drawing.Size(164, 21)
        Me.txtServiceCenterNum.TabIndex = 5
        Me.txtServiceCenterNum.Text = ""
        '
        'Label1
        '
        Me.Label1.Location = New System.Drawing.Point(12, 24)
        Me.Label1.Name = "Label1"
        Me.Label1.Size = New System.Drawing.Size(136, 24)
        Me.Label1.TabIndex = 4
        Me.Label1.Text = "Service Center Number"
        Me.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
        '
        'GroupBox3
        '
        Me.GroupBox3.Controls.Add(Me.txtUserData)
        Me.GroupBox3.Location = New System.Drawing.Point(352, 12)
        Me.GroupBox3.Name = "GroupBox3"
        Me.GroupBox3.Size = New System.Drawing.Size(352, 92)
        Me.GroupBox3.TabIndex = 8
        Me.GroupBox3.TabStop = False
        Me.GroupBox3.Text = "User Data"
        '
        'txtUserData
        '
        Me.txtUserData.Dock = System.Windows.Forms.DockStyle.Fill
        Me.txtUserData.Location = New System.Drawing.Point(3, 17)
        Me.txtUserData.Multiline = True
        Me.txtUserData.Name = "txtUserData"
        Me.txtUserData.ScrollBars = System.Windows.Forms.ScrollBars.Vertical
        Me.txtUserData.Size = New System.Drawing.Size(346, 72)
        Me.txtUserData.TabIndex = 0
        Me.txtUserData.Text = ""
        '
        'GroupBox4
        '
        Me.GroupBox4.Controls.Add(Me.txtPDU)
        Me.GroupBox4.Location = New System.Drawing.Point(352, 112)
        Me.GroupBox4.Name = "GroupBox4"
        Me.GroupBox4.Size = New System.Drawing.Size(352, 156)
        Me.GroupBox4.TabIndex = 9
        Me.GroupBox4.TabStop = False
        Me.GroupBox4.Text = "PDU Code"
        '
        'txtPDU
        '
        Me.txtPDU.Dock = System.Windows.Forms.DockStyle.Fill
        Me.txtPDU.Location = New System.Drawing.Point(3, 17)
        Me.txtPDU.Multiline = True
        Me.txtPDU.Name = "txtPDU"
        Me.txtPDU.ScrollBars = System.Windows.Forms.ScrollBars.Vertical
        Me.txtPDU.Size = New System.Drawing.Size(346, 136)
        Me.txtPDU.TabIndex = 2
        Me.txtPDU.Text = ""
        '
        'cmdReset
        '
        Me.cmdReset.FlatStyle = System.Windows.Forms.FlatStyle.System
        Me.cmdReset.Location = New System.Drawing.Point(212, 118)
        Me.cmdReset.Name = "cmdReset"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -