📄 frmaitime.vb
字号:
Public Class Form1
Inherits System.Windows.Forms.Form
Dim gInputRangeList(12) As String
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
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
'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 Frame1 As System.Windows.Forms.GroupBox
Public WithEvents cmdSelectDevice As System.Windows.Forms.Button
Public WithEvents txtDeviceName As System.Windows.Forms.TextBox
Public WithEvents txtDeviceNum As System.Windows.Forms.TextBox
Public WithEvents Label2 As System.Windows.Forms.Label
Public WithEvents Label1 As System.Windows.Forms.Label
Public WithEvents ToolTip1 As System.Windows.Forms.ToolTip
Public WithEvents cmdExit As System.Windows.Forms.Button
Public WithEvents Frame2 As System.Windows.Forms.GroupBox
Public WithEvents cmbChannel As System.Windows.Forms.ComboBox
Public WithEvents cmbDataType As System.Windows.Forms.ComboBox
Public WithEvents cmbInputRange As System.Windows.Forms.ComboBox
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 Frame3 As System.Windows.Forms.GroupBox
Public WithEvents cmdStop As System.Windows.Forms.Button
Public WithEvents cmdStart As System.Windows.Forms.Button
Public WithEvents txtScanTime As System.Windows.Forms.TextBox
Public WithEvents cmdRead As System.Windows.Forms.Button
Public WithEvents txtReturnData As System.Windows.Forms.TextBox
Public WithEvents Label9 As System.Windows.Forms.Label
Public WithEvents Label8 As System.Windows.Forms.Label
Public WithEvents ScanTimer As System.Windows.Forms.Timer
Friend WithEvents DAQAI1 As AxDAQAILib.AxDAQAI
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container
Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(Form1))
Me.Frame1 = New System.Windows.Forms.GroupBox
Me.cmdSelectDevice = New System.Windows.Forms.Button
Me.txtDeviceName = New System.Windows.Forms.TextBox
Me.txtDeviceNum = New System.Windows.Forms.TextBox
Me.Label2 = New System.Windows.Forms.Label
Me.Label1 = New System.Windows.Forms.Label
Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components)
Me.cmdExit = New System.Windows.Forms.Button
Me.cmbChannel = New System.Windows.Forms.ComboBox
Me.cmbDataType = New System.Windows.Forms.ComboBox
Me.cmbInputRange = New System.Windows.Forms.ComboBox
Me.cmdStop = New System.Windows.Forms.Button
Me.cmdStart = New System.Windows.Forms.Button
Me.txtScanTime = New System.Windows.Forms.TextBox
Me.cmdRead = New System.Windows.Forms.Button
Me.txtReturnData = New System.Windows.Forms.TextBox
Me.Frame2 = New System.Windows.Forms.GroupBox
Me.Label5 = New System.Windows.Forms.Label
Me.Label4 = New System.Windows.Forms.Label
Me.Label3 = New System.Windows.Forms.Label
Me.Frame3 = New System.Windows.Forms.GroupBox
Me.Label9 = New System.Windows.Forms.Label
Me.Label8 = New System.Windows.Forms.Label
Me.ScanTimer = New System.Windows.Forms.Timer(Me.components)
Me.DAQAI1 = New AxDAQAILib.AxDAQAI
Me.Frame1.SuspendLayout()
Me.Frame2.SuspendLayout()
Me.Frame3.SuspendLayout()
CType(Me.DAQAI1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'Frame1
'
Me.Frame1.BackColor = System.Drawing.SystemColors.Control
Me.Frame1.Controls.Add(Me.cmdSelectDevice)
Me.Frame1.Controls.Add(Me.txtDeviceName)
Me.Frame1.Controls.Add(Me.txtDeviceNum)
Me.Frame1.Controls.Add(Me.Label2)
Me.Frame1.Controls.Add(Me.Label1)
Me.Frame1.ForeColor = System.Drawing.SystemColors.ControlText
Me.Frame1.Location = New System.Drawing.Point(16, 8)
Me.Frame1.Name = "Frame1"
Me.Frame1.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.Frame1.Size = New System.Drawing.Size(352, 81)
Me.Frame1.TabIndex = 13
Me.Frame1.TabStop = False
Me.Frame1.Text = "Select Device :"
'
'cmdSelectDevice
'
Me.cmdSelectDevice.BackColor = System.Drawing.SystemColors.Control
Me.cmdSelectDevice.Cursor = System.Windows.Forms.Cursors.Default
Me.cmdSelectDevice.ForeColor = System.Drawing.SystemColors.ControlText
Me.cmdSelectDevice.Location = New System.Drawing.Point(176, 16)
Me.cmdSelectDevice.Name = "cmdSelectDevice"
Me.cmdSelectDevice.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.cmdSelectDevice.Size = New System.Drawing.Size(97, 25)
Me.cmdSelectDevice.TabIndex = 5
Me.cmdSelectDevice.Text = "&Select Device"
Me.ToolTip1.SetToolTip(Me.cmdSelectDevice, "Selecting device to operation")
'
'txtDeviceName
'
Me.txtDeviceName.AcceptsReturn = True
Me.txtDeviceName.AutoSize = False
Me.txtDeviceName.BackColor = System.Drawing.SystemColors.Window
Me.txtDeviceName.Cursor = System.Windows.Forms.Cursors.IBeam
Me.txtDeviceName.Enabled = False
Me.txtDeviceName.ForeColor = System.Drawing.SystemColors.WindowText
Me.txtDeviceName.Location = New System.Drawing.Point(88, 48)
Me.txtDeviceName.MaxLength = 0
Me.txtDeviceName.Name = "txtDeviceName"
Me.txtDeviceName.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.txtDeviceName.Size = New System.Drawing.Size(256, 21)
Me.txtDeviceName.TabIndex = 4
Me.txtDeviceName.Text = "AdvanTech"
Me.ToolTip1.SetToolTip(Me.txtDeviceName, "Device Name")
'
'txtDeviceNum
'
Me.txtDeviceNum.AcceptsReturn = True
Me.txtDeviceNum.AutoSize = False
Me.txtDeviceNum.BackColor = System.Drawing.SystemColors.Window
Me.txtDeviceNum.Cursor = System.Windows.Forms.Cursors.IBeam
Me.txtDeviceNum.ForeColor = System.Drawing.SystemColors.WindowText
Me.txtDeviceNum.Location = New System.Drawing.Point(88, 21)
Me.txtDeviceNum.MaxLength = 0
Me.txtDeviceNum.Name = "txtDeviceNum"
Me.txtDeviceNum.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.txtDeviceNum.Size = New System.Drawing.Size(57, 20)
Me.txtDeviceNum.TabIndex = 1
Me.txtDeviceNum.Text = "-100"
Me.ToolTip1.SetToolTip(Me.txtDeviceNum, "Device Number")
'
'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(7, 52)
Me.Label2.Name = "Label2"
Me.Label2.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.Label2.Size = New System.Drawing.Size(78, 16)
Me.Label2.TabIndex = 3
Me.Label2.Text = "Device Name :"
'
'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(5, 22)
Me.Label1.Name = "Label1"
Me.Label1.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.Label1.Size = New System.Drawing.Size(66, 16)
Me.Label1.TabIndex = 2
Me.Label1.Text = " Device No :"
'
'cmdExit
'
Me.cmdExit.BackColor = System.Drawing.SystemColors.Control
Me.cmdExit.Cursor = System.Windows.Forms.Cursors.Default
Me.cmdExit.ForeColor = System.Drawing.SystemColors.ControlText
Me.cmdExit.Location = New System.Drawing.Point(376, 56)
Me.cmdExit.Name = "cmdExit"
Me.cmdExit.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.cmdExit.Size = New System.Drawing.Size(64, 25)
Me.cmdExit.TabIndex = 14
Me.cmdExit.Text = "&Close"
Me.ToolTip1.SetToolTip(Me.cmdExit, "Close application")
'
'cmbChannel
'
Me.cmbChannel.BackColor = System.Drawing.SystemColors.Window
Me.cmbChannel.Cursor = System.Windows.Forms.Cursors.Default
Me.cmbChannel.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.cmbChannel.ForeColor = System.Drawing.SystemColors.WindowText
Me.cmbChannel.Location = New System.Drawing.Point(80, 81)
Me.cmbChannel.Name = "cmbChannel"
Me.cmbChannel.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.cmbChannel.Size = New System.Drawing.Size(81, 21)
Me.cmbChannel.TabIndex = 20
Me.ToolTip1.SetToolTip(Me.cmbChannel, "Device Data ype")
'
'cmbDataType
'
Me.cmbDataType.BackColor = System.Drawing.SystemColors.Window
Me.cmbDataType.Cursor = System.Windows.Forms.Cursors.Default
Me.cmbDataType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.cmbDataType.ForeColor = System.Drawing.SystemColors.WindowText
Me.cmbDataType.Items.AddRange(New Object() {"Raw Data", "Real Data"})
Me.cmbDataType.Location = New System.Drawing.Point(80, 53)
Me.cmbDataType.Name = "cmbDataType"
Me.cmbDataType.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.cmbDataType.Size = New System.Drawing.Size(81, 21)
Me.cmbDataType.TabIndex = 10
Me.ToolTip1.SetToolTip(Me.cmbDataType, "Device Data ype")
'
'cmbInputRange
'
Me.cmbInputRange.BackColor = System.Drawing.SystemColors.Window
Me.cmbInputRange.Cursor = System.Windows.Forms.Cursors.Default
Me.cmbInputRange.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.cmbInputRange.ForeColor = System.Drawing.SystemColors.WindowText
Me.cmbInputRange.Location = New System.Drawing.Point(80, 24)
Me.cmbInputRange.Name = "cmbInputRange"
Me.cmbInputRange.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.cmbInputRange.Size = New System.Drawing.Size(81, 21)
Me.cmbInputRange.TabIndex = 8
Me.ToolTip1.SetToolTip(Me.cmbInputRange, "Input voltage range")
'
'cmdStop
'
Me.cmdStop.BackColor = System.Drawing.SystemColors.Control
Me.cmdStop.Cursor = System.Windows.Forms.Cursors.Default
Me.cmdStop.Enabled = False
Me.cmdStop.ForeColor = System.Drawing.SystemColors.ControlText
Me.cmdStop.Location = New System.Drawing.Point(128, 80)
Me.cmdStop.Name = "cmdStop"
Me.cmdStop.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.cmdStop.Size = New System.Drawing.Size(73, 25)
Me.cmdStop.TabIndex = 19
Me.cmdStop.Text = "St&op"
Me.ToolTip1.SetToolTip(Me.cmdStop, "Stop Auto Scan")
'
'cmdStart
'
Me.cmdStart.BackColor = System.Drawing.SystemColors.Control
Me.cmdStart.Cursor = System.Windows.Forms.Cursors.Default
Me.cmdStart.ForeColor = System.Drawing.SystemColors.ControlText
Me.cmdStart.Location = New System.Drawing.Point(16, 80)
Me.cmdStart.Name = "cmdStart"
Me.cmdStart.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.cmdStart.Size = New System.Drawing.Size(73, 25)
Me.cmdStart.TabIndex = 18
Me.cmdStart.Text = "St&art"
Me.ToolTip1.SetToolTip(Me.cmdStart, "Star Auto Scan")
'
'txtScanTime
'
Me.txtScanTime.AcceptsReturn = True
Me.txtScanTime.AutoSize = False
Me.txtScanTime.BackColor = System.Drawing.SystemColors.Window
Me.txtScanTime.Cursor = System.Windows.Forms.Cursors.IBeam
Me.txtScanTime.ForeColor = System.Drawing.SystemColors.WindowText
Me.txtScanTime.Location = New System.Drawing.Point(80, 56)
Me.txtScanTime.MaxLength = 0
Me.txtScanTime.Name = "txtScanTime"
Me.txtScanTime.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.txtScanTime.Size = New System.Drawing.Size(73, 19)
Me.txtScanTime.TabIndex = 16
Me.txtScanTime.Text = "1000"
Me.txtScanTime.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
Me.ToolTip1.SetToolTip(Me.txtScanTime, "Auto Scan time interval")
'
'cmdRead
'
Me.cmdRead.BackColor = System.Drawing.SystemColors.Control
Me.cmdRead.Cursor = System.Windows.Forms.Cursors.Default
Me.cmdRead.ForeColor = System.Drawing.SystemColors.ControlText
Me.cmdRead.Location = New System.Drawing.Point(168, 21)
Me.cmdRead.Name = "cmdRead"
Me.cmdRead.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.cmdRead.Size = New System.Drawing.Size(57, 25)
Me.cmdRead.TabIndex = 15
Me.cmdRead.Text = "&Read"
Me.ToolTip1.SetToolTip(Me.cmdRead, "Single Read action")
'
'txtReturnData
'
Me.txtReturnData.AcceptsReturn = True
Me.txtReturnData.AutoSize = False
Me.txtReturnData.BackColor = System.Drawing.SystemColors.Window
Me.txtReturnData.Cursor = System.Windows.Forms.Cursors.IBeam
Me.txtReturnData.ForeColor = System.Drawing.SystemColors.WindowText
Me.txtReturnData.Location = New System.Drawing.Point(80, 22)
Me.txtReturnData.MaxLength = 0
Me.txtReturnData.Name = "txtReturnData"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -