Public NotInheritable Class frmAbout

    Private Sub AboutBox1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        ' Legen Sie den Titel des Formulars fest.
        Dim ApplicationTitle As String
        If My.Application.Info.Title <> "" Then
            ApplicationTitle = My.Application.Info.Title
        Else
            ApplicationTitle = System.IO.Path.GetFileNameWithoutExtension(My.Application.Info.AssemblyName)
        End If
        Me.Text = String.Format("Information about: {0}", ApplicationTitle)
        'Initialisieren Sie den gesamten Text, der im Infofeld angezeigt wird.
        'TODO: Die Assemblyinformationen der Anwendung im Bereich "Anwendung" des Dialogfelds für die 
        'Projekteigenschaften (im Menü "Projekt") anpassen.
        lblProduktname.Text = My.Application.Info.ProductName
        Me.lblVersion.Text = String.Format("Version {0}", My.Application.Info.Version.ToString)
        Me.lblCompanyName.Text = My.Application.Info.CompanyName
        ' Me.txtDescription.Text = My.Application.Info.Description
        Dim version = MYDB_ECM.GetScalarValue("SELECT PRODUCT_VERSION FROM TBDD_MODULES WHERE UPPER(NAME) = UPPER('Record-Organizer')")
        If Not IsNothing(version) Then
            Me.lbldatabase.Text = String.Format("Database-Version: {0}", version.ToString)
        Else
            Me.lbldatabase.Text = "Could not read database-version"
        End If

    End Sub
    Private Sub OKButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OKButton.Click
        Me.Close()
    End Sub
    Private Sub LinkLabel1_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles LinkLabel1.LinkClicked
        System.Diagnostics.Process.Start("https://www.digitaldata.works")
        LinkLabel1.LinkVisited = True
    End Sub
    Private Sub LinkLabel2_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles LinkLabel2.LinkClicked
        System.Diagnostics.Process.Start("https://www.digitaldata.de/support")
        LinkLabel2.LinkVisited = True
    End Sub

    Private Sub Label2_Click(sender As Object, e As EventArgs) Handles lbldatabase.Click

    End Sub

    Private Sub LinkLabel3_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles LinkLabel3.LinkClicked
        Dim _filename = Application.StartupPath & "\ChangeLog.txt"
        If System.IO.File.Exists(_filename) Then
            System.Diagnostics.Process.Start(_filename)
            LinkLabel3.LinkVisited = True
        Else
            MsgBox("Could not find the changelog file!", MsgBoxStyle.Exclamation)
        End If

    End Sub
End Class
