Skip to content

Commit 11e2f03

Browse files
committed
Fix LogFile controls are disabled when the Create LogFile option is on.
Fix 'Create LogFile' option is on, but the option is not working when program is running.
1 parent 8ddab9d commit 11e2f03

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

WinNUT_V2/WinNUT-Client/Pref_Gui.vb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ Public Class Pref_Gui
183183
Next
184184
Next
185185
Btn_Apply.Enabled = False
186+
SetLogControlsStatus()
186187
IsShowed = True
187188
LogFile.LogTracing("Pref Gui Opened.", LogLvl.LOG_DEBUG, Me)
188189
Catch Except As Exception

WinNUT_V2/WinNUT-Client/WinNUT.vb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,14 @@ Public Class WinNUT
138138
StrLog.Insert(AppResxStr.STR_LOG_UPDATE, My.Resources.Log_Str_11)
139139
StrLog.Insert(AppResxStr.STR_LOG_NUT_FSD, My.Resources.Log_Str_12)
140140

141+
'Init Logger
142+
If My.Settings.LG_LogToFile Then
143+
LogFile.LogLevelValue = My.Settings.LG_LogLevel
144+
LogFile.InitializeLogFile()
145+
ElseIf LogFile.IsWritingToFile Then
146+
LogFile.DeleteLogFile()
147+
End If
148+
141149
'Init Systray
142150
NotifyIcon.Text = ProgramName & " - " & ShortProgramVersion
143151
NotifyIcon.Visible = False

0 commit comments

Comments
 (0)