mirror of
https://github.com/Stone-Red-Code/DesktopMagic.git
synced 2026-09-04 00:46:12 +02:00
Small code improvments
This commit is contained in:
Binary file not shown.
@@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
using AlwaysUpToDate;
|
using AlwaysUpToDate;
|
||||||
|
|
||||||
|
using Stone_Red_C_Sharp_Utilities.Logging;
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
@@ -29,16 +31,7 @@ public partial class App : Application
|
|||||||
private readonly Logger logger = new Logger();
|
private readonly Logger logger = new Logger();
|
||||||
public static string ApplicationDataPath { get; } = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "StoneRed", AppName);
|
public static string ApplicationDataPath { get; } = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "StoneRed", AppName);
|
||||||
|
|
||||||
public static Logger Logger
|
public static Logger Logger => ((App)Current).logger;
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
lock (Current)
|
|
||||||
{
|
|
||||||
return ((App)Current).logger;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public App()
|
public App()
|
||||||
{
|
{
|
||||||
@@ -143,7 +136,7 @@ public partial class App : Application
|
|||||||
},
|
},
|
||||||
FormatConfig = new FormatConfig()
|
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}}}"
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -38,11 +38,10 @@
|
|||||||
<PackageReference Include="AlwaysUpToDate" Version="1.0.0.4" />
|
<PackageReference Include="AlwaysUpToDate" Version="1.0.0.4" />
|
||||||
<PackageReference Include="BusyIndicators" Version="2.1.2" />
|
<PackageReference Include="BusyIndicators" Version="2.1.2" />
|
||||||
<PackageReference Include="Extended.Wpf.Toolkit" Version="4.5.1" />
|
<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="MaterialDesignThemes" Version="4.9.0" />
|
||||||
<PackageReference Include="Modio.NET" Version="1.1.1" />
|
<PackageReference Include="Modio.NET" Version="1.1.1" />
|
||||||
<PackageReference Include="NAudio" Version="2.2.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" />
|
<PackageReference Include="System.Management" Version="8.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ namespace DesktopMagic.Helpers;
|
|||||||
internal class SampleAggregator
|
internal class SampleAggregator
|
||||||
{
|
{
|
||||||
// FFT
|
// FFT
|
||||||
public event EventHandler<FftEventArgs> FftCalculated;
|
public event EventHandler<FftEventArgs>? FftCalculated;
|
||||||
|
|
||||||
// This Complex is NAudio's own!
|
// This Complex is NAudio's own!
|
||||||
private readonly Complex[] fftBuffer;
|
private readonly Complex[] fftBuffer;
|
||||||
|
|||||||
@@ -5,8 +5,6 @@ using DesktopMagic.Helpers;
|
|||||||
using DesktopMagic.Plugins;
|
using DesktopMagic.Plugins;
|
||||||
using DesktopMagic.Settings;
|
using DesktopMagic.Settings;
|
||||||
|
|
||||||
using Stone_Red_Utilities.StringExtentions;
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
|||||||
Reference in New Issue
Block a user