📄 nihongdeng7.frm
字号:
VERSION 5.00
Begin VB.Form Form7
BorderStyle = 1 'Fixed Single
Caption = "演示"
ClientHeight = 2655
ClientLeft = 4545
ClientTop = 840
ClientWidth = 4590
ControlBox = 0 'False
LinkTopic = "Form7"
MaxButton = 0 'False
MinButton = 0 'False
Moveable = 0 'False
ScaleHeight = 2655
ScaleWidth = 4590
Begin VB.Frame Frame2
Caption = "选择EPROM"
Height = 1815
Left = 3240
TabIndex = 6
Top = 120
Width = 1095
Begin VB.OptionButton Option2
Caption = "64K"
Height = 255
Index = 4
Left = 120
TabIndex = 11
Top = 1320
Width = 855
End
Begin VB.OptionButton Option2
Caption = "32K"
Height = 255
Index = 3
Left = 120
TabIndex = 10
Top = 1080
Width = 855
End
Begin VB.OptionButton Option2
Caption = "16K"
Height = 255
Index = 2
Left = 120
TabIndex = 9
Top = 840
Width = 855
End
Begin VB.OptionButton Option2
Caption = "8K"
Height = 255
Index = 1
Left = 120
TabIndex = 8
Top = 600
Width = 855
End
Begin VB.OptionButton Option2
Caption = "4K"
Height = 255
Index = 0
Left = 120
TabIndex = 7
Top = 360
Value = -1 'True
Width = 855
End
End
Begin VB.CommandButton Command2
Caption = "取消"
Height = 375
Left = 2880
TabIndex = 4
Top = 2160
Width = 975
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 375
Left = 720
TabIndex = 3
Top = 2160
Width = 975
End
Begin VB.Frame Frame1
Caption = "选择方式"
Height = 1815
Left = 240
TabIndex = 0
Top = 120
Width = 2775
Begin VB.OptionButton Option1
Caption = "查看花样在4K地址的位置"
Height = 255
Index = 2
Left = 120
TabIndex = 5
Top = 1320
Width = 2415
End
Begin VB.OptionButton Option1
Caption = "花样演示加上HEX文件输出"
Height = 255
Index = 1
Left = 120
TabIndex = 2
Top = 840
Width = 2415
End
Begin VB.OptionButton Option1
Caption = "花样演示没有HEX文件输出"
Height = 255
Index = 0
Left = 120
TabIndex = 1
Top = 360
Value = -1 'True
Width = 2415
End
End
End
Attribute VB_Name = "Form7"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim FileNumber As Single
Dim FileName As String
Dim DgFlag As Boolean
Dim HzFlag As Boolean
OutEnableFlag = False
CheckPosition = False
If Form7.Option1(1).Value = True Then
OutEnableFlag = True
ElseIf Form7.Option1(2).Value = True Then
OutEnableFlag = True
CheckPosition = True
End If
Unload Form7
Form1.Enabled = True
Form1.SetFocus
DgFlag = False
HzFlag = False
PlayStyle = False
If (NowLs > 0) And (TotalDgHuaYang > 0) Then
For i = 0 To MaxHuaYangNumber - 1
If NowHyName(i) <> HuaYangNoUseName Then
Call DgInitialize(NowHyName(i), 0)
Exit For
End If
Next i
DgFlag = True
End If
If (NowHz > 0) And (TotalHzHuaYang > 0) Then
For i = 0 To NowHz - 1
If HzXuHao(i) <> TotalHz Then
Form1.Label1(HzXuHao(i)).Visible = True
End If
Next i
HzFlag = True
PlayStyle = True
End If
If (DgFlag = False) And (HzFlag = False) Then
MsgBox "没有可以演示的数据!", 48, "错误"
Exit Sub
End If
Form1.Label4.Visible = False
Form1.Label5.Visible = False
Form1.Label6.Visible = False
Form1.Label7.Visible = False
If (OutEnableFlag = True) And (CheckPosition = False) Then
Form1.STOPPLAY.Enabled = False
End If
Form1.FILE.Enabled = False
Form1.EDIT.Enabled = False
Form1.SHUAXIN.Enabled = False
Form1.BEGINPLAY.Enabled = False
StopPlayFlag = False
NowDgHuaYang = 0
NowHzHuaYang = 0
For i = 0 To TotalOutLs - 1
OutputData(i) = 0
Next i
If TotalDgHuaYang = 0 Then
If HzFlag = True Then
If OutEnableFlag = True Then
AddressData = 0
OutOverFlag = False
If CheckPosition = False Then
OutPrompt$ = "请输入要保存的文件名"
OutTitle$ = "保存"
OutResponse = InputBox$(OutPrompt$, OutTitle$)
If OutResponse = Empty Then
MsgBox "文件名不能为空!", 48, "错误"
Exit Sub
End If
FileNumber = NowHz / 8
If FileNumber = Int(FileNumber) Then
TotalFile = Int(FileNumber)
Else
TotalFile = Int(FileNumber) + 1
End If
For i = 1 To TotalFile
FileName = "OUTPUT\" & OutResponse & i & ".HEX"
Open FileName For Output As #i
Next i
HzOutAdd = 0
For i = 0 To NowHz - 1
If HzXuHao(i) <> TotalHz Then
OutputData(i + HzOutAdd) = 1
End If
Next i
Form1.Label4.Visible = True
Else
Form1.Label5.Visible = True
Form1.Label7.Caption = AddressData
Form1.Label6.Visible = True
Form1.Label7.Visible = True
End If
End If
Do
Do
RunHzHyName = NowHzHyName(NowHzHuaYang)
If RunHzHyName = HuaYangNoUseName Then
NowHzHuaYang = NowHzHuaYang + 1
If NowHzHuaYang = MaxHuaYangNumber Then
NowHzHuaYang = 0
If (OutEnableFlag = True) And (OutOverFlag = False) Then
i = CompleteWrite
If i = 1 Then
Exit Sub
End If
End If
End If
End If
Loop Until RunHzHyName <> HuaYangNoUseName
HzHuaYangPlay (NowHzHuaYang)
Do
DoEvents
Loop Until (NowRunHzTimes = RunHzTimes) Or (StopPlayFlag = True)
If StopPlayFlag = True Then
StopNow (0)
Exit Sub
End If
If NowRunHzTimes = RunHzTimes Then
NowHzHuaYang = NowHzHuaYang + 1
If NowHzHuaYang = MaxHuaYangNumber Then
NowHzHuaYang = 0
End If
End If
Loop
End If
Else
If DgFlag = True Then
If OutEnableFlag = True Then
AddressData = 0
OutOverFlag = False
If CheckPosition = False Then
OutPrompt$ = "请输入要保存的文件名"
OutTitle$ = "保存"
OutResponse = InputBox$(OutPrompt$, OutTitle$)
If OutResponse = Empty Then
MsgBox "文件名不能为空!", 48, "错误"
Exit Sub
End If
FileNumber = (NowLs + NowHz) / 8
If FileNumber = Int(FileNumber) Then
TotalFile = Int(FileNumber)
Else
TotalFile = Int(FileNumber) + 1
End If
For i = 1 To TotalFile
FileName = "OUTPUT\" & OutResponse & i & ".HEX"
Open FileName For Output As #i
Next i
For i = 0 To MaxHuaYangNumber - 1
If NowHyName(i) <> HuaYangNoUseName Then
Call DgInitialize(NowHyName(i), 1)
Exit For
End If
Next i
HzOutAdd = NowLs
For i = 0 To NowHz - 1
If HzXuHao(i) <> TotalHz Then
OutputData(i + HzOutAdd) = 1
End If
Next i
Form1.Label4.Visible = True
Else
Form1.Label5.Visible = True
Form1.Label7.Caption = AddressData
Form1.Label6.Visible = True
Form1.Label7.Visible = True
End If
End If
Do
Do
RunHyName = NowHyName(NowDgHuaYang)
If RunHyName = HuaYangNoUseName Then
NowDgHuaYang = NowDgHuaYang + 1
If NowDgHuaYang = MaxHuaYangNumber Then
NowDgHuaYang = 0
If (OutEnableFlag = True) And (OutOverFlag = False) Then
i = CompleteWrite
If i = 1 Then
Exit Sub
End If
End If
End If
End If
Loop Until RunHyName <> HuaYangNoUseName
Call DgHuaYangPlay(NowDgHuaYang, 1)
Do
DoEvents
Loop Until (NowRunTimes = RunTimes) Or (StopPlayFlag = True)
If StopPlayFlag = True Then
StopNow (0)
Exit Sub
End If
If NowRunTimes = RunTimes Then
NowDgHuaYang = NowDgHuaYang + 1
If NowDgHuaYang = MaxHuaYangNumber Then
NowDgHuaYang = 0
End If
End If
Loop
End If
End If
End Sub
Private Sub Command2_Click()
Unload Form7
Form1.Enabled = True
Form1.SetFocus
End Sub
Private Sub Form_Load()
Select Case EpromSize
Case 4096
Form7.Option2(0).Value = True
Form7.Option1(2).Caption = "查看花样在4K地址的位置"
Case 8192
Form7.Option2(1).Value = True
Form7.Option1(2).Caption = "查看花样在8K地址的位置"
Case 16384
Form7.Option2(2).Value = True
Form7.Option1(2).Caption = "查看花样在16K地址的位置"
Case 32768
Form7.Option2(3).Value = True
Form7.Option1(2).Caption = "查看花样在32K地址的位置"
Case 65536
Form7.Option2(4).Value = True
Form7.Option1(2).Caption = "查看花样在64K地址的位置"
End Select
End Sub
Private Sub Option2_Click(Index As Integer)
Select Case Index
Case 0
EpromSize = 4096
Form7.Option1(2).Caption = "查看花样在4K地址的位置"
Case 1
EpromSize = 8192
Form7.Option1(2).Caption = "查看花样在8K地址的位置"
Case 2
EpromSize = 16384
Form7.Option1(2).Caption = "查看花样在16K地址的位置"
Case 3
EpromSize = 32768
Form7.Option1(2).Caption = "查看花样在32K地址的位置"
Case 4
EpromSize = 65536
Form7.Option1(2).Caption = "查看花样在64K地址的位置"
End Select
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -