Imports System.Configuration
Imports System.IO
Imports DigitalData.Modules.Logging
Public Class frmConfigUser
    Private _Logger As Logger

    Private Sub LinkLabel1_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles LinkLabel1.LinkClicked
        ' Specify that the link was visited.
        Me.LinkLabel1.LinkVisited = True
        ' Navigate to a URL.
        System.Diagnostics.Process.Start("http://www.didalog.de/Support")
    End Sub

    Private Sub frmUserBasics_Load(sender As Object, e As EventArgs) Handles Me.Load
        _Logger = My.LogConfig.GetLogger()

        chkLogErrorsOnly.Checked = Not My.SysConfig.LogDebug
    End Sub

    Private Sub btnLogFolder_Click(sender As Object, e As EventArgs) Handles btnLogFolder.Click
        Process.Start(My.LogConfig.LogDirectory)
    End Sub

    Private Sub btnAppFolder_Click(sender As Object, e As EventArgs) Handles btnAppFolder.Click
        Dim oAppData = Application.LocalUserAppDataPath
        Process.Start(oAppData)
    End Sub

    Private Sub chkLogErrorsOnly_CheckedChanged(sender As Object, e As EventArgs) Handles chkLogErrorsOnly.CheckedChanged
        Dim oLogDebug = Not chkLogErrorsOnly.Checked
        My.LogConfig.Debug = oLogDebug
        My.SysConfig.LogDebug = oLogDebug
        My.SystemConfigManager.Save()
    End Sub
End Class