mirror of
https://github.com/SabreTools/MPF.git
synced 2026-07-02 17:24:48 +00:00
Add option for log formatting
This commit is contained in:
@@ -333,6 +333,12 @@ namespace MPF.Data
|
||||
set { _settings["OpenLogWindowAtStartup"] = value.ToString(); }
|
||||
}
|
||||
|
||||
public bool EnableLogFormatting
|
||||
{
|
||||
get { return GetBooleanSetting(_settings, "EnableFancyLog", true); }
|
||||
set { _settings["EnableFancyLog"] = value.ToString(); }
|
||||
}
|
||||
|
||||
public bool EnableProgressProcessing
|
||||
{
|
||||
get { return GetBooleanSetting(_settings, "EnableProgressProcessing", true); }
|
||||
|
||||
@@ -378,6 +378,13 @@ namespace MPF.UserControls
|
||||
|
||||
try
|
||||
{
|
||||
// If we're not processing log formatting, just append and continue
|
||||
if (!ViewModels.OptionsViewModel.EnableLogFormatting)
|
||||
{
|
||||
AppendToTextBox(nextLogLine);
|
||||
return;
|
||||
}
|
||||
|
||||
// Get last line
|
||||
lastLine = lastLine ?? GetLastLine();
|
||||
|
||||
|
||||
@@ -12,6 +12,11 @@
|
||||
get { return _uiOptions.Options.VerboseLogging; }
|
||||
}
|
||||
|
||||
public bool EnableLogFormatting
|
||||
{
|
||||
get { return _uiOptions.Options.EnableLogFormatting; }
|
||||
}
|
||||
|
||||
public bool EnableProgressProcessing
|
||||
{
|
||||
get { return _uiOptions.Options.EnableProgressProcessing; }
|
||||
|
||||
@@ -228,8 +228,13 @@
|
||||
ToolTip="Open the log panel when the program launches" Margin="0,4"
|
||||
/>
|
||||
|
||||
<CheckBox VerticalAlignment="Center" Content="Enable Log Formatting"
|
||||
IsChecked="{Binding Path=UIOptions.Options.EnableLogFormatting}"
|
||||
ToolTip="Format log lines written to the log, including overwriting previous lines on match. Disable this if you have a weaker system as there is an increased processing load otherwise." Margin="0,4"
|
||||
/>
|
||||
|
||||
<CheckBox VerticalAlignment="Center" Content="Enable Progress Processing"
|
||||
IsChecked="{Binding Path=UIOptions.Options.EnableProgressProcessing}"
|
||||
IsChecked="{Binding Path=UIOptions.Options.EnableProgressProcessing}" IsEnabled="{Binding Path=UIOptions.Options.EnableLogFormatting}"
|
||||
ToolTip="Process lines written to the log to update the progress bar. Disable this if you have a weaker system as there is an increased processing load otherwise." Margin="0,4"
|
||||
/>
|
||||
</UniformGrid>
|
||||
|
||||
Reference in New Issue
Block a user