#include <GUIConstantsEx.au3>
#include <ButtonConstants.au3>
#include <StaticConstants.au3>
#include <file.au3>
#NoTrayIcon
Local $msg
GuiCreate("测试良率报警系统", 800, 600)
$label0=GUICtrlCreateLabel("测试良率报警系统",300,50,400,60)
$label1=GUICtrlCreateLabel("您已连续测试了 5 PCS 不良 !",100,150,400,60)
$label2=GUICtrlCreateLabel("请 Call On-Line 工程师分析 !",100,190,400,100)
$label3=GUICtrlCreateLabel("您是否要继续测试?",250,480,220,100)
$Button_1= GUICtrlCreateButton ("继续进行测试", 500, 450, 150, 70)
GUICtrlSetFont($label0, 16, 800, "", "Comic Sans MS")
GUICtrlSetFont($label1, 16, 800, "", "Comic Sans MS")
GUICtrlSetFont($label2, 16, 800, "", "Comic Sans MS")
GUICtrlSetFont($label3, 16, 800, "", "Comic Sans MS")
GUICtrlSetFont($Button_1, 12, 800, "", "Comic Sans MS")
GuiSetState()
WinSetOnTop("测试良率报警系统", "", 1)
Show_ErrorCode()
While 1
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_MINIMIZE
WinActivate ("测试良率报警系统")
Case $msg = $Button_1
FileDelete ("C:\Alarm\*.*")
ExitLoop
EndSelect
WEnd
GUIDelete()
Func Show_ErrorCode()
$Eeeor_Code0=GUICtrlCreateLabel("Error_Code :",100,250,180,80)
GUICtrlSetFont($Eeeor_Code0, 16, 800, "", "Comic Sans MS")
$file = FileOpen("C:\Alarm\ErrorCode_Info.txt", 0)
$line1 = FileReadLine($file,1)
$Eeeor_Code1=GUICtrlCreateLabel($line1,150,300,100,100)
GUICtrlSetFont($Eeeor_Code1, 16, 800, "", "Comic Sans MS")
$line2 = FileReadLine($file,2)
$Eeeor_Code2=GUICtrlCreateLabel($line2,230,300,100,100)
GUICtrlSetFont($Eeeor_Code2, 16, 800, "", "Comic Sans MS")
$line3 = FileReadLine($file,3)
$Eeeor_Code3=GUICtrlCreateLabel($line3,310,300,100,100)
GUICtrlSetFont($Eeeor_Code3, 16, 800, "", "Comic Sans MS")
$line4 = FileReadLine($file,4)
$Eeeor_Code4=GUICtrlCreateLabel($line4,150,350,100,100)
GUICtrlSetFont($Eeeor_Code4, 16, 800, "", "Comic Sans MS")
$line5 = FileReadLine($file,5)
$Eeeor_Code5=GUICtrlCreateLabel($line5,230,350,100,100)
GUICtrlSetFont($Eeeor_Code5, 16, 800, "", "Comic Sans MS")
FileClose($file)
EndFunc