This repository has been archived by the owner on Feb 19, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
frmTxSLSharedIO.vb
161 lines (143 loc) · 5.85 KB
/
frmTxSLSharedIO.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
Option Strict Off
Option Explicit On
Friend Class frmTxSLSharedIO
Inherits System.Windows.Forms.Form
#Region "Windows Form Designer generated code "
Public Sub New()
MyBase.New()
If m_vb6FormDefInstance Is Nothing Then
If m_InitializingDefInstance Then
m_vb6FormDefInstance = Me
Else
Try
'For the start-up form, the first instance created is the default instance.
If System.Reflection.Assembly.GetExecutingAssembly.EntryPoint.DeclaringType Is Me.GetType Then
m_vb6FormDefInstance = Me
End If
Catch
End Try
End If
End If
'This call is required by the Windows Form Designer.
InitializeComponent()
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
Public ToolTip1 As System.Windows.Forms.ToolTip
'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.
Friend WithEvents RichTextBox1 As System.Windows.Forms.RichTextBox
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container
Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components)
Me.RichTextBox1 = New System.Windows.Forms.RichTextBox
Me.SuspendLayout()
'
'RichTextBox1
'
Me.RichTextBox1.Location = New System.Drawing.Point(16, 24)
Me.RichTextBox1.Name = "RichTextBox1"
Me.RichTextBox1.Size = New System.Drawing.Size(424, 88)
Me.RichTextBox1.TabIndex = 0
Me.RichTextBox1.Text = ""
'
'frmTxSLSharedIO
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.BackColor = System.Drawing.SystemColors.Control
Me.ClientSize = New System.Drawing.Size(639, 459)
Me.Controls.Add(Me.RichTextBox1)
Me.Cursor = System.Windows.Forms.Cursors.Default
Me.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Location = New System.Drawing.Point(43, 75)
Me.Name = "frmTxSLSharedIO"
Me.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
Me.Text = "TxSL Shared IO"
Me.ResumeLayout(False)
End Sub
#End Region
#Region "Upgrade Support "
Private Shared m_vb6FormDefInstance As frmTxSLSharedIO
Private Shared m_InitializingDefInstance As Boolean
Public Shared Property DefInstance() As frmTxSLSharedIO
Get
If m_vb6FormDefInstance Is Nothing OrElse m_vb6FormDefInstance.IsDisposed Then
m_InitializingDefInstance = True
m_vb6FormDefInstance = New frmTxSLSharedIO()
m_InitializingDefInstance = False
End If
DefInstance = m_vb6FormDefInstance
End Get
Set
m_vb6FormDefInstance = Value
End Set
End Property
#End Region
'*****************************************************************************
'frmTxSLSharedIO.frm
'frmTxSLSharedIO.frx
'
'The frmTxSLSharedIO.frm is provided as a container to hold
'code that will be used to control IO that is normally controlled
'by the test system. Since we don't know what IO is available, we
'have only provided some structure here, but don't actually do
'any control. A typical application would be to set a pass/fail
'indicator upon pass or fail of a UUT, or to light a red indicator,
'should operator assistance be required.
'Also note that the subs here mirror the event names of the TxSL control, and of
'the main form. This is to provide some consistency in relating subs here with
'the execution of the rest of the program. This is a recommended approach, but not
'required.
'*****************************************************************************
Private LocalSource As String
Public Sub AfterLogin()
On Error GoTo LocalErrorHandler
LocalSource = ":" & Me.Name & ":AfterLogin " 'Used to track where the error happened
'modify to send user messages
Exit Sub
LocalErrorHandler:
frmErrorDialog.ErrorHandler(Err.Number, Err.Source & LocalSource, Err.Description)
End Sub
Public Sub AfterTestplanStop(ByVal Reason As HPTestExecSL.TestplanState)
'It is most likely that automation would be necessary following the
'AfterTestplanStop event from TxSL
On Error GoTo LocalErrorHandler
LocalSource = ":" & Me.Name & ":AfterTestplanStop " 'Used to track where the error happened
Select Case Reason
Case HPTestExecSL.TestplanState.TestplanPassed
'Set bits appropriate for a passed UUT
Case HPTestExecSL.TestplanState.TestplanFailed
'Set bits appropriate for a failed UUT
Case Else
'If we get anything other than a pass or fail, we will probably want to fail the UUT
End Select
Exit Sub
LocalErrorHandler:
frmErrorDialog.ErrorHandler(Err.Number, Err.Source & LocalSource, Err.Description)
End Sub
Private Sub frmTxSLSharedIO_Load(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles MyBase.Load
'Configure the flags to whatever they should be when this form is loaded.
'This may be nothing
End Sub
Public Sub AfterTestplanUnload()
'If you want to do something After the Testplan has been unloaded, put the
'statements here.
End Sub
Private Sub frmTxSLSharedIO_Closed(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles MyBase.Closed
'Configure the flags to whatever they should be when this form is loaded
'Since this is what would likely happen after an orderly shutdown, this may
'be a good time to ask for assistance.
'
End Sub
End Class