Improve Config

This commit is contained in:
Jonathan Jenne
2019-02-14 15:15:42 +01:00
parent 914ba9dc90
commit 191b3010bb
6 changed files with 68 additions and 33 deletions

View File

@@ -13,6 +13,8 @@ Public Class frmConfigUser
Private Sub frmUserBasics_Load(sender As Object, e As EventArgs) Handles Me.Load
_Logger = My.LogConfig.GetLogger()
chkLogErrorsOnly.Checked = Not My.Config.LogDebug
End Sub
Private Sub btnLogFolder_Click(sender As Object, e As EventArgs) Handles btnLogFolder.Click
@@ -23,8 +25,10 @@ Public Class frmConfigUser
Process.Start(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData))
End Sub
Private Sub SimpleButton1_Click(sender As Object, e As EventArgs) Handles SimpleButton1.Click
Dim config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.PerUserRoamingAndLocal)
MessageBox.Show(config.FilePath)
Private Sub chkLogErrorsOnly_CheckedChanged(sender As Object, e As EventArgs) Handles chkLogErrorsOnly.CheckedChanged
Dim oLogDebug = Not chkLogErrorsOnly.Checked
My.LogConfig.Debug = oLogDebug
My.Config.LogDebug = oLogDebug
My.ConfigManager.Save()
End Sub
End Class