Small code improvments

This commit is contained in:
Stone_Red
2023-12-31 15:54:38 +01:00
parent 9d36dbfb3c
commit 9f1f67275c
5 changed files with 6 additions and 16 deletions
Binary file not shown.
+4 -11
View File
@@ -2,6 +2,8 @@
using AlwaysUpToDate;
using Stone_Red_C_Sharp_Utilities.Logging;
using System;
using System.IO;
using System.Threading;
@@ -29,16 +31,7 @@ public partial class App : Application
private readonly Logger logger = new Logger();
public static string ApplicationDataPath { get; } = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "StoneRed", AppName);
public static Logger Logger
{
get
{
lock (Current)
{
return ((App)Current).logger;
}
}
}
public static Logger Logger => ((App)Current).logger;
public App()
{
@@ -143,7 +136,7 @@ public partial class App : Application
},
FormatConfig = new FormatConfig()
{
DebugConsoleFormat = $"> {{{LogFormatType.DateTime}:hh:mm:ss}} | {{{LogFormatType.LogSeverity},-5}} | {{{LogFormatType.Message}}}\nat {{{LogFormatType.LineNumber}}} | {{{LogFormatType.FilePath}}}"
DebugConsoleFormat = $"> {{{LogFormatType.DateTime}:HH:mm:ss}} | {{{LogFormatType.LogSeverity},-5}} | {{{LogFormatType.Message}}}\nat {{{LogFormatType.LineNumber}}} | {{{LogFormatType.FilePath}}}"
}
};
+1 -2
View File
@@ -38,11 +38,10 @@
<PackageReference Include="AlwaysUpToDate" Version="1.0.0.4" />
<PackageReference Include="BusyIndicators" Version="2.1.2" />
<PackageReference Include="Extended.Wpf.Toolkit" Version="4.5.1" />
<PackageReference Include="Google.Apis.Calendar.v3" Version="1.64.0.3171" />
<PackageReference Include="MaterialDesignThemes" Version="4.9.0" />
<PackageReference Include="Modio.NET" Version="1.1.1" />
<PackageReference Include="NAudio" Version="2.2.1" />
<PackageReference Include="Stone_Red-C-Sharp-Utilities" Version="1.0.3.1" />
<PackageReference Include="Stone_Red-C-Sharp-Utilities" Version="1.0.3.2" />
<PackageReference Include="System.Management" Version="8.0.0" />
</ItemGroup>
+1 -1
View File
@@ -7,7 +7,7 @@ namespace DesktopMagic.Helpers;
internal class SampleAggregator
{
// FFT
public event EventHandler<FftEventArgs> FftCalculated;
public event EventHandler<FftEventArgs>? FftCalculated;
// This Complex is NAudio's own!
private readonly Complex[] fftBuffer;
-2
View File
@@ -5,8 +5,6 @@ using DesktopMagic.Helpers;
using DesktopMagic.Plugins;
using DesktopMagic.Settings;
using Stone_Red_Utilities.StringExtentions;
using System;
using System.Collections.Generic;
using System.Diagnostics;