Click here to Skip to main content
15,896,549 members
Articles / Programming Languages / Visual Basic

The Bridge

Rate me:
Please Sign up or sign in to vote.
1.85/5 (8 votes)
22 Jun 20062 min read 40.7K   1.3K   26  
This Bridge links the IAX2 client to the GSM mobile network Via a mobile phone and works as a VoIP gateway
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Public Class ucModemInterface
    Inherits System.Windows.Forms.UserControl

    'UserControl1 overrides dispose to clean up the component list.
    <System.Diagnostics.DebuggerNonUserCode()> _
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing AndAlso components IsNot Nothing Then
            components.Dispose()
        End If
        MyBase.Dispose(disposing)
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    '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.
    <System.Diagnostics.DebuggerStepThrough()> _
    Private Sub InitializeComponent()
        Me.components = New System.ComponentModel.Container
        Me.txtEditField = New System.Windows.Forms.TextBox
        Me.cmbCommPort = New System.Windows.Forms.ComboBox
        Me.cmbMobileType = New System.Windows.Forms.ComboBox
        Me.cmdConnect = New System.Windows.Forms.Button
        Me._lvATList_ColumnHeader_2 = New System.Windows.Forms.ColumnHeader
        Me.cmdDisconnect = New System.Windows.Forms.Button
        Me.cmdSaveType = New System.Windows.Forms.Button
        Me.txtBaud = New System.Windows.Forms.TextBox
        Me._lvATList_ColumnHeader_1 = New System.Windows.Forms.ColumnHeader
        Me.lvATList = New System.Windows.Forms.ListView
        Me.Label6 = New System.Windows.Forms.Label
        Me.shpCallOnline = New System.Windows.Forms.Label
        Me.Label4 = New System.Windows.Forms.Label
        Me.shpBridgeStateOnline = New System.Windows.Forms.Label
        Me.Label1 = New System.Windows.Forms.Label
        Me.Label2 = New System.Windows.Forms.Label
        Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components)
        Me.Label3 = New System.Windows.Forms.Label
        Me.Label5 = New System.Windows.Forms.Label
        Me.tmrBlinking = New System.Windows.Forms.Timer(Me.components)
        Me.SuspendLayout()
        '
        'txtEditField
        '
        Me.txtEditField.AcceptsReturn = True
        Me.txtEditField.BackColor = System.Drawing.SystemColors.Window
        Me.txtEditField.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.txtEditField.Cursor = System.Windows.Forms.Cursors.IBeam
        Me.txtEditField.ForeColor = System.Drawing.SystemColors.WindowText
        Me.txtEditField.Location = New System.Drawing.Point(75, 115)
        Me.txtEditField.MaxLength = 0
        Me.txtEditField.Name = "txtEditField"
        Me.txtEditField.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.txtEditField.Size = New System.Drawing.Size(177, 20)
        Me.txtEditField.TabIndex = 27
        Me.txtEditField.Text = "AT"
        Me.txtEditField.Visible = False
        '
        'cmbCommPort
        '
        Me.cmbCommPort.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
                    Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
        Me.cmbCommPort.BackColor = System.Drawing.Color.FromArgb(CType(CType(140, Byte), Integer), CType(CType(193, Byte), Integer), CType(CType(242, Byte), Integer))
        Me.cmbCommPort.Cursor = System.Windows.Forms.Cursors.Default
        Me.cmbCommPort.ForeColor = System.Drawing.SystemColors.WindowText
        Me.cmbCommPort.FormattingEnabled = True
        Me.cmbCommPort.Items.AddRange(New Object() {"COM1", "COM2", "COM3", "COM4", "COM5", "COM6", "COM7", "COM8", "COM9", "COM10", "COM11", "COM12", "COM13", "COM14", "COM15", "COM16", "COM17", "COM18", "COM19", "COM20"})
        Me.cmbCommPort.Location = New System.Drawing.Point(75, 3)
        Me.cmbCommPort.Name = "cmbCommPort"
        Me.cmbCommPort.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.cmbCommPort.Size = New System.Drawing.Size(130, 21)
        Me.cmbCommPort.TabIndex = 22
        Me.cmbCommPort.Text = "COM4"
        '
        'cmbMobileType
        '
        Me.cmbMobileType.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
                    Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
        Me.cmbMobileType.BackColor = System.Drawing.Color.FromArgb(CType(CType(140, Byte), Integer), CType(CType(193, Byte), Integer), CType(CType(242, Byte), Integer))
        Me.cmbMobileType.Cursor = System.Windows.Forms.Cursors.Default
        Me.cmbMobileType.ForeColor = System.Drawing.SystemColors.WindowText
        Me.cmbMobileType.FormattingEnabled = True
        Me.cmbMobileType.Items.AddRange(New Object() {"SE T68i", "(Custom)"})
        Me.cmbMobileType.Location = New System.Drawing.Point(75, 35)
        Me.cmbMobileType.Name = "cmbMobileType"
        Me.cmbMobileType.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.cmbMobileType.Size = New System.Drawing.Size(130, 21)
        Me.cmbMobileType.TabIndex = 21
        Me.cmbMobileType.Text = "SE T68i"
        '
        'cmdConnect
        '
        Me.cmdConnect.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
        Me.cmdConnect.BackColor = System.Drawing.Color.FromArgb(CType(CType(219, Byte), Integer), CType(CType(214, Byte), Integer), CType(CType(245, Byte), Integer))
        Me.cmdConnect.Cursor = System.Windows.Forms.Cursors.Default
        Me.cmdConnect.ForeColor = System.Drawing.SystemColors.ControlText
        Me.cmdConnect.Location = New System.Drawing.Point(3, 299)
        Me.cmdConnect.Name = "cmdConnect"
        Me.cmdConnect.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.cmdConnect.Size = New System.Drawing.Size(97, 25)
        Me.cmdConnect.TabIndex = 20
        Me.cmdConnect.Text = "Connect bridge"
        Me.cmdConnect.UseVisualStyleBackColor = False
        '
        '_lvATList_ColumnHeader_2
        '
        Me._lvATList_ColumnHeader_2.Text = "Syntax"
        Me._lvATList_ColumnHeader_2.Width = 118
        '
        'cmdDisconnect
        '
        Me.cmdDisconnect.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
        Me.cmdDisconnect.BackColor = System.Drawing.Color.FromArgb(CType(CType(219, Byte), Integer), CType(CType(214, Byte), Integer), CType(CType(245, Byte), Integer))
        Me.cmdDisconnect.Cursor = System.Windows.Forms.Cursors.Default
        Me.cmdDisconnect.Enabled = False
        Me.cmdDisconnect.ForeColor = System.Drawing.SystemColors.ControlText
        Me.cmdDisconnect.Location = New System.Drawing.Point(172, 299)
        Me.cmdDisconnect.Name = "cmdDisconnect"
        Me.cmdDisconnect.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.cmdDisconnect.Size = New System.Drawing.Size(105, 25)
        Me.cmdDisconnect.TabIndex = 19
        Me.cmdDisconnect.Text = "Disconnect bridge"
        Me.cmdDisconnect.UseVisualStyleBackColor = False
        '
        'cmdSaveType
        '
        Me.cmdSaveType.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
        Me.cmdSaveType.BackColor = System.Drawing.Color.FromArgb(CType(CType(219, Byte), Integer), CType(CType(214, Byte), Integer), CType(CType(245, Byte), Integer))
        Me.cmdSaveType.Cursor = System.Windows.Forms.Cursors.Default
        Me.cmdSaveType.ForeColor = System.Drawing.SystemColors.ControlText
        Me.cmdSaveType.Location = New System.Drawing.Point(205, 35)
        Me.cmdSaveType.Name = "cmdSaveType"
        Me.cmdSaveType.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.cmdSaveType.Size = New System.Drawing.Size(73, 25)
        Me.cmdSaveType.TabIndex = 17
        Me.cmdSaveType.Text = "Save custom"
        Me.cmdSaveType.UseVisualStyleBackColor = False
        '
        'txtBaud
        '
        Me.txtBaud.AcceptsReturn = True
        Me.txtBaud.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
                    Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
        Me.txtBaud.BackColor = System.Drawing.Color.FromArgb(CType(CType(140, Byte), Integer), CType(CType(193, Byte), Integer), CType(CType(242, Byte), Integer))
        Me.txtBaud.Cursor = System.Windows.Forms.Cursors.IBeam
        Me.txtBaud.ForeColor = System.Drawing.SystemColors.WindowText
        Me.txtBaud.Location = New System.Drawing.Point(75, 67)
        Me.txtBaud.MaxLength = 0
        Me.txtBaud.Name = "txtBaud"
        Me.txtBaud.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.txtBaud.Size = New System.Drawing.Size(130, 20)
        Me.txtBaud.TabIndex = 16
        Me.txtBaud.Text = "9600"
        '
        '_lvATList_ColumnHeader_1
        '
        Me._lvATList_ColumnHeader_1.Text = "Command type"
        Me._lvATList_ColumnHeader_1.Width = 130
        '
        'lvATList
        '
        Me.lvATList.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
                    Or System.Windows.Forms.AnchorStyles.Left) _
                    Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
        Me.lvATList.BackColor = System.Drawing.Color.FromArgb(CType(CType(140, Byte), Integer), CType(CType(193, Byte), Integer), CType(CType(242, Byte), Integer))
        Me.lvATList.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.lvATList.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me._lvATList_ColumnHeader_1, Me._lvATList_ColumnHeader_2})
        Me.lvATList.ForeColor = System.Drawing.SystemColors.WindowText
        Me.lvATList.GridLines = True
        Me.lvATList.Location = New System.Drawing.Point(3, 115)
        Me.lvATList.Name = "lvATList"
        Me.lvATList.Size = New System.Drawing.Size(274, 177)
        Me.lvATList.TabIndex = 18
        Me.lvATList.UseCompatibleStateImageBehavior = False
        Me.lvATList.View = System.Windows.Forms.View.Details
        '
        'Label6
        '
        Me.Label6.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
        Me.Label6.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer))
        Me.Label6.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.Label6.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label6.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label6.Location = New System.Drawing.Point(212, 331)
        Me.Label6.Name = "Label6"
        Me.Label6.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label6.Size = New System.Drawing.Size(41, 17)
        Me.Label6.TabIndex = 29
        Me.Label6.Text = "Calling"
        '
        'shpCallOnline
        '
        Me.shpCallOnline.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
        Me.shpCallOnline.BackColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(0, Byte), Integer))
        Me.shpCallOnline.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
        Me.shpCallOnline.FlatStyle = System.Windows.Forms.FlatStyle.System
        Me.shpCallOnline.ForeColor = System.Drawing.Color.Lime
        Me.shpCallOnline.Location = New System.Drawing.Point(260, 331)
        Me.shpCallOnline.Name = "shpCallOnline"
        Me.shpCallOnline.Size = New System.Drawing.Size(17, 17)
        Me.shpCallOnline.TabIndex = 30
        '
        'Label4
        '
        Me.Label4.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
        Me.Label4.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer))
        Me.Label4.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
        Me.Label4.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label4.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label4.Location = New System.Drawing.Point(35, 331)
        Me.Label4.Name = "Label4"
        Me.Label4.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label4.Size = New System.Drawing.Size(41, 17)
        Me.Label4.TabIndex = 28
        Me.Label4.Text = "Online"
        '
        'shpBridgeStateOnline
        '
        Me.shpBridgeStateOnline.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
        Me.shpBridgeStateOnline.BackColor = System.Drawing.Color.Black
        Me.shpBridgeStateOnline.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
        Me.shpBridgeStateOnline.FlatStyle = System.Windows.Forms.FlatStyle.System
        Me.shpBridgeStateOnline.ForeColor = System.Drawing.Color.Black
        Me.shpBridgeStateOnline.Location = New System.Drawing.Point(83, 331)
        Me.shpBridgeStateOnline.Name = "shpBridgeStateOnline"
        Me.shpBridgeStateOnline.Size = New System.Drawing.Size(17, 17)
        Me.shpBridgeStateOnline.TabIndex = 31
        '
        'Label1
        '
        Me.Label1.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer))
        Me.Label1.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label1.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label1.Location = New System.Drawing.Point(3, 5)
        Me.Label1.Name = "Label1"
        Me.Label1.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label1.Size = New System.Drawing.Size(66, 17)
        Me.Label1.TabIndex = 26
        Me.Label1.Text = "Comm Port"
        '
        'Label2
        '
        Me.Label2.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer))
        Me.Label2.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label2.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label2.Location = New System.Drawing.Point(3, 37)
        Me.Label2.Name = "Label2"
        Me.Label2.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label2.Size = New System.Drawing.Size(105, 17)
        Me.Label2.TabIndex = 25
        Me.Label2.Text = "Mobile Type"
        '
        'Label3
        '
        Me.Label3.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer))
        Me.Label3.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label3.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label3.Location = New System.Drawing.Point(3, 91)
        Me.Label3.Name = "Label3"
        Me.Label3.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label3.Size = New System.Drawing.Size(153, 25)
        Me.Label3.TabIndex = 24
        Me.Label3.Text = "AT Commands list"
        '
        'Label5
        '
        Me.Label5.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer))
        Me.Label5.Cursor = System.Windows.Forms.Cursors.Default
        Me.Label5.ForeColor = System.Drawing.SystemColors.ControlText
        Me.Label5.Location = New System.Drawing.Point(3, 68)
        Me.Label5.Name = "Label5"
        Me.Label5.RightToLeft = System.Windows.Forms.RightToLeft.No
        Me.Label5.Size = New System.Drawing.Size(105, 17)
        Me.Label5.TabIndex = 23
        Me.Label5.Text = "Baud rate"
        '
        'tmrBlinking
        '
        '
        'ucModemInterface
        '
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
        Me.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer))
        Me.Controls.Add(Me.cmbMobileType)
        Me.Controls.Add(Me.cmdConnect)
        Me.Controls.Add(Me.cmdDisconnect)
        Me.Controls.Add(Me.cmdSaveType)
        Me.Controls.Add(Me.txtBaud)
        Me.Controls.Add(Me.lvATList)
        Me.Controls.Add(Me.Label6)
        Me.Controls.Add(Me.shpCallOnline)
        Me.Controls.Add(Me.Label4)
        Me.Controls.Add(Me.shpBridgeStateOnline)
        Me.Controls.Add(Me.Label1)
        Me.Controls.Add(Me.Label2)
        Me.Controls.Add(Me.Label3)
        Me.Controls.Add(Me.Label5)
        Me.Controls.Add(Me.txtEditField)
        Me.Controls.Add(Me.cmbCommPort)
        Me.Name = "ucModemInterface"
        Me.Size = New System.Drawing.Size(280, 350)
        Me.ResumeLayout(False)
        Me.PerformLayout()

    End Sub
    Friend WithEvents txtEditField As System.Windows.Forms.TextBox
    Friend WithEvents cmbCommPort As System.Windows.Forms.ComboBox
    Friend WithEvents cmbMobileType As System.Windows.Forms.ComboBox
    Friend WithEvents cmdConnect As System.Windows.Forms.Button
    Friend WithEvents _lvATList_ColumnHeader_2 As System.Windows.Forms.ColumnHeader
    Friend WithEvents cmdDisconnect As System.Windows.Forms.Button
    Friend WithEvents cmdSaveType As System.Windows.Forms.Button
    Friend WithEvents txtBaud As System.Windows.Forms.TextBox
    Friend WithEvents _lvATList_ColumnHeader_1 As System.Windows.Forms.ColumnHeader
    Friend WithEvents lvATList As System.Windows.Forms.ListView
    Friend WithEvents Label6 As System.Windows.Forms.Label
    Friend WithEvents shpCallOnline As System.Windows.Forms.Label
    Friend WithEvents Label4 As System.Windows.Forms.Label
    Friend WithEvents shpBridgeStateOnline As System.Windows.Forms.Label
    Friend WithEvents Label1 As System.Windows.Forms.Label
    Friend WithEvents Label2 As System.Windows.Forms.Label
    Friend WithEvents ToolTip1 As System.Windows.Forms.ToolTip
    Friend WithEvents Label3 As System.Windows.Forms.Label
    Friend WithEvents Label5 As System.Windows.Forms.Label
    Friend WithEvents tmrBlinking As System.Windows.Forms.Timer

End Class

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Egypt Egypt
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions