From 4c41571b169b3ec73c6238888309a634c3e011d4 Mon Sep 17 00:00:00 2001 From: chuongmep <31106432+chuongmep@users.noreply.github.com> Date: Mon, 29 Aug 2022 23:47:52 +0800 Subject: [PATCH] fix #34 --- AddInManager/ViewModel/LogControlViewModel.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/AddInManager/ViewModel/LogControlViewModel.cs b/AddInManager/ViewModel/LogControlViewModel.cs index 6cf02d4..0aa97de 100644 --- a/AddInManager/ViewModel/LogControlViewModel.cs +++ b/AddInManager/ViewModel/LogControlViewModel.cs @@ -83,8 +83,9 @@ public void UserControl_Unloaded(object sender, RoutedEventArgs e) public void LogFileWatcher(object sender, RoutedEventArgs e) { _startLineTotal = GetTotalLinesInFile(LongFileName, ref _lastFileSize); - if (_startLineTotal == 0) return; - try { _lastFileSize = _lastFileSize - (_lastFileSize / _startLineTotal * MAX_MESSGAES); } catch (Exception) { _lastFileSize = 0; } + // if (_startLineTotal == 0) return; + try { _lastFileSize = _lastFileSize - (_lastFileSize / _startLineTotal * MAX_MESSGAES); } + catch (Exception) { _lastFileSize = 0; } if (_lastFileSize < 0) _lastFileSize = 0; StopWatching = false; WatchLogFile(LongFileName);