|
|
|
@ -55,8 +55,17 @@ Public Class frmMain
|
|
|
|
|
Me.DataGridView1.RowsDefaultCellStyle.BackColor = Color.Azure
|
|
|
|
|
Me.DataGridView1.AlternatingRowsDefaultCellStyle.BackColor = Color.Beige
|
|
|
|
|
|
|
|
|
|
Dim Info As UpdateCheckInfo
|
|
|
|
|
If ApplicationDeployment.IsNetworkDeployed Then
|
|
|
|
|
statusVersionLabel.Text = "Version " & ApplicationDeployment.CurrentDeployment.CurrentVersion.ToString & " (" & ApplicationDeployment.CurrentDeployment.UpdatedVersion.ToString & ")"
|
|
|
|
|
Dim AD As ApplicationDeployment = ApplicationDeployment.CurrentDeployment
|
|
|
|
|
|
|
|
|
|
Info = AD.CheckForDetailedUpdate
|
|
|
|
|
If Info.UpdateAvailable Then
|
|
|
|
|
statusVersionLabel.Text = "Version " & AD.CurrentVersion.ToString & " (Update verfügbar: " & Info.AvailableVersion.ToString & ")"
|
|
|
|
|
statusVersionLabel.Tag = "update"
|
|
|
|
|
Else
|
|
|
|
|
statusVersionLabel.Text = "Version " & AD.CurrentVersion.ToString
|
|
|
|
|
End If
|
|
|
|
|
Else
|
|
|
|
|
statusVersionLabel.Text = "Lokale Version: " & My.Application.Info.Version.ToString
|
|
|
|
|
End If
|
|
|
|
@ -81,14 +90,18 @@ Public Class frmMain
|
|
|
|
|
|
|
|
|
|
Info = AD.CheckForDetailedUpdate
|
|
|
|
|
If Info.UpdateAvailable Then
|
|
|
|
|
statusVersionLabel.Text = "Version " & AD.CurrentVersion.ToString & " (Update verfügbar: " & Info.AvailableVersion.ToString & ")"
|
|
|
|
|
statusVersionLabel.Tag = "update"
|
|
|
|
|
If MsgBox("Ein Update ist verfügbar und wird jetzt installiert." + Chr(13) + "Die Anwendung wird danach neu gestartet.", vbOKCancel) = vbOK Then
|
|
|
|
|
AD.Update()
|
|
|
|
|
System.Windows.Forms.Application.Restart()
|
|
|
|
|
End If
|
|
|
|
|
Else
|
|
|
|
|
statusVersionLabel.Text = "Version " & AD.CurrentVersion.ToString
|
|
|
|
|
MsgBox("Es ist kein Update verfügbar.")
|
|
|
|
|
End If
|
|
|
|
|
Else
|
|
|
|
|
statusVersionLabel.Text = "Lokale Version: " & My.Application.Info.Version.ToString
|
|
|
|
|
MsgBox("Die Anwendung wurde nicht aus dem Internet bezogen und kann daher nicht aktualisiert werden.")
|
|
|
|
|
End If
|
|
|
|
|
End Sub
|
|
|
|
@ -195,4 +208,10 @@ Public Class frmMain
|
|
|
|
|
mnuContext.Show(Cursor.Position)
|
|
|
|
|
End If
|
|
|
|
|
End Sub
|
|
|
|
|
|
|
|
|
|
Private Sub statusVersionLabel_Click(sender As Object, e As EventArgs) Handles statusVersionLabel.Click
|
|
|
|
|
If statusVersionLabel.Tag = "update" Then
|
|
|
|
|
UpdateToolStripMenuItem_Click(statusVersionLabel, Nothing)
|
|
|
|
|
End If
|
|
|
|
|
End Sub
|
|
|
|
|
End Class
|
|
|
|
|