277 lines
9.0 KiB
Plaintext
277 lines
9.0 KiB
Plaintext
VERSION 5.00
|
|
Begin VB.Form frmImpulswertigkeitEinbauplatz
|
|
Caption = "Impulswertigkeiten der Einbauplätze"
|
|
ClientHeight = 6255
|
|
ClientLeft = 60
|
|
ClientTop = 345
|
|
ClientWidth = 5580
|
|
LinkTopic = "Form2"
|
|
ScaleHeight = 6255
|
|
ScaleWidth = 5580
|
|
StartUpPosition = 3 'Windows-Standard
|
|
Begin VB.CommandButton cmdReset
|
|
Caption = "Reset"
|
|
Height = 465
|
|
Left = 90
|
|
TabIndex = 5
|
|
Top = 5760
|
|
Width = 645
|
|
End
|
|
Begin VB.CommandButton cmdCancel
|
|
Caption = "Abbrechen"
|
|
Height = 465
|
|
Left = 1950
|
|
TabIndex = 4
|
|
Top = 5730
|
|
Width = 1095
|
|
End
|
|
Begin VB.CommandButton cmdOk
|
|
Caption = "OK"
|
|
Height = 465
|
|
Left = 810
|
|
TabIndex = 3
|
|
Top = 5730
|
|
Width = 1065
|
|
End
|
|
Begin VB.Frame FrameEinbauplatz
|
|
Height = 765
|
|
Index = 0
|
|
Left = 0
|
|
TabIndex = 0
|
|
Top = 330
|
|
Visible = 0 'False
|
|
Width = 5565
|
|
Begin VB.TextBox txtImpulswertigkeitLwl
|
|
Alignment = 1 'Rechts
|
|
BeginProperty Font
|
|
Name = "MS Sans Serif"
|
|
Size = 13.5
|
|
Charset = 0
|
|
Weight = 400
|
|
Underline = 0 'False
|
|
Italic = 0 'False
|
|
Strikethrough = 0 'False
|
|
EndProperty
|
|
Height = 480
|
|
Index = 0
|
|
Left = 3180
|
|
TabIndex = 6
|
|
Top = 180
|
|
Width = 1035
|
|
End
|
|
Begin VB.TextBox txtImpulswertigkeit
|
|
Alignment = 1 'Rechts
|
|
BeginProperty Font
|
|
Name = "MS Sans Serif"
|
|
Size = 13.5
|
|
Charset = 0
|
|
Weight = 400
|
|
Underline = 0 'False
|
|
Italic = 0 'False
|
|
Strikethrough = 0 'False
|
|
EndProperty
|
|
Height = 480
|
|
Index = 0
|
|
Left = 1320
|
|
TabIndex = 1
|
|
Top = 150
|
|
Width = 1035
|
|
End
|
|
Begin VB.Label lblEinbauplatzNr
|
|
Caption = "XX"
|
|
BeginProperty Font
|
|
Name = "MS Sans Serif"
|
|
Size = 12
|
|
Charset = 0
|
|
Weight = 700
|
|
Underline = 0 'False
|
|
Italic = 0 'False
|
|
Strikethrough = 0 'False
|
|
EndProperty
|
|
Height = 345
|
|
Index = 0
|
|
Left = 360
|
|
TabIndex = 2
|
|
Top = 240
|
|
Width = 405
|
|
End
|
|
End
|
|
Begin VB.Label LabelHeader
|
|
Caption = "Opto Kopf Lichtwellenleiter"
|
|
BeginProperty Font
|
|
Name = "MS Sans Serif"
|
|
Size = 12
|
|
Charset = 0
|
|
Weight = 400
|
|
Underline = 0 'False
|
|
Italic = 0 'False
|
|
Strikethrough = 0 'False
|
|
EndProperty
|
|
Height = 315
|
|
Left = 1290
|
|
TabIndex = 7
|
|
Top = 0
|
|
Width = 4155
|
|
End
|
|
End
|
|
Attribute VB_Name = "frmImpulswertigkeitEinbauplatz"
|
|
Attribute VB_GlobalNameSpace = False
|
|
Attribute VB_Creatable = False
|
|
Attribute VB_PredeclaredId = True
|
|
Attribute VB_Exposed = False
|
|
Option Explicit
|
|
|
|
Public m_colEinbauplatz As Collection
|
|
Private m_intErsterEinbauplatz As Integer
|
|
|
|
|
|
Private Sub cmdCancel_Click()
|
|
Unload Me
|
|
End Sub
|
|
|
|
Private Sub cmdOK_Click()
|
|
Dim Einbauplatz As CEinbauplatz
|
|
Dim Pruefzaehler As CPruefzaehler
|
|
Dim EinbauplatzNr As Integer
|
|
|
|
For Each Einbauplatz In m_colEinbauplatz
|
|
EinbauplatzNr = Einbauplatz.getNr
|
|
Set Pruefzaehler = Einbauplatz.getPruefzaehler
|
|
If Not Pruefzaehler Is Nothing Then
|
|
Einbauplatz.m_ImpulseQM = Val(txtImpulswertigkeit(EinbauplatzNr))
|
|
Einbauplatz.m_ImpulseLwl = Val(txtImpulswertigkeitLwl(EinbauplatzNr))
|
|
End If
|
|
Next
|
|
|
|
Unload Me
|
|
End Sub
|
|
|
|
|
|
|
|
Private Sub cmdReset_Click()
|
|
Dim EinbauplatzNr As Integer
|
|
Dim Einbauplatz As CEinbauplatz
|
|
Dim Pruefzaehler As CPruefzaehler
|
|
|
|
For Each Einbauplatz In m_colEinbauplatz
|
|
EinbauplatzNr = Einbauplatz.getNr
|
|
Set Pruefzaehler = Einbauplatz.getPruefzaehler
|
|
If Not Pruefzaehler Is Nothing Then
|
|
txtImpulswertigkeit(EinbauplatzNr) = Pruefzaehler.GetImpulseQM
|
|
txtImpulswertigkeitLwl(EinbauplatzNr) = Pruefzaehler.GetImpulseLwl
|
|
End If
|
|
Next
|
|
End Sub
|
|
|
|
Private Sub Form_Activate()
|
|
cmdCancel.Default = True
|
|
If m_intErsterEinbauplatz > 0 Then
|
|
If txtImpulswertigkeit(m_intErsterEinbauplatz).Enabled Then
|
|
txtImpulswertigkeit(m_intErsterEinbauplatz).SetFocus
|
|
Else
|
|
If txtImpulswertigkeitLwl(m_intErsterEinbauplatz).Enabled Then
|
|
txtImpulswertigkeitLwl(m_intErsterEinbauplatz).SetFocus
|
|
End If
|
|
End If
|
|
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub Form_Load()
|
|
Dim EinbauplatzNr As Integer
|
|
Dim lngUntererRand As Long
|
|
Dim lngTempImpulse As Long
|
|
|
|
Dim Einbauplatz As CEinbauplatz
|
|
Dim Pruefzaehler As CPruefzaehler
|
|
|
|
For Each Einbauplatz In m_colEinbauplatz
|
|
EinbauplatzNr = Einbauplatz.getNr
|
|
Set Pruefzaehler = Einbauplatz.getPruefzaehler
|
|
|
|
|
|
load FrameEinbauplatz(EinbauplatzNr)
|
|
load txtImpulswertigkeit(EinbauplatzNr)
|
|
load lblEinbauplatzNr(EinbauplatzNr)
|
|
load txtImpulswertigkeitLwl(EinbauplatzNr)
|
|
|
|
Set lblEinbauplatzNr(EinbauplatzNr).Container = FrameEinbauplatz(EinbauplatzNr)
|
|
Set txtImpulswertigkeit(EinbauplatzNr).Container = FrameEinbauplatz(EinbauplatzNr)
|
|
Set txtImpulswertigkeitLwl(EinbauplatzNr).Container = FrameEinbauplatz(EinbauplatzNr)
|
|
|
|
If g_blnLWLfuerallePruefpunkte Then
|
|
txtImpulswertigkeit(EinbauplatzNr).Enabled = False
|
|
End If
|
|
|
|
FrameEinbauplatz(EinbauplatzNr).Visible = True
|
|
lblEinbauplatzNr(EinbauplatzNr).Visible = True
|
|
lblEinbauplatzNr(EinbauplatzNr).Caption = EinbauplatzNr
|
|
|
|
If Not Pruefzaehler Is Nothing Then
|
|
txtImpulswertigkeit(EinbauplatzNr).Visible = True
|
|
txtImpulswertigkeitLwl(EinbauplatzNr).Visible = True
|
|
If m_intErsterEinbauplatz = 0 Then
|
|
m_intErsterEinbauplatz = EinbauplatzNr
|
|
End If
|
|
|
|
If Einbauplatz.m_ImpulseQM = 0 Then
|
|
txtImpulswertigkeit(EinbauplatzNr).Text = Einbauplatz.getPruefzaehler.GetImpulseQM
|
|
Else
|
|
txtImpulswertigkeit(EinbauplatzNr).Text = Einbauplatz.m_ImpulseQM
|
|
End If
|
|
|
|
If Einbauplatz.m_ImpulseLwl = 0 Then
|
|
' Impulswertigkeit unbekannt?
|
|
lngTempImpulse = 0
|
|
' aus LWL_Pruefzeiten
|
|
'Einbauplatz.getPruefzaehler.loadForSerienNr (Einbauplatz.getPruefzaehler.getSerienNr)
|
|
|
|
lngTempImpulse = Einbauplatz.getPruefzaehler.m_lng_LWLImpulswertigkeit
|
|
If lngTempImpulse = 0 Then
|
|
' aus IdentNrZaehlwerk
|
|
lngTempImpulse = Einbauplatz.getPruefzaehler.GetImpulseLwl
|
|
End If
|
|
txtImpulswertigkeitLwl(EinbauplatzNr).Text = lngTempImpulse
|
|
Else
|
|
txtImpulswertigkeitLwl(EinbauplatzNr).Text = Einbauplatz.m_ImpulseLwl
|
|
End If
|
|
End If
|
|
|
|
If EinbauplatzNr > 1 Then
|
|
FrameEinbauplatz(EinbauplatzNr).Top = FrameEinbauplatz(EinbauplatzNr - 1).Top + FrameEinbauplatz(EinbauplatzNr - 1).Height + 10
|
|
lngUntererRand = FrameEinbauplatz(EinbauplatzNr).Top + FrameEinbauplatz(EinbauplatzNr).Height
|
|
Else
|
|
FrameEinbauplatz(EinbauplatzNr).Top = LabelHeader.Top + LabelHeader.Height
|
|
End If
|
|
Next
|
|
|
|
cmdOK.Top = lngUntererRand + 50
|
|
cmdCancel.Top = cmdOK.Top
|
|
cmdReset.Top = cmdOK.Top
|
|
Me.Height = cmdOK.Top + cmdOK.Height * 2
|
|
|
|
cmdOK.Enabled = False
|
|
cmdCancel.Default = True
|
|
End Sub
|
|
|
|
Private Sub txtImpulswertigkeit_Change(Index As Integer)
|
|
cmdOK.Enabled = True
|
|
cmdOK.Default = True
|
|
End Sub
|
|
|
|
Private Sub txtImpulswertigkeitLwl_Change(Index As Integer)
|
|
cmdOK.Enabled = True
|
|
cmdOK.Default = True
|
|
End Sub
|
|
|
|
Private Sub txtImpulswertigkeit_GotFocus(Index As Integer)
|
|
txtImpulswertigkeit(Index).SelStart = 0
|
|
txtImpulswertigkeit(Index).SelLength = Len(txtImpulswertigkeit(Index).Text)
|
|
End Sub
|
|
|
|
Private Sub txtImpulswertigkeitLwl_GotFocus(Index As Integer)
|
|
txtImpulswertigkeitLwl(Index).SelStart = 0
|
|
txtImpulswertigkeitLwl(Index).SelLength = Len(txtImpulswertigkeitLwl(Index).Text)
|
|
End Sub
|
|
|