You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

276 lines
9.7 KiB
Plaintext

VERSION 5.00
Object = "{2F815EB6-3A15-4C5D-ADB0-464DACCBB1BB}#1.0#0"; "VisiWinStudio.ocx"
Object = "{D932DE9C-9BD8-4B1F-9BAE-43326F307149}#1.0#0"; "VWSAlarm.ocx"
Object = "{C1B43C67-D439-11D5-8A98-0050BAB20053}#2.3#0"; "VWSFrame.ocx"
Object = "{08A903C4-400D-4A2C-9D1A-5E7018B95609}#1.0#0"; "VWSLanguage.ocx"
Begin VB.Form FAlarmNotes
BorderStyle = 0 'Kein
ClientHeight = 11520
ClientLeft = 0
ClientTop = 0
ClientWidth = 15360
ClipControls = 0 'False
Icon = "FAlarmNotes.frx":0000
ScaleHeight = 11520
ScaleWidth = 15360
StartUpPosition = 2 'Bildschirmmitte
Begin VWSFrameLib.VWSFrame fraNote
Height = 915
Left = 2040
TabIndex = 3
Top = 6660
Width = 6975
_ExtentX = 12303
_ExtentY = 1614
Caption = "fraNote"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
IndexGroup = "FAlarmNotes"
Begin VB.TextBox txtNote
BackColor = &H8000000F&
Enabled = 0 'False
Height = 375
Left = 180
TabIndex = 4
Top = 360
Width = 5235
End
Begin VisiWinStudioLib.VWSKey keyAddNote
Height = 375
Left = 5460
TabIndex = 5
Top = 360
Width = 1395
_cx = 2461
_cy = 661
VWItem = ""
VWItemMonitor = ""
Blink = 0
BitMonitor = 0
CaptionMonitorOn= ""
PictureMonitorOn= "FAlarmNotes.frx":000C
ForeColorMonitorOn= -2147483630
BackColorMonitorOn= -2147483633
IndexGroup = ""
AuthorizationMode= 0
Authorization = ""
FontClass = ""
RecipeMember = 0 'False
SetMode = 0
BitNumber = 0
Enabled = 0 'False
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BackColor = -2147483633
ForeColor = -2147483630
BorderColor2D = -2147483630
BackStyle = 1
ButtonStyle = 1
Alignment = 7
FocusRect = -1 'True
Picture = "FAlarmNotes.frx":0028
PictureDown = "FAlarmNotes.frx":0044
PictureDisabled = "FAlarmNotes.frx":0060
PictureAlign = 7
AutoSize = -1 'True
EatsCursorKeys = 0 'False
GlobalHotKey = 0 'False
FocusOnClick = -1 'True
EventOnKeyRepeat= 0 'False
Caption = "Hinzuf<75>gen"
UseMnemonic = 0 'False
Key = 0
DownWhenDisabled= 0 'False
End
End
Begin VWSAlarmDemo.XHeader XHeader1
Height = 1020
Left = 0
TabIndex = 0
Top = 0
Width = 15360
_ExtentX = 27093
_ExtentY = 873
Caption = "idxCaption"
IndexGroup = "FAlarmNotes"
End
Begin VWSAlarmDemo.XFooter XFooter1
Height = 840
Left = 0
TabIndex = 1
Top = 10680
Width = 15360
_ExtentX = 27093
_ExtentY = 4048
End
Begin VWSAlarmDemo.XAlarm XAlarm1
Height = 1395
Left = 0
TabIndex = 2
Top = 9240
Width = 15360
_ExtentX = 27093
_ExtentY = 2461
End
Begin VWSAlarmLib.VWSAlarmList VWSAlarmList1
Height = 4755
Left = 2040
TabIndex = 6
Top = 1680
Width = 11475
_cx = 20241
_cy = 8387
BackColor = -2147483633
Enabled = -1 'True
ScrollBar = 1
ColumnWidth = "130;100;54;50;400"
Grid = 1
TextStyle = 1
m_nWidth = 130
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
DisplayFormat = "TG2PX"
FormatTime = "@LongTime"
FormatDate = "@LongDate"
TimeMode = 2
Sort = 3
Blink = 0
KeyAck = 0
KeyDown = 0
KeyUp = 0
StateIcons = -1 'True
StateColoring = -1 'True
AllowAck = -1 'True
PriorityMax = -1
PriorityMin = -1
TextInEvent = -1 'True
AlarmGroups = ""
AlarmClasses = ""
HeaderStyle = 0
AllowHeaderSort = 0 'False
States = "0000"
BackColorSelected= 12582912
ForeColorSelected= 16777215
FontClass = ""
AlarmDisplayMode= 0
AuthorizationMode= 1
Authorization = ""
End
Begin VWSLanguageLib.VWSIndex idxWhatToDo
Height = 495
Left = 0
Top = 1080
Width = 15360
_cx = 27093
_cy = 873
BackStyle = 1
Enabled = -1 'True
Alignment = 7
ShadowColor1 = -2147483632
ShadowColor2 = -2147483634
ShadowDepth = 2
ShadowStyle = 0
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BackColorOff = -2147483633
BackColorOn = -2147483643
ForeColorOff = -2147483630
ForeColorOn = -2147483640
TextRotation = 0
AuthorizationMode= 1
Authorization = ""
VWItem = ""
Blink = 0
IndexGroup = "FAlarmNotes"
IndexPrefix = ""
BitNumber = 0
Mode = -1
Offset = 0
Range = 1
FontClass = ""
OffsetText = 0
TextOn = ""
TextOff = "idxWhatToDo"
End
End
Attribute VB_Name = "FAlarmNotes"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub keyAddNote_Click()
Dim VWSHistoricalAlarmNotes As New VWCOMMONLib.VWSHistoricalAlarmNotes
Dim VWSHistoricalAlarms As New VWCOMMONLib.VWSHistoricalAlarms
Dim VWSAlarmFilter As New VWCOMMONLib.VWSAlarmFilter
Dim VWSAlarmItem As VWCOMMONLib.VWSAlarmItem
Dim VWSAlarmItem2 As VWCOMMONLib.VWSAlarmItem
Dim VWSAlarmClass As New VWCOMMONLib.VWSAlarmClass
Dim VWSAlarmGroup As New VWCOMMONLib.VWSAlarmGroup
Dim sFile As String, l As Long, vHistoricalID As Variant
sFile = VWSHistoricalAlarms.GetCurrentFile
Set VWSAlarmItem = VWSAlarmList1.GetItemData(-1)
VWSAlarmClass.ClassID = VWSAlarmItem.ClassID
VWSAlarmFilter.ClassFilter = VWSAlarmClass.ClassName
VWSAlarmGroup.GroupID = VWSAlarmItem.GroupID
VWSAlarmFilter.GroupFilter = VWSAlarmGroup.GroupName
VWSAlarmFilter.Historical = True
VWSAlarmFilter.HistoricalFile = sFile
VWSAlarmFilter.States = 1
VWSAlarmFilter.MaxPriority = VWSAlarmItem.Priority
VWSAlarmFilter.MinPriority = VWSAlarmItem.Priority
VWSAlarmFilter.MaxTime = VWSAlarmItem.ActivationTime + 0.000005
VWSAlarmFilter.MinTime = VWSAlarmItem.ActivationTime - 0.000005
VWSHistoricalAlarms.GetHistoricalAlarms VWSAlarmFilter, False
For l = 1 To VWSHistoricalAlarms.AlarmsInEnum
Set VWSAlarmItem2 = VWSHistoricalAlarms.GetNext(, vHistoricalID)
If VWSAlarmItem.AlarmID = VWSAlarmItem2.AlarmID Then
VWSHistoricalAlarmNotes.AddAlarmNote sFile, vHistoricalID, Now, txtNote.Text
txtNote.Text = ""
End If
Next l
End Sub
Private Sub VWSAlarmList1_SelectChange(ByVal ID As Long, ByVal Text As String, ByVal Group As String, ByVal State As Integer, ByVal TimeIn As Date, ByVal TimePLCAck As Date, ByVal TimeUserAck As Date, ByVal Priority As Long, ByVal Param1 As String, ByVal Param2 As Long)
txtNote.Enabled = True
txtNote.BackColor = vbWindowBackground
keyAddNote.EnabledControl = True
End Sub
Private Sub VWSAlarmList1_SelectQuit()
txtNote.Enabled = False
txtNote.BackColor = vb3DFace
keyAddNote.EnabledControl = False
End Sub