diff --git a/Aga.Controls/Aga.Controls.csproj b/Aga.Controls/Aga.Controls.csproj index bc554cc..0000742 100644 --- a/Aga.Controls/Aga.Controls.csproj +++ b/Aga.Controls/Aga.Controls.csproj @@ -1,4 +1,7 @@ + + true + 9.0.30729 net472 @@ -118,4 +121,7 @@ + + + \ No newline at end of file diff --git a/LibreHardwareMonitor/LibreHardwareMonitor.csproj b/LibreHardwareMonitor/LibreHardwareMonitor.csproj index 535351b..1151f6c 100644 --- a/LibreHardwareMonitor/LibreHardwareMonitor.csproj +++ b/LibreHardwareMonitor/LibreHardwareMonitor.csproj @@ -1,4 +1,7 @@ + + true + WinExe net472 @@ -22,6 +25,7 @@ + diff --git a/LibreHardwareMonitor/UI/MainForm.cs b/LibreHardwareMonitor/UI/MainForm.cs index bc146ca..5416ad8 100644 --- a/LibreHardwareMonitor/UI/MainForm.cs +++ b/LibreHardwareMonitor/UI/MainForm.cs @@ -159,6 +159,10 @@ public sealed partial class MainForm : Form nodeTextBoxText.ToolTipProvider = tooltipProvider; nodeTextBoxValue.ToolTipProvider = tooltipProvider; _logger = new Logger(_computer); + var saved = _settings.GetValue("logger.fileRotation", 0); // 0 = PerSession, 1 = Daily. + _logger.FileRotationMethod = (LoggerFileRotation)Math.Max(0, Math.Min(saved, 1)); + perSessionFileRotationMenuItem.Checked = _logger.FileRotationMethod == LoggerFileRotation.PerSession; + dailyFileRotationMenuItem.Checked = _logger.FileRotationMethod == LoggerFileRotation.Daily; _computer.HardwareAdded += HardwareAdded; _computer.HardwareRemoved += HardwareRemoved; @@ -1341,6 +1345,7 @@ public sealed partial class MainForm : Form dailyFileRotationMenuItem.Checked = false; perSessionFileRotationMenuItem.Checked = true; _logger.FileRotationMethod = LoggerFileRotation.PerSession; + _settings.SetValue("logger.fileRotation", (int)LoggerFileRotation.PerSession); } private void dailyFileRotationMenuItem_Click(object sender, EventArgs e) @@ -1348,5 +1353,6 @@ public sealed partial class MainForm : Form dailyFileRotationMenuItem.Checked = true; perSessionFileRotationMenuItem.Checked = false; _logger.FileRotationMethod = LoggerFileRotation.Daily; + _settings.SetValue("logger.fileRotation", (int)LoggerFileRotation.Daily); } }