diff --git a/CHANGELIST.md b/CHANGELIST.md
index f31b5ab0..100635c6 100644
--- a/CHANGELIST.md
+++ b/CHANGELIST.md
@@ -4,6 +4,7 @@
- Fix using SHA-1 for track checks
- Fix build warning for NRE
- Remove .NET Framework 3.5 from build script
+- Handle or suppress some messages
### 3.0.2 (2023-12-01)
diff --git a/MPF.Core/Data/Options.cs b/MPF.Core/Data/Options.cs
index f9861304..d4652b3e 100644
--- a/MPF.Core/Data/Options.cs
+++ b/MPF.Core/Data/Options.cs
@@ -608,7 +608,7 @@ namespace MPF.Core.Data
///
public Options(Dictionary? settings = null)
{
- this.Settings = settings ?? new Dictionary();
+ this.Settings = settings ?? [];
}
///
@@ -617,7 +617,7 @@ namespace MPF.Core.Data
///
public Options(Options? source)
{
- Settings = new Dictionary(source?.Settings ?? new Dictionary());
+ Settings = new Dictionary(source?.Settings ?? []);
}
///
diff --git a/MPF.UI.Core/External/WPFCustomMessageBox/CustomMessageBoxWindow.xaml.cs b/MPF.UI.Core/External/WPFCustomMessageBox/CustomMessageBoxWindow.xaml.cs
index 0e31d02f..b893b3f5 100644
--- a/MPF.UI.Core/External/WPFCustomMessageBox/CustomMessageBoxWindow.xaml.cs
+++ b/MPF.UI.Core/External/WPFCustomMessageBox/CustomMessageBoxWindow.xaml.cs
@@ -5,6 +5,8 @@ using System.Windows.Controls;
using System.Windows.Input;
using MPF.UI.Core;
+#pragma warning disable IDE1006 // Naming Styles
+
namespace WPFCustomMessageBox
{
///
diff --git a/MPF.UI.Core/UserControls/LogOutput.xaml.cs b/MPF.UI.Core/UserControls/LogOutput.xaml.cs
index 5370148a..c83464ff 100644
--- a/MPF.UI.Core/UserControls/LogOutput.xaml.cs
+++ b/MPF.UI.Core/UserControls/LogOutput.xaml.cs
@@ -7,6 +7,8 @@ using System.Windows.Media;
using System.Windows.Threading;
using MPF.Core.Data;
+#pragma warning disable IDE1006 // Naming Styles
+
namespace MPF.UI.Core.UserControls
{
public partial class LogOutput : UserControl
@@ -115,18 +117,13 @@ namespace MPF.UI.Core.UserControls
/// Brush representing the color
public Brush GetForegroundColor()
{
- switch (this.LogLevel)
+ return this.LogLevel switch
{
- case LogLevel.SECRET:
- return Brushes.Blue;
- case LogLevel.ERROR:
- return Brushes.Red;
- case LogLevel.VERBOSE:
- return Brushes.Yellow;
- case LogLevel.USER:
- default:
- return Brushes.White;
- }
+ LogLevel.SECRET => Brushes.Blue,
+ LogLevel.ERROR => Brushes.Red,
+ LogLevel.VERBOSE => Brushes.Yellow,
+ _ => Brushes.White,
+ };
}
///
@@ -206,13 +203,11 @@ namespace MPF.UI.Core.UserControls
///
private void SaveInlines()
{
- using (var sw = new StreamWriter(File.OpenWrite("console.log")))
+ using var sw = new StreamWriter(File.OpenWrite("console.log"));
+ foreach (var inline in _paragraph.Inlines)
{
- foreach (var inline in _paragraph.Inlines)
- {
- if (inline is Run run)
- sw.Write(run.Text);
- }
+ if (inline is Run run)
+ sw.Write(run.Text);
}
}
diff --git a/MPF.UI.Core/Windows/DiscInformationWindow.xaml.cs b/MPF.UI.Core/Windows/DiscInformationWindow.xaml.cs
index f2b37132..af52a956 100644
--- a/MPF.UI.Core/Windows/DiscInformationWindow.xaml.cs
+++ b/MPF.UI.Core/Windows/DiscInformationWindow.xaml.cs
@@ -7,6 +7,8 @@ using MPF.Core.Utilities;
using MPF.UI.Core.UserControls;
using SabreTools.RedumpLib.Data;
+#pragma warning disable IDE1006 // Naming Styles
+
namespace MPF.UI.Core.Windows
{
///
diff --git a/MPF.UI.Core/Windows/MainWindow.xaml.cs b/MPF.UI.Core/Windows/MainWindow.xaml.cs
index 2a6d1bea..5a0d90bb 100644
--- a/MPF.UI.Core/Windows/MainWindow.xaml.cs
+++ b/MPF.UI.Core/Windows/MainWindow.xaml.cs
@@ -9,6 +9,8 @@ using SabreTools.RedumpLib.Data;
using WPFCustomMessageBox;
using WinForms = System.Windows.Forms;
+#pragma warning disable IDE1006 // Naming Styles
+
namespace MPF.UI.Core.Windows
{
public partial class MainWindow : WindowBase
diff --git a/MPF.UI.Core/Windows/OptionsWindow.xaml.cs b/MPF.UI.Core/Windows/OptionsWindow.xaml.cs
index 11f31195..8645e99f 100644
--- a/MPF.UI.Core/Windows/OptionsWindow.xaml.cs
+++ b/MPF.UI.Core/Windows/OptionsWindow.xaml.cs
@@ -8,6 +8,8 @@ using MPF.Core.Data;
using MPF.Core.UI.ViewModels;
using WPFCustomMessageBox;
+#pragma warning disable IDE1006 // Naming Styles
+
namespace MPF.UI.Core.Windows
{
///