Tempanzeige Serverräume
This commit is contained in:
@@ -44,7 +44,7 @@ Public Class Main
|
||||
Private Declare Function GetActiveWindow Lib "user32" Alias "GetActiveWindow" () As IntPtr
|
||||
|
||||
|
||||
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
Private Async Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
LblUhrzeit.Text = "Willkommen " & Class1.LoggedOnUser.Name
|
||||
Class1.ini.LoadParameters()
|
||||
SetAnsichtLautIni()
|
||||
@@ -78,6 +78,7 @@ Public Class Main
|
||||
.AlternatingRowsDefaultCellStyle.BackColor = ColorTranslator.FromHtml("#d7e4f2")
|
||||
End With
|
||||
End If
|
||||
Await AktualisiereTemperaturenAsync()
|
||||
|
||||
TypeFilter()
|
||||
|
||||
@@ -659,10 +660,8 @@ Public Class Main
|
||||
Return Userlist
|
||||
End Function
|
||||
|
||||
Private Sub CmdTest_Click(sender As Object, e As EventArgs) Handles CmdTest.Click
|
||||
Dim sync As New cSQLSync
|
||||
sync.Main()
|
||||
|
||||
Public Async Sub CmdTest_Click(sender As Object, e As EventArgs) Handles CmdTest.Click
|
||||
Await AktualisiereTemperaturenAsync()
|
||||
End Sub
|
||||
Private Sub CMdTest2_Click(sender As Object, e As EventArgs) Handles CMdTest2.Click
|
||||
Dim sync As New cSQL
|
||||
@@ -1319,8 +1318,25 @@ exit"
|
||||
|
||||
Private Sub TimerUpdate_Tick(sender As Object, e As EventArgs) Handles TimerUpdate.Tick
|
||||
If Class1.DebugMode = False Then CheckUpdate("Timer")
|
||||
Dim prtg As New cPRTG
|
||||
|
||||
End Sub
|
||||
|
||||
Public Async Function AktualisiereTemperaturenAsync() As Task
|
||||
Dim prtg As New cPRTG()
|
||||
|
||||
' Aufgaben parallel starten
|
||||
Dim task1 = prtg.getValuefromPRTG("8208", 9)
|
||||
Dim task2 = prtg.getValuefromPRTG("8223", 9)
|
||||
|
||||
' Ergebnisse abwarten
|
||||
Dim result1 = Await task1
|
||||
Dim result2 = Await task2
|
||||
|
||||
' GUI aktualisieren
|
||||
lblTempServerraum100.Text = "Temp. Serverraum 100: " & result1
|
||||
lblTempServerraum15.Text = "Temp. Serverraum 15: " & result2
|
||||
End Function
|
||||
|
||||
|
||||
Private Sub DgVMain_CellContentClick(sender As Object, e As DataGridViewCellEventArgs) Handles DgVMain.CellClick
|
||||
@@ -1824,6 +1840,10 @@ exit"
|
||||
Clipboard.SetText(DgVMain.CurrentRow.Cells("IPAdresse").Value)
|
||||
End Sub
|
||||
|
||||
Private Async Sub Timer_Temperatur_Tick(sender As Object, e As EventArgs) Handles Timer_Temperatur.Tick
|
||||
Await AktualisiereTemperaturenAsync()
|
||||
End Sub
|
||||
|
||||
Private Sub Main_Closed(sender As Object, e As EventArgs) Handles Me.Closed
|
||||
|
||||
Class1.ini.prop_Kompansicht = ChkKompAnsicht.Checked
|
||||
|
||||
Reference in New Issue
Block a user