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

📄 form2.vb

📁 vb.net 优化的交通仿真程序
💻 VB
📖 第 1 页 / 共 3 页
字号:
'本程序由大连交通大学软件学院s.u.p.e.r.HD 工作小组成员 陆乐,张云路,张鑫制作完成
'所有注释均在所要注释语句上方
'编译环境 Microsoft Visual Basic .NET + Windows XP Professional sp2
'由于.NET对XML的便捷操作,故采取XML做为存储数据的媒体,同时也加强了程序的可升级性
'三名成员在比赛前刚开始接触.NET,此作品为学习.NET后的第一个作品。
'开始构思编写程序时间2006-6-28
'结束时间2006-7-4
'本程序为交通灯管理的仿真
Imports System.Xml
Imports System.Math

Public Class Form2
    Inherits System.Windows.Forms.Form

#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 TextBox1 As System.Windows.Forms.TextBox
    Friend WithEvents TextBox4 As System.Windows.Forms.TextBox
    Friend WithEvents TextBox5 As System.Windows.Forms.TextBox
    Friend WithEvents Label1 As System.Windows.Forms.Label
    Friend WithEvents Label2 As System.Windows.Forms.Label
    Friend WithEvents Label3 As System.Windows.Forms.Label
    Friend WithEvents Label4 As System.Windows.Forms.Label
    Friend WithEvents Label5 As System.Windows.Forms.Label
    Friend WithEvents Button1 As System.Windows.Forms.Button
    Friend WithEvents Label22 As System.Windows.Forms.Label
    Friend WithEvents Label23 As System.Windows.Forms.Label
    Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
    Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
    Friend WithEvents GroupBox3 As System.Windows.Forms.GroupBox
    Friend WithEvents GroupBox4 As System.Windows.Forms.GroupBox
    Friend WithEvents GroupBox5 As System.Windows.Forms.GroupBox
    Friend WithEvents GroupBox6 As System.Windows.Forms.GroupBox
    Friend WithEvents GroupBox7 As System.Windows.Forms.GroupBox
    Friend WithEvents GroupBox8 As System.Windows.Forms.GroupBox
    Friend WithEvents max1 As System.Windows.Forms.TextBox
    Friend WithEvents max2 As System.Windows.Forms.TextBox
    Friend WithEvents max3 As System.Windows.Forms.TextBox
    Friend WithEvents max4 As System.Windows.Forms.TextBox
    Friend WithEvents max8 As System.Windows.Forms.TextBox
    Friend WithEvents min1 As System.Windows.Forms.TextBox
    Friend WithEvents min2 As System.Windows.Forms.TextBox
    Friend WithEvents min3 As System.Windows.Forms.TextBox
    Friend WithEvents min4 As System.Windows.Forms.TextBox
    Friend WithEvents min5 As System.Windows.Forms.TextBox
    Friend WithEvents max5 As System.Windows.Forms.TextBox
    Friend WithEvents min6 As System.Windows.Forms.TextBox
    Friend WithEvents max6 As System.Windows.Forms.TextBox
    Friend WithEvents min7 As System.Windows.Forms.TextBox
    Friend WithEvents max7 As System.Windows.Forms.TextBox
    Friend WithEvents min8 As System.Windows.Forms.TextBox
    Friend WithEvents TextBox2 As System.Windows.Forms.TextBox
    Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox
    Friend WithEvents Label6 As System.Windows.Forms.Label
    Friend WithEvents Button2 As System.Windows.Forms.Button
    Friend WithEvents Button3 As System.Windows.Forms.Button
    Friend WithEvents PictureBox2 As System.Windows.Forms.PictureBox
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(Form2))
        Me.TextBox1 = New System.Windows.Forms.TextBox
        Me.max1 = New System.Windows.Forms.TextBox
        Me.min1 = New System.Windows.Forms.TextBox
        Me.TextBox4 = New System.Windows.Forms.TextBox
        Me.TextBox5 = New System.Windows.Forms.TextBox
        Me.Label1 = New System.Windows.Forms.Label
        Me.Label2 = New System.Windows.Forms.Label
        Me.Label3 = New System.Windows.Forms.Label
        Me.Label4 = New System.Windows.Forms.Label
        Me.Label5 = New System.Windows.Forms.Label
        Me.Button1 = New System.Windows.Forms.Button
        Me.min2 = New System.Windows.Forms.TextBox
        Me.max2 = New System.Windows.Forms.TextBox
        Me.min3 = New System.Windows.Forms.TextBox
        Me.max3 = New System.Windows.Forms.TextBox
        Me.min4 = New System.Windows.Forms.TextBox
        Me.max4 = New System.Windows.Forms.TextBox
        Me.min5 = New System.Windows.Forms.TextBox
        Me.max5 = New System.Windows.Forms.TextBox
        Me.min6 = New System.Windows.Forms.TextBox
        Me.max6 = New System.Windows.Forms.TextBox
        Me.min7 = New System.Windows.Forms.TextBox
        Me.max7 = New System.Windows.Forms.TextBox
        Me.min8 = New System.Windows.Forms.TextBox
        Me.max8 = New System.Windows.Forms.TextBox
        Me.Label22 = New System.Windows.Forms.Label
        Me.Label23 = New System.Windows.Forms.Label
        Me.GroupBox1 = New System.Windows.Forms.GroupBox
        Me.GroupBox2 = New System.Windows.Forms.GroupBox
        Me.GroupBox3 = New System.Windows.Forms.GroupBox
        Me.GroupBox4 = New System.Windows.Forms.GroupBox
        Me.GroupBox5 = New System.Windows.Forms.GroupBox
        Me.GroupBox6 = New System.Windows.Forms.GroupBox
        Me.GroupBox7 = New System.Windows.Forms.GroupBox
        Me.GroupBox8 = New System.Windows.Forms.GroupBox
        Me.TextBox2 = New System.Windows.Forms.TextBox
        Me.PictureBox1 = New System.Windows.Forms.PictureBox
        Me.Label6 = New System.Windows.Forms.Label
        Me.Button2 = New System.Windows.Forms.Button
        Me.Button3 = New System.Windows.Forms.Button
        Me.PictureBox2 = New System.Windows.Forms.PictureBox
        Me.GroupBox1.SuspendLayout()
        Me.GroupBox2.SuspendLayout()
        Me.GroupBox3.SuspendLayout()
        Me.GroupBox4.SuspendLayout()
        Me.GroupBox5.SuspendLayout()
        Me.GroupBox6.SuspendLayout()
        Me.GroupBox7.SuspendLayout()
        Me.GroupBox8.SuspendLayout()
        Me.SuspendLayout()
        '
        'TextBox1
        '
        Me.TextBox1.Location = New System.Drawing.Point(200, 200)
        Me.TextBox1.Name = "TextBox1"
        Me.TextBox1.Size = New System.Drawing.Size(104, 21)
        Me.TextBox1.TabIndex = 0
        Me.TextBox1.Text = "1000"
        '
        'max1
        '
        Me.max1.Location = New System.Drawing.Point(16, 24)
        Me.max1.Name = "max1"
        Me.max1.Size = New System.Drawing.Size(48, 21)
        Me.max1.TabIndex = 1
        Me.max1.Text = "55"
        '
        'min1
        '
        Me.min1.Location = New System.Drawing.Point(16, 56)
        Me.min1.Name = "min1"
        Me.min1.Size = New System.Drawing.Size(48, 21)
        Me.min1.TabIndex = 2
        Me.min1.Text = "1"
        '
        'TextBox4
        '
        Me.TextBox4.Location = New System.Drawing.Point(200, 232)
        Me.TextBox4.Name = "TextBox4"
        Me.TextBox4.Size = New System.Drawing.Size(104, 21)
        Me.TextBox4.TabIndex = 3
        Me.TextBox4.Text = "10"
        '
        'TextBox5
        '
        Me.TextBox5.Location = New System.Drawing.Point(200, 264)
        Me.TextBox5.Name = "TextBox5"
        Me.TextBox5.Size = New System.Drawing.Size(104, 21)
        Me.TextBox5.TabIndex = 4
        Me.TextBox5.Text = "5000"
        '
        'Label1
        '
        Me.Label1.Location = New System.Drawing.Point(24, 200)
        Me.Label1.Name = "Label1"
        Me.Label1.Size = New System.Drawing.Size(128, 24)
        Me.Label1.TabIndex = 5
        Me.Label1.Text = "仿真时间(秒)"
        '
        'Label2
        '
        Me.Label2.Location = New System.Drawing.Point(24, 32)
        Me.Label2.Name = "Label2"
        Me.Label2.Size = New System.Drawing.Size(128, 24)
        Me.Label2.TabIndex = 6
        Me.Label2.Text = "车速上限(米/秒)"
        '
        'Label3
        '
        Me.Label3.Location = New System.Drawing.Point(24, 64)
        Me.Label3.Name = "Label3"
        Me.Label3.Size = New System.Drawing.Size(128, 24)
        Me.Label3.TabIndex = 7
        Me.Label3.Text = "车速下限(米/秒)"
        '
        'Label4
        '
        Me.Label4.Location = New System.Drawing.Point(24, 232)
        Me.Label4.Name = "Label4"
        Me.Label4.Size = New System.Drawing.Size(144, 24)
        Me.Label4.TabIndex = 8
        Me.Label4.Text = "相继到达时间参数beta"
        '
        'Label5
        '
        Me.Label5.Location = New System.Drawing.Point(24, 264)
        Me.Label5.Name = "Label5"
        Me.Label5.Size = New System.Drawing.Size(128, 24)
        Me.Label5.TabIndex = 9
        Me.Label5.Text = "两路口距离L(米)"
        '
        'Button1
        '
        Me.Button1.Location = New System.Drawing.Point(24, 352)
        Me.Button1.Name = "Button1"
        Me.Button1.Size = New System.Drawing.Size(128, 48)
        Me.Button1.TabIndex = 10
        Me.Button1.Text = "确定并开始仿真&S"
        '
        'min2
        '
        Me.min2.Location = New System.Drawing.Point(16, 56)
        Me.min2.Name = "min2"
        Me.min2.Size = New System.Drawing.Size(48, 21)
        Me.min2.TabIndex = 14
        Me.min2.Text = "1"
        '
        'max2
        '
        Me.max2.Location = New System.Drawing.Point(16, 24)
        Me.max2.Name = "max2"
        Me.max2.Size = New System.Drawing.Size(48, 21)
        Me.max2.TabIndex = 13
        Me.max2.Text = "55"
        '
        'min3
        '
        Me.min3.Location = New System.Drawing.Point(16, 56)
        Me.min3.Name = "min3"
        Me.min3.Size = New System.Drawing.Size(48, 21)
        Me.min3.TabIndex = 18
        Me.min3.Text = "1"
        '
        'max3
        '
        Me.max3.Location = New System.Drawing.Point(16, 24)
        Me.max3.Name = "max3"
        Me.max3.Size = New System.Drawing.Size(48, 21)
        Me.max3.TabIndex = 17
        Me.max3.Text = "55"
        '
        'min4
        '
        Me.min4.Location = New System.Drawing.Point(16, 56)
        Me.min4.Name = "min4"
        Me.min4.Size = New System.Drawing.Size(48, 21)
        Me.min4.TabIndex = 22
        Me.min4.Text = "1"
        '
        'max4
        '
        Me.max4.Location = New System.Drawing.Point(16, 24)
        Me.max4.Name = "max4"
        Me.max4.Size = New System.Drawing.Size(48, 21)
        Me.max4.TabIndex = 21
        Me.max4.Text = "55"
        '
        'min5
        '
        Me.min5.Location = New System.Drawing.Point(16, 56)
        Me.min5.Name = "min5"
        Me.min5.Size = New System.Drawing.Size(48, 21)
        Me.min5.TabIndex = 26
        Me.min5.Text = "1"
        '
        'max5
        '
        Me.max5.Location = New System.Drawing.Point(16, 24)
        Me.max5.Name = "max5"
        Me.max5.Size = New System.Drawing.Size(48, 21)
        Me.max5.TabIndex = 25
        Me.max5.Text = "55"
        '
        'min6
        '
        Me.min6.Location = New System.Drawing.Point(16, 56)
        Me.min6.Name = "min6"
        Me.min6.Size = New System.Drawing.Size(48, 21)
        Me.min6.TabIndex = 30
        Me.min6.Text = "1"
        '
        'max6
        '
        Me.max6.Location = New System.Drawing.Point(16, 24)
        Me.max6.Name = "max6"
        Me.max6.Size = New System.Drawing.Size(48, 21)
        Me.max6.TabIndex = 29
        Me.max6.Text = "55"
        '
        'min7
        '
        Me.min7.Location = New System.Drawing.Point(16, 56)
        Me.min7.Name = "min7"
        Me.min7.Size = New System.Drawing.Size(48, 21)
        Me.min7.TabIndex = 34
        Me.min7.Text = "1"
        '
        'max7
        '
        Me.max7.Location = New System.Drawing.Point(16, 24)
        Me.max7.Name = "max7"
        Me.max7.Size = New System.Drawing.Size(48, 21)
        Me.max7.TabIndex = 33
        Me.max7.Text = "55"
        '
        'min8
        '
        Me.min8.Location = New System.Drawing.Point(16, 56)
        Me.min8.Name = "min8"
        Me.min8.Size = New System.Drawing.Size(48, 21)
        Me.min8.TabIndex = 38
        Me.min8.Text = "1"
        '
        'max8
        '
        Me.max8.Location = New System.Drawing.Point(16, 24)
        Me.max8.Name = "max8"
        Me.max8.Size = New System.Drawing.Size(48, 21)
        Me.max8.TabIndex = 37
        Me.max8.Text = "55"
        '
        'Label22
        '
        Me.Label22.Location = New System.Drawing.Point(24, 160)
        Me.Label22.Name = "Label22"
        Me.Label22.Size = New System.Drawing.Size(128, 24)
        Me.Label22.TabIndex = 42
        Me.Label22.Text = "车速下限(米/秒)"
        '
        'Label23
        '
        Me.Label23.Location = New System.Drawing.Point(24, 128)
        Me.Label23.Name = "Label23"
        Me.Label23.Size = New System.Drawing.Size(128, 24)
        Me.Label23.TabIndex = 41
        Me.Label23.Text = "车速上限(米/秒)"
        '
        'GroupBox1
        '
        Me.GroupBox1.Controls.Add(Me.max1)
        Me.GroupBox1.Controls.Add(Me.min1)
        Me.GroupBox1.Location = New System.Drawing.Point(200, 8)
        Me.GroupBox1.Name = "GroupBox1"
        Me.GroupBox1.Size = New System.Drawing.Size(88, 88)
        Me.GroupBox1.TabIndex = 43
        Me.GroupBox1.TabStop = False
        Me.GroupBox1.Text = "车道1"
        '
        'GroupBox2
        '
        Me.GroupBox2.Controls.Add(Me.max2)
        Me.GroupBox2.Controls.Add(Me.min2)
        Me.GroupBox2.Location = New System.Drawing.Point(328, 8)
        Me.GroupBox2.Name = "GroupBox2"
        Me.GroupBox2.Size = New System.Drawing.Size(88, 88)
        Me.GroupBox2.TabIndex = 44
        Me.GroupBox2.TabStop = False
        Me.GroupBox2.Text = "车道2"
        '
        'GroupBox3
        '
        Me.GroupBox3.Controls.Add(Me.min3)
        Me.GroupBox3.Controls.Add(Me.max3)
        Me.GroupBox3.Location = New System.Drawing.Point(456, 8)
        Me.GroupBox3.Name = "GroupBox3"
        Me.GroupBox3.Size = New System.Drawing.Size(88, 88)
        Me.GroupBox3.TabIndex = 45
        Me.GroupBox3.TabStop = False
        Me.GroupBox3.Text = "车道3"
        '

⌨️ 快捷键说明

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