Projektdateien hinzufügen.
This commit is contained in:
58
Aviso/frmNotify.vb
Normal file
58
Aviso/frmNotify.vb
Normal file
@@ -0,0 +1,58 @@
|
||||
Public Class frmNotify
|
||||
Public Y As Integer = 0
|
||||
Public AvisoID As Integer = 0
|
||||
|
||||
Sub New(title As String, text As String)
|
||||
Me.InitializeComponent()
|
||||
Me.lblTitle.Text = title
|
||||
Me.lblText.Text = text
|
||||
End Sub
|
||||
|
||||
Sub New(typ As Integer, text As String, id As Integer)
|
||||
Me.InitializeComponent()
|
||||
Me.AvisoID = id
|
||||
Select Case typ
|
||||
Case 1
|
||||
Me.lblTitle.Text = "LKW Standzeit Benachrichtigung"
|
||||
Me.lblText.Text = "Der LKW '" & text & "' ist vor über 2 Stunden eingetroffen."
|
||||
Case 2
|
||||
Me.lblTitle.Text = "LKW Standzeit - Vermerk eintragen"
|
||||
Me.lblText.Text = "Der LKW '" & text & "' ist vor über 2 Stunden eingetroffen." &
|
||||
"Bitte VERMERK eintragen!"
|
||||
Case 3
|
||||
Me.lblTitle.Text = "LKW Standzeit Benachrichtigung"
|
||||
Me.lblText.Text = "Der LKW '" & text & "' steht bereits über 24 Stunden!"
|
||||
Me.Header.BackColor = Color.Red
|
||||
End Select
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Timer_Tick(sender As Object, e As EventArgs) Handles Timer.Tick
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
Private Sub btnClose_Click(sender As Object, e As EventArgs) Handles btnClose.Click
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
Private Sub frmNotify_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
lblText.Cursor = IIf(AvisoID > 0, Cursors.Hand, Cursors.Default)
|
||||
'If Y = 0 Then
|
||||
'Me.Location = New Point(Me.Owner.Width - Me.Width - 10, Me.Owner.Height - Me.Height - 10)
|
||||
' Else
|
||||
' Me.Location = New Point(Me.Owner.Width - Me.Width - 10, Y)
|
||||
' End If
|
||||
Dim WIDTH = Screen.FromRectangle(Me.Bounds).WorkingArea.Size.Width
|
||||
Dim hEIGHT = Screen.FromRectangle(Me.Bounds).WorkingArea.Size.Width
|
||||
If Y = 0 Then
|
||||
Me.Location = New Point(WIDTH - Me.Width - 10, hEIGHT - Me.Height - 10)
|
||||
Else
|
||||
Me.Location = New Point(WIDTH - Me.Width - 10, Y)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub lblText_Click(sender As Object, e As EventArgs) Handles lblText.Click
|
||||
frmHauptfenster.Details_anzeigen(AvisoID)
|
||||
Me.Close()
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user