📄 aoform.vb
字号:
Public Class frmAO
Inherits System.Windows.Forms.Form
Dim OutputRange As Single
Dim DataArray() As Single
Dim BinDataArray() As Short
Dim IsInitializing As Boolean
Dim bRet As Boolean
#Region " Windows Form Designer generated code "
Public Sub New()
MyBase.New()
'This call is required by the Windows Form Designer.
IsInitializing = True
InitializeComponent()
IsInitializing = False
'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 txtNumberOfOutputs As System.Windows.Forms.TextBox
Public WithEvents chkCyclicMode As System.Windows.Forms.CheckBox
Public WithEvents cmbOutputRange As System.Windows.Forms.ComboBox
Public WithEvents cmbChannel As System.Windows.Forms.ComboBox
Public WithEvents txtOutputRate As System.Windows.Forms.TextBox
Public WithEvents cmbDataType As System.Windows.Forms.ComboBox
Public WithEvents cmbTransferMode As System.Windows.Forms.ComboBox
Public WithEvents Line1 As System.Windows.Forms.Label
Public WithEvents Label11 As System.Windows.Forms.Label
Public WithEvents Label8 As System.Windows.Forms.Label
Public WithEvents Label6 As System.Windows.Forms.Label
Public WithEvents Label5 As System.Windows.Forms.Label
Public WithEvents Label3 As System.Windows.Forms.Label
Public WithEvents Label4 As System.Windows.Forms.Label
Public WithEvents Label7 As System.Windows.Forms.Label
Public WithEvents Frame4 As System.Windows.Forms.GroupBox
Public WithEvents Frame3 As System.Windows.Forms.GroupBox
Public WithEvents txtErrorMessage As System.Windows.Forms.TextBox
Public WithEvents txtErrorCode As System.Windows.Forms.TextBox
Public WithEvents Label13 As System.Windows.Forms.Label
Public WithEvents Label12 As System.Windows.Forms.Label
Public WithEvents txtStatus As System.Windows.Forms.TextBox
Public WithEvents cmdStatus As System.Windows.Forms.Button
Public WithEvents cmdOutputStop As System.Windows.Forms.Button
Public WithEvents cmdOutputStart As System.Windows.Forms.Button
Public WithEvents lstWritting As System.Windows.Forms.ListBox
Public WithEvents chkEventEnabled As System.Windows.Forms.CheckBox
Public WithEvents Label10 As System.Windows.Forms.Label
Public WithEvents cmdExit As System.Windows.Forms.Button
Public WithEvents ToolTip1 As System.Windows.Forms.ToolTip
Public WithEvents Frame1 As System.Windows.Forms.GroupBox
Public WithEvents txtDeviceNum As System.Windows.Forms.TextBox
Public WithEvents txtDeviceName As System.Windows.Forms.TextBox
Public WithEvents cmdSelectDevice As System.Windows.Forms.Button
Public WithEvents Label1 As System.Windows.Forms.Label
Public WithEvents Label2 As System.Windows.Forms.Label
Public WithEvents ErrorTimer As System.Windows.Forms.Timer
Friend WithEvents DAQAO1 As AxDAQAOLib.AxDAQAO
Friend WithEvents Label14 As System.Windows.Forms.Label
Friend WithEvents cmbWaveForm As System.Windows.Forms.ComboBox
Public WithEvents PropertyFrame As System.Windows.Forms.GroupBox
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container
Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(frmAO))
Me.PropertyFrame = New System.Windows.Forms.GroupBox
Me.cmbWaveForm = New System.Windows.Forms.ComboBox
Me.Label14 = New System.Windows.Forms.Label
Me.txtNumberOfOutputs = New System.Windows.Forms.TextBox
Me.chkCyclicMode = New System.Windows.Forms.CheckBox
Me.cmbOutputRange = New System.Windows.Forms.ComboBox
Me.cmbChannel = New System.Windows.Forms.ComboBox
Me.txtOutputRate = New System.Windows.Forms.TextBox
Me.cmbDataType = New System.Windows.Forms.ComboBox
Me.cmbTransferMode = New System.Windows.Forms.ComboBox
Me.Line1 = New System.Windows.Forms.Label
Me.Label11 = New System.Windows.Forms.Label
Me.Label8 = New System.Windows.Forms.Label
Me.Label6 = New System.Windows.Forms.Label
Me.Label5 = New System.Windows.Forms.Label
Me.Label3 = New System.Windows.Forms.Label
Me.Label4 = New System.Windows.Forms.Label
Me.Label7 = New System.Windows.Forms.Label
Me.Frame4 = New System.Windows.Forms.GroupBox
Me.Frame3 = New System.Windows.Forms.GroupBox
Me.txtErrorMessage = New System.Windows.Forms.TextBox
Me.txtErrorCode = New System.Windows.Forms.TextBox
Me.Label13 = New System.Windows.Forms.Label
Me.Label12 = New System.Windows.Forms.Label
Me.txtStatus = New System.Windows.Forms.TextBox
Me.cmdStatus = New System.Windows.Forms.Button
Me.cmdOutputStop = New System.Windows.Forms.Button
Me.cmdOutputStart = New System.Windows.Forms.Button
Me.lstWritting = New System.Windows.Forms.ListBox
Me.chkEventEnabled = New System.Windows.Forms.CheckBox
Me.Label10 = New System.Windows.Forms.Label
Me.cmdExit = New System.Windows.Forms.Button
Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components)
Me.txtDeviceNum = New System.Windows.Forms.TextBox
Me.txtDeviceName = New System.Windows.Forms.TextBox
Me.cmdSelectDevice = New System.Windows.Forms.Button
Me.Frame1 = New System.Windows.Forms.GroupBox
Me.Label1 = New System.Windows.Forms.Label
Me.Label2 = New System.Windows.Forms.Label
Me.ErrorTimer = New System.Windows.Forms.Timer(Me.components)
Me.DAQAO1 = New AxDAQAOLib.AxDAQAO
Me.PropertyFrame.SuspendLayout()
Me.Frame4.SuspendLayout()
Me.Frame3.SuspendLayout()
Me.Frame1.SuspendLayout()
CType(Me.DAQAO1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'PropertyFrame
'
Me.PropertyFrame.BackColor = System.Drawing.SystemColors.Control
Me.PropertyFrame.Controls.Add(Me.cmbWaveForm)
Me.PropertyFrame.Controls.Add(Me.Label14)
Me.PropertyFrame.Controls.Add(Me.txtNumberOfOutputs)
Me.PropertyFrame.Controls.Add(Me.chkCyclicMode)
Me.PropertyFrame.Controls.Add(Me.cmbOutputRange)
Me.PropertyFrame.Controls.Add(Me.cmbChannel)
Me.PropertyFrame.Controls.Add(Me.txtOutputRate)
Me.PropertyFrame.Controls.Add(Me.cmbDataType)
Me.PropertyFrame.Controls.Add(Me.cmbTransferMode)
Me.PropertyFrame.Controls.Add(Me.Line1)
Me.PropertyFrame.Controls.Add(Me.Label11)
Me.PropertyFrame.Controls.Add(Me.Label8)
Me.PropertyFrame.Controls.Add(Me.Label6)
Me.PropertyFrame.Controls.Add(Me.Label5)
Me.PropertyFrame.Controls.Add(Me.Label3)
Me.PropertyFrame.Controls.Add(Me.Label4)
Me.PropertyFrame.Controls.Add(Me.Label7)
Me.PropertyFrame.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.PropertyFrame.ForeColor = System.Drawing.SystemColors.ControlText
Me.PropertyFrame.Location = New System.Drawing.Point(12, 97)
Me.PropertyFrame.Name = "PropertyFrame"
Me.PropertyFrame.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.PropertyFrame.Size = New System.Drawing.Size(249, 281)
Me.PropertyFrame.TabIndex = 22
Me.PropertyFrame.TabStop = False
Me.PropertyFrame.Text = "Property Settings:"
'
'cmbWaveForm
'
Me.cmbWaveForm.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.cmbWaveForm.Items.AddRange(New Object() {"Sine Wave", "Square Wave", "Triangle Wave"})
Me.cmbWaveForm.Location = New System.Drawing.Point(106, 248)
Me.cmbWaveForm.Name = "cmbWaveForm"
Me.cmbWaveForm.Size = New System.Drawing.Size(126, 22)
Me.cmbWaveForm.TabIndex = 31
'
'Label14
'
Me.Label14.Location = New System.Drawing.Point(8, 248)
Me.Label14.Name = "Label14"
Me.Label14.Size = New System.Drawing.Size(96, 16)
Me.Label14.TabIndex = 30
Me.Label14.Text = "Output Waveform"
'
'txtNumberOfOutputs
'
Me.txtNumberOfOutputs.AcceptsReturn = True
Me.txtNumberOfOutputs.AutoSize = False
Me.txtNumberOfOutputs.BackColor = System.Drawing.SystemColors.Window
Me.txtNumberOfOutputs.Cursor = System.Windows.Forms.Cursors.IBeam
Me.txtNumberOfOutputs.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.txtNumberOfOutputs.ForeColor = System.Drawing.SystemColors.WindowText
Me.txtNumberOfOutputs.Location = New System.Drawing.Point(96, 152)
Me.txtNumberOfOutputs.MaxLength = 0
Me.txtNumberOfOutputs.Name = "txtNumberOfOutputs"
Me.txtNumberOfOutputs.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.txtNumberOfOutputs.Size = New System.Drawing.Size(65, 19)
Me.txtNumberOfOutputs.TabIndex = 28
Me.txtNumberOfOutputs.Text = ""
'
'chkCyclicMode
'
Me.chkCyclicMode.BackColor = System.Drawing.SystemColors.Control
Me.chkCyclicMode.CheckAlign = System.Drawing.ContentAlignment.MiddleRight
Me.chkCyclicMode.Cursor = System.Windows.Forms.Cursors.Default
Me.chkCyclicMode.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.chkCyclicMode.ForeColor = System.Drawing.SystemColors.ControlText
Me.chkCyclicMode.Location = New System.Drawing.Point(8, 176)
Me.chkCyclicMode.Name = "chkCyclicMode"
Me.chkCyclicMode.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.chkCyclicMode.Size = New System.Drawing.Size(100, 23)
Me.chkCyclicMode.TabIndex = 25
Me.chkCyclicMode.Text = "Cyclic Mode"
'
'cmbOutputRange
'
Me.cmbOutputRange.BackColor = System.Drawing.SystemColors.Window
Me.cmbOutputRange.Cursor = System.Windows.Forms.Cursors.Default
Me.cmbOutputRange.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.cmbOutputRange.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.cmbOutputRange.ForeColor = System.Drawing.SystemColors.WindowText
Me.cmbOutputRange.Items.AddRange(New Object() {"0 ~ 5 V", "0 ~ 10 V"})
Me.cmbOutputRange.Location = New System.Drawing.Point(106, 216)
Me.cmbOutputRange.Name = "cmbOutputRange"
Me.cmbOutputRange.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.cmbOutputRange.Size = New System.Drawing.Size(126, 22)
Me.cmbOutputRange.TabIndex = 18
'
'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.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.cmbChannel.ForeColor = System.Drawing.SystemColors.WindowText
Me.cmbChannel.Location = New System.Drawing.Point(96, 24)
Me.cmbChannel.Name = "cmbChannel"
Me.cmbChannel.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.cmbChannel.Size = New System.Drawing.Size(129, 22)
Me.cmbChannel.TabIndex = 16
'
'txtOutputRate
'
Me.txtOutputRate.AcceptsReturn = True
Me.txtOutputRate.AutoSize = False
Me.txtOutputRate.BackColor = System.Drawing.SystemColors.Window
Me.txtOutputRate.Cursor = System.Windows.Forms.Cursors.IBeam
Me.txtOutputRate.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.txtOutputRate.ForeColor = System.Drawing.SystemColors.WindowText
Me.txtOutputRate.Location = New System.Drawing.Point(96, 120)
Me.txtOutputRate.MaxLength = 0
Me.txtOutputRate.Name = "txtOutputRate"
Me.txtOutputRate.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.txtOutputRate.Size = New System.Drawing.Size(65, 21)
Me.txtOutputRate.TabIndex = 13
Me.txtOutputRate.Text = "100"
Me.txtOutputRate.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
Me.ToolTip1.SetToolTip(Me.txtOutputRate, "Sample rate")
'
'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.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.cmbDataType.ForeColor = System.Drawing.SystemColors.WindowText
Me.cmbDataType.Items.AddRange(New Object() {"Raw Data", "Real Data"})
Me.cmbDataType.Location = New System.Drawing.Point(96, 56)
Me.cmbDataType.Name = "cmbDataType"
Me.cmbDataType.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.cmbDataType.Size = New System.Drawing.Size(131, 22)
Me.cmbDataType.TabIndex = 9
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -