📄 mdiform1.frm
字号:
VERSION 5.00
Object = "{478E45E0-5745-11CF-8918-00A02416C765}#1.0#0"; "sqaote32.ocx"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "comdlg32.ocx"
Begin VB.MDIForm MDIForm1
BackColor = &H8000000C&
Caption = "Zyxel PQA SMT Auto test system"
ClientHeight = 6570
ClientLeft = 1260
ClientTop = 630
ClientWidth = 9495
Icon = "MDIForm1.frx":0000
LinkTopic = "MDIForm1"
MousePointer = 1 'Arrow
Begin MSComDlg.CommonDialog CommonDiag
Left = 9000
Top = 120
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin SQAOTestObjectsCtl.SQAOTest SQAOTest1
Align = 1 'Align Top
Height = 570
Left = 0
TabIndex = 0
TabStop = 0 'False
Top = 0
Width = 570
_ExtentX = 1005
_ExtentY = 1005
End
Begin VB.Menu MenuFile
Caption = "&Config"
End
Begin VB.Menu MenuFunction
Caption = "&Function"
Begin VB.Menu MnuReport
Caption = "Report"
End
Begin VB.Menu MnuTermianl
Caption = "Terminal"
End
Begin VB.Menu MnuTelnet
Caption = "Telnet"
End
Begin VB.Menu MnuBroswer
Caption = "Browser"
End
End
Begin VB.Menu MenuExecute
Caption = "&Execute"
End
Begin VB.Menu About
Caption = "&Help"
Begin VB.Menu MenuReport
Caption = "Report"
End
Begin VB.Menu MenuAbout
Caption = "About"
End
Begin VB.Menu MenuReference
Caption = "Reference"
End
End
Begin VB.Menu Exit
Caption = "E&xit"
End
End
Attribute VB_Name = "MDIForm1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Exit_Click()
On Error GoTo Err
Frm_Series.SaxComm.PortOpen = False
Frm_Series.SaxComm1.PortOpen = False
Dim intCount As Long
For intCount = Forms.count - 1 To 0 Step -1
If intCount = 1 Then
Exit For
Else
Unload Forms(intCount)
End If
Next
Unload Me
Err:
Exit Sub
End Sub
Private Sub MDIForm_Load()
speed_chk = False
If Command = "" Then
Setting.Txtdlf.Text = ""
Setting.rpt.Text = ""
Setting.Textvab.Text = ""
Else
'MsgBox Command
Open Command For Input As #5
Do While Not EOF(5)
Line Input #5, acctno
'MsgBox acctno
estart = InStr(1, acctno, "=")
cmd = Mid(acctno, 1, estart - 1)
Value = Mid(acctno, estart + 1, Len(acctno) - estart)
'MsgBox cmd
'MsgBox Value
Select Case cmd
Case "Program File"
Setting.txtscr.Text = Value
Case "Script File"
Setting.Txtdlf.Text = Value
Case "Report File"
Setting.rpt.Text = Value
Case "Start Time"
Setting.Textvab.Text = Value
Case "Local Com Port"
If Value = "Unused" Then
LocalCom = 0
Setting.local_com.Text = "Unused"
ElseIf Value = "Com1" Then
LocalCom = 1
Setting.local_com.Text = "Com1"
ElseIf Value = "Com2" Then
LocalCom = 2
Setting.local_com.Text = "Com2"
ElseIf Value = "Com3" Then
LocalCom = 3
Setting.local_com.Text = "Com3"
Else
LocalCom = 4
Setting.local_com.Text = "Com4"
End If
Case "Remote Com Port"
If Value = "Unused" Then
RemoteCom = 0
Setting.remote_com.Text = "Unused"
ElseIf Value = "Com1" Then
RemoteCom = 1
Setting.remote_com.Text = "Com1"
ElseIf Value = "Com2" Then
RemoteCom = 2
Setting.remote_com.Text = "Com2"
ElseIf Value = "Com3" Then
Setting.remote_com.Text = "Com3"
RemoteCom = 3
Else
RemoteCom = 4
Setting.remote_com.Text = "Com4"
End If
Case "Local Baud Rate"
If Value = "9600" Then
LocalBand = 5
Setting.local_band.Text = "9600"
ElseIf Value = "19200" Then
LocalBand = 6
Setting.local_band.Text = "19200"
ElseIf Value = "38400" Then
LocalBand = 7
Setting.local_band.Text = "38400"
ElseIf Value = "57600" Then
LocalBand = 8
Setting.local_band.Text = "57600"
ElseIf Value = "115200" Then
LocalBand = 9
Setting.local_band.Text = "115200"
End If
Case "Remote Baud Rate"
If Value = "9600" Then
RemoteBand = 5
Setting.remote_band.Text = "9600"
ElseIf Value = "19200" Then
RemoteBand = 6
Setting.remote_band.Text = "19200"
ElseIf Value = "38400" Then
RemoteBand = 7
Setting.remote_band.Text = "38400"
ElseIf Value = "57600" Then
RemoteBand = 8
Setting.remote_band.Text = "57600"
ElseIf Value = "115200" Then
RemoteBand = 9
Setting.remote_band.Text = "115200"
End If
Case "Local Password"
Setting.local_pwd.Text = Value
Case "Remote Password"
Setting.reomte_pwd.Text = Value
Case "SMT Menu Exists"
If Value = "Yes" Then
Setting.ChkMenu.Value = 1
Else
Setting.ChkMenu.Value = 0
End If
Case "System Reboot"
If Value = "Yes" Then
Setting.sr.Value = 1
Else
Setting.sr.Value = 0
End If
Case "L1"
If Value = "Yes" Then
Setting.L1.Value = 1
Else
Setting.L1.Value = 0
End If
Case "L2"
If Value = "Yes" Then
Setting.L2.Value = 1
Else
Setting.L2.Value = 0
End If
Case "L3"
If Value = "Yes" Then
Setting.L3.Value = 1
Else
Setting.L3.Value = 0
End If
Case "BAT"
If Value = "Yes" Then
Setting.BAT.Value = 1
Else
Setting.BAT.Value = 0
End If
Case "ENV"
If Value = "Yes" Then
Setting.ENV.Value = 1
Else
Setting.ENV.Value = 0
End If
End Select
Loop
End If
Setting.SSTab1.Tab = 0
End Sub
Private Sub MDIForm_Unload(Cancel As Integer)
Frm_Series.SaxComm.PortOpen = False
Frm_Series.SaxComm1.PortOpen = False
Unload Me
Dim intCount As Integer
For intCount = Forms.count - 1 To 0 Step -1
Unload Forms(intCount)
Next
End Sub
Private Sub MenuAbout_Click()
frmSplash.Show
End Sub
Sub MenuExecute_Click()
On Error GoTo ErrorHed3
If SaveFileChg Then
Kill (Setting.rpt.Text)
Close #2
Else
Kill (Setting.rpt.Text)
End If
ErrorHed3:
IsFileExist = Dir(Setting.rpt.Text, vbNormal)
If IsFileExist = "" And Setting.rpt.Text <> "" Then
'''Open Setting.rpt.Text For Binary Access Write As #2
End If
Setting.Visible = False
If Command = "" Then
If Setting.local_band.ListIndex = -1 Then
LocalBand = 5
Else
LocalBand = Setting.local_band.ListIndex
End If
If Setting.remote_band.ListIndex = -1 Then
RemoteBand = 5
Else
RemoteBand = Setting.remote_band.ListIndex
End If
If Setting.local_com.ListIndex = -1 Then
LocalCom = 1
Else
LocalCom = Setting.local_com.ListIndex
End If
If Setting.remote_com.ListIndex = -1 Then
RemoteCom = 0
Else
RemoteCom = Setting.remote_com.ListIndex
End If
If Setting.local_shaking.ListIndex = -1 Then
localshaking = 0
Else
localshaking = Setting.local_shaking.ListIndex
End If
If Setting.remote_shaking.ListIndex = -1 Then
remoteshaking = 0
Else
remoteshaking = Setting.remote_shaking.ListIndex
End If
End If
' If Not speed_chk Then
Frm_Series.SaxComm.Settings = Setting.local_band.List(LocalBand) + ",n,8,1"
Frm_Series.SaxComm1.Settings = Setting.remote_band.List(RemoteBand) + ",n,8,1"
' End If
Frm_Series.SaxComm.Handshaking = localshaking
Frm_Series.SaxComm1.Handshaking = remoteshaking
'MsgBox (localshaking)
' Frm_Series.Show vbModal
Frm_Series.Visible = True
Frm_Series.Run.Caption = "Running"
Frm_Series.execute_string.Text = ""
End Sub
Private Sub MenuFileOpen_Click()
End Sub
Private Sub MenuSet_Click()
End Sub
Private Sub MenuFile_Click()
Setting.Visible = True
End Sub
Private Sub MnuBroswer_Click()
frmBrowser.Show
End Sub
Private Sub MnuReport_Click()
Set fMainForm = New frmReader
frmReader.Show
End Sub
Private Sub MnuTelnet_Click()
frmTelnet.Show
End Sub
Private Sub MnuTermianl_Click()
frmConsol.Show
Frm_Series.SaxComm.PortOpen = False
frmConsol.SaxComm.PortOpen = True
frmConsol.Visible = True
frmConsol.SaxComm.Settings = Setting.local_band.List(LocalBand) + ",n,8,1"
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -