📄 mainfrm.frm
字号:
VERSION 5.00
Begin VB.MDIForm mainfrm
BackColor = &H8000000C&
Caption = "氧乐果合成计算机智能控制系统 郑州大学(北校区)信息与控制研究所研制"
ClientHeight = 6525
ClientLeft = 2265
ClientTop = 1290
ClientWidth = 8880
LinkTopic = "MDIForm1"
ScrollBars = 0 'False
StartUpPosition = 2 '屏幕中心
WindowState = 2 'Maximized
Begin VB.Timer tmrSoftSpring
Enabled = 0 'False
Index = 2
Interval = 30000
Left = 1080
Top = 2640
End
Begin VB.Timer tmrSoftSpring
Enabled = 0 'False
Index = 1
Interval = 30000
Left = 600
Top = 2640
End
Begin VB.Timer tmrSoftSpring
Enabled = 0 'False
Index = 0
Interval = 30000
Left = 120
Top = 2640
End
Begin VB.Timer tmrDeleteRec
Enabled = 0 'False
Interval = 10000
Left = 120
Top = 2040
End
Begin VB.Timer tmrWriteRecord
Left = 120
Top = 1560
End
Begin VB.Timer tmrControl
Index = 2
Left = 840
Top = 960
End
Begin VB.Timer tmrControl
Index = 1
Left = 480
Top = 960
End
Begin VB.Timer tmrSample
Left = 120
Top = 396
End
Begin VB.Timer tmrControl
Index = 0
Left = 84
Top = 960
End
Begin VB.Menu mnuMain
Caption = "主控系统(&M)"
Begin VB.Menu mnuMainAorM
Caption = "控制方式(&0)"
Begin VB.Menu mnufyf1Auto
Caption = "一号釜自动(&1)"
End
Begin VB.Menu mnufyf1Manual
Caption = "一号釜人工(&2)"
End
Begin VB.Menu mnuAorM1
Caption = "-"
End
Begin VB.Menu mnufyf2Auto
Caption = "二号釜自动(&3)"
End
Begin VB.Menu mnufyf2Manual
Caption = "二号釜人工(&4)"
End
Begin VB.Menu mnuAorM2
Caption = "-"
End
Begin VB.Menu mnufyf3Auto
Caption = "三号釜自动(&5)"
End
Begin VB.Menu mnufyf3Manual
Caption = "三号釜人工(&6)"
End
End
Begin VB.Menu mnuMain_ZuTai
Caption = "系统运行组态"
Visible = 0 'False
End
Begin VB.Menu mnuMain1
Caption = "-"
End
Begin VB.Menu m_zkhm
Caption = "实时曲线(&1)"
Shortcut = ^Z
End
Begin VB.Menu mnuBaoJing
Caption = "报警明细(&2)"
Shortcut = ^W
End
Begin VB.Menu mnuMain2
Caption = "-"
End
Begin VB.Menu m_cssz
Caption = "参数设置(&3)"
End
Begin VB.Menu mnuMainUser
Caption = "用户列表(&4)"
End
Begin VB.Menu mnuBaoBiao
Caption = "统计报表(&5)"
End
Begin VB.Menu mnuDbManage
Caption = "数据库管理(&6)"
End
Begin VB.Menu mnuMain3
Caption = "-"
End
Begin VB.Menu mnuMainBlackBox
Caption = "系统黑匣子(&7)"
End
Begin VB.Menu mnuM1
Caption = "-"
End
Begin VB.Menu mnuExit1
Caption = "退出&X"
Shortcut = ^Q
End
End
Begin VB.Menu mnuCreat
Caption = "建立反应(&C)"
Begin VB.Menu mnuCreat1
Caption = "一号反应釜投料 (&1)"
Shortcut = ^A
End
Begin VB.Menu m_fyf1Add
Caption = "一号釜投料修正 (&2)"
End
Begin VB.Menu mnuCreat1ChuLiang
Caption = "一号釜反应完数据录入(&3)"
End
Begin VB.Menu mnuC1
Caption = "-"
End
Begin VB.Menu mnuCreat2
Caption = "二号反应釜投料 (&4)"
Shortcut = ^B
End
Begin VB.Menu m_fyf2Add
Caption = "二号釜投料修正 (&5)"
End
Begin VB.Menu mnuCreat2ChuLiang
Caption = "二号釜反应完数据录入(&6)"
End
Begin VB.Menu mnuC2
Caption = "-"
End
Begin VB.Menu mnuCreat3
Caption = "三号反应釜投料 (&7)"
Shortcut = ^C
End
Begin VB.Menu m_fyf3Add
Caption = "三号釜投料修正 (&8)"
End
Begin VB.Menu mnuCreat3ChuLiang
Caption = "三号釜反应完数据录入(&9)"
End
End
Begin VB.Menu M_gylc
Caption = "工艺流程(&P)"
Begin VB.Menu m_gylc1
Caption = "一号釜(&1)"
End
Begin VB.Menu M_gylc2
Caption = "二号釜(&2)"
End
Begin VB.Menu m_gylc3
Caption = "三号釜(&3)"
End
End
Begin VB.Menu m_yccl
Caption = "异常处理(&A)"
Begin VB.Menu m_fyf1pause
Caption = "一号釜暂停"
End
Begin VB.Menu mnuGoOn1
Caption = "一号釜继续"
End
Begin VB.Menu m_fyf1stop
Caption = "一号釜停止"
End
Begin VB.Menu mnuAbnormalResume1
Caption = "一号釜恢复"
End
Begin VB.Menu m_2
Caption = "-"
End
Begin VB.Menu m_fyf2pause
Caption = "二号釜暂停"
End
Begin VB.Menu mnuGoOn2
Caption = "二号釜继续"
End
Begin VB.Menu m_fyf2stop
Caption = "二号釜停止"
End
Begin VB.Menu mnuAbnormalResume2
Caption = "二号釜恢复"
End
Begin VB.Menu m_3
Caption = "-"
End
Begin VB.Menu m_fyf3pause
Caption = "三号釜暂停"
End
Begin VB.Menu mnuGoOn3
Caption = "三号釜继续"
End
Begin VB.Menu m_fyf3stop
Caption = "三号釜停止"
End
Begin VB.Menu mnuAbnormalResume3
Caption = "三号釜恢复"
End
End
Begin VB.Menu m_lsjl
Caption = "历史记录(&R)"
Begin VB.Menu m_lsjl1
Caption = "一号釜批次记录 (&1)"
End
Begin VB.Menu m_lxlsjl1
Caption = "一号釜连续记录 (&2)"
End
Begin VB.Menu M_4
Caption = "-"
End
Begin VB.Menu m_lsjl2
Caption = "二号釜批次记录 (&3)"
End
Begin VB.Menu m_lxsljl2
Caption = "二号釜连续记录 (&4)"
End
Begin VB.Menu m_5
Caption = "-"
End
Begin VB.Menu m_lsjl3
Caption = "三号釜批次记录 (&5)"
End
Begin VB.Menu m_lxlsjl3
Caption = "三号釜连续记录 (&6)"
End
End
Begin VB.Menu mnuReadData
Caption = "读取数据"
Visible = 0 'False
End
Begin VB.Menu m_exit
Caption = "帮助(&H)"
Begin VB.Menu mnuExitAbout
Caption = "关于本软件"
End
Begin VB.Menu mnuHelp
Caption = "帮助"
Shortcut = {F1}
End
End
End
Attribute VB_Name = "mainfrm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
'*********************************
'声明类clsInputData的实例
'*********************************
Public fyf1_fyfWenDu As New clsInputData
Attribute fyf1_fyfWenDu.VB_VarHelpID = -1
Public fyf1_jlgYeWei As New clsInputData
Attribute fyf1_jlgYeWei.VB_VarHelpID = -1
Public fyf1_tlfKaiDu As New clsInputData
Attribute fyf1_tlfKaiDu.VB_VarHelpID = -1
Public fyf2_fyfWenDu As New clsInputData
Attribute fyf2_fyfWenDu.VB_VarHelpID = -1
Public fyf2_jlgYeWei As New clsInputData
Attribute fyf2_jlgYeWei.VB_VarHelpID = -1
Public fyf2_tlfKaiDu As New clsInputData
Attribute fyf2_tlfKaiDu.VB_VarHelpID = -1
Public fyf3_fyfWenDu As New clsInputData
Attribute fyf3_fyfWenDu.VB_VarHelpID = -1
Public fyf3_jlgYeWei As New clsInputData
Attribute fyf3_jlgYeWei.VB_VarHelpID = -1
Public fyf3_tlfKaiDu As New clsInputData
Attribute fyf3_tlfKaiDu.VB_VarHelpID = -1
Public fyf_lqysWenDu As New clsInputData
Public WithEvents fyf1_Control As module_control
Attribute fyf1_Control.VB_VarHelpID = -1
Public WithEvents fyf2_Control As module_control
Attribute fyf2_Control.VB_VarHelpID = -1
Public WithEvents fyf3_Control As module_control
Attribute fyf3_Control.VB_VarHelpID = -1
'*******************
'模块级局部变量
'*******************
Private i, Numfyf1, Numfyf2, Numfyf3 As Integer
Private N As Single
Private mfyf1WenDu(1) As Single
Private mfyf2WenDu(1) As Single
Private mfyf3WenDu(1) As Single
Private myjaLiuLiang(1 To 3), mjlgYeWei(1 To 3) As Single
Private mfyfWenDuForXieLv(1 To 3, 0 To 5) As Single
Private mUsedForLiuLiang(1 To 3, 0 To 9) As Single
Private mYeWeiToLiuLiang(1 To 3) As Single
Private Sub fyf1_Control_yjaNotEnoughAlarm()
Call Inform(11)
zkhmfrm.Command2(0).Enabled = False
End Sub
Private Sub fyf2_Control_yjaNotEnoughAlarm()
Call Inform(11)
zkhmfrm.Command2(1).Enabled = False
End Sub
Private Sub fyf3_Control_yjaNotEnoughAlarm()
Call Inform(11)
zkhmfrm.Command2(2).Enabled = False
End Sub
Private Sub mnuAbnormalResume1_Click()
With frmPassword
.EventChar = "resume1"
.Show vbModal
End With
End Sub
Private Sub mnuAbnormalResume2_Click()
With frmPassword
.EventChar = "resume2"
.Show vbModal
End With
End Sub
Private Sub mnuAbnormalResume3_Click()
With frmPassword
.EventChar = "resume3"
.Show vbModal
End With
End Sub
Private Sub mnuDbManage_Click()
With frmDBManage
.Show
.SetFocus
End With
End Sub
Private Sub mnufyf1Auto_Click()
If fyf1_Control.WorkState Then tmrControl(0).Enabled = True
fyf1_Control.tlfaKaiDu = gsngManualToAutoKaiDu(1)
With zkhmfrm
.Text1(0).Locked = True
.Text1(0).BackColor = &H80000000
End With
gblnIsAuto(1) = True
End Sub
Private Sub mnufyf1Manual_Click()
tmrControl(0).Enabled = False
gblnIsAuto(1) = False
With zkhmfrm.Text1(0)
.Locked = False
.BackColor = &H80000005
.Text = CStr(fyf1_Control.tlfaKaiDu)
End With
End Sub
Private Sub mnufyf2Auto_Click()
If fyf2_Control.WorkState Then tmrControl(1).Enabled = True
fyf2_Control.tlfaKaiDu = gsngManualToAutoKaiDu(2)
With zkhmfrm
.Text1(1).Locked = True
.Text1(1).BackColor = &H80000000
End With
gblnIsAuto(2) = True
End Sub
Private Sub mnufyf2Manual_Click()
tmrControl(1).Enabled = False
With zkhmfrm
.Text1(1).Locked = False
.Text1(1).BackColor = &H80000005
End With
zkhmfrm.Text1(1).Text = CStr(fyf2_Control.tlfaKaiDu)
gblnIsAuto(2) = False
End Sub
Private Sub mnufyf3Auto_Click()
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -