7 Commits
14 changed files with 24 additions and 51 deletions
+5 -1
View File
@@ -1,7 +1,7 @@
# DesktopMagic # DesktopMagic
> DesktopMagic allows you to improve the looks of your Windows desktop!\ > DesktopMagic allows you to improve the looks of your Windows desktop!\
> You can add useful elements to your desktop like a clock, a audio visualizer or even your own plugins! > You can add useful elements to your desktop like a clock, an audio visualizer or even your own plugins using mod.io!
- [Releases](https://github.com/Stone-Red-Code/DesktopMagic/releases) - [Releases](https://github.com/Stone-Red-Code/DesktopMagic/releases)
- [Download plugins](https://mod.io/g/desktopmagic) - [Download plugins](https://mod.io/g/desktopmagic)
@@ -14,6 +14,10 @@
1. Execute the `DesktopMagic-Installer.exe` file. 1. Execute the `DesktopMagic-Installer.exe` file.
1. (Optional) Put a shortcut to the `DesktopMagic.exe` file in the install directory into the `shell:startup` directory. 1. (Optional) Put a shortcut to the `DesktopMagic.exe` file in the install directory into the `shell:startup` directory.
## Follow the development
[![Twitter(X)](http://img.shields.io/badge/Twitter-black.svg?&logo=x&style=for-the-badge&logoColor=white)](https://twitter.com/search?q=%23DesktopMagic%20%40StoneRedCode&f=live)
## Preview ## Preview
![Screenshot 2023-12-31 164947](https://github.com/Stone-Red-Code/DesktopMagic/assets/56473591/191ac76f-264d-4e9f-8979-7a13b2a1cd12) ![Screenshot 2023-12-31 164947](https://github.com/Stone-Red-Code/DesktopMagic/assets/56473591/191ac76f-264d-4e9f-8979-7a13b2a1cd12)
Binary file not shown.
+1 -33
View File
@@ -1,7 +1,5 @@
global using Stone_Red_Utilities.Logging; global using Stone_Red_Utilities.Logging;
using AlwaysUpToDate;
using Stone_Red_C_Sharp_Utilities.Logging; using Stone_Red_C_Sharp_Utilities.Logging;
using System; using System;
@@ -20,11 +18,7 @@ public partial class App : Application
public const string AppName = "Desktop Magic"; public const string AppName = "Desktop Magic";
private readonly string logFilePath; private readonly string logFilePath;
#if DEBUG
private readonly Updater updater = new Updater(TimeSpan.FromDays(1), "https://raw.githubusercontent.com/Stone-Red-Code/DesktopMagic/develop/update/updateInfo.json");
#else
private readonly Updater updater = new Updater(TimeSpan.FromDays(1), "https://raw.githubusercontent.com/Stone-Red-Code/DesktopMagic/main/update/updateInfo.json");
#endif
private readonly Thread? eventThread; private readonly Thread? eventThread;
private readonly EventWaitHandle eventWaitHandle; private readonly EventWaitHandle eventWaitHandle;
@@ -64,12 +58,6 @@ public partial class App : Application
Setup(true); Setup(true);
Exit += CloseHandler; Exit += CloseHandler;
updater.ProgressChanged += Updater_ProgressChanged;
updater.OnException += Updater_OnException;
updater.NoUpdateAvailible += Updater_NoUpdateAvailible;
updater.UpdateAvailible += Updater_UpdateAvailible;
updater.Start();
} }
} }
@@ -79,26 +67,6 @@ public partial class App : Application
eventThread?.Interrupt(); eventThread?.Interrupt();
} }
private void Updater_UpdateAvailible(string version, string additionalInformation)
{
updater.Update();
}
private void Updater_NoUpdateAvailible()
{
Logger.Log("No update available", "Updater");
}
private void Updater_OnException(Exception exception)
{
Logger.Log(exception.ToString(), "Updater");
}
private void Updater_ProgressChanged(long? totalFileSize, long totalBytesDownloaded, double? progressPercentage)
{
Logger.Log($"Downloading: {progressPercentage}% {totalBytesDownloaded}/{totalFileSize}", "Updater");
}
private void Setup(bool clearLogFile) private void Setup(bool clearLogFile)
{ {
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
+3 -4
View File
@@ -7,11 +7,11 @@
<ApplicationIcon>icon.ico</ApplicationIcon> <ApplicationIcon>icon.ico</ApplicationIcon>
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent> <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
<Authors>Stone_Red</Authors> <Authors>Stone_Red</Authors>
<Version>1.0.0.0</Version> <Version>1.0.1.0</Version>
<PackageProjectUrl>https://github.com/Stone-Red-Code/DesktopMagic</PackageProjectUrl> <PackageProjectUrl>https://github.com/Stone-Red-Code/DesktopMagic</PackageProjectUrl>
<RepositoryUrl>https://github.com/Stone-Red-Code/DesktopMagic</RepositoryUrl> <RepositoryUrl>https://github.com/Stone-Red-Code/DesktopMagic</RepositoryUrl>
<AssemblyVersion>1.0.0.0</AssemblyVersion> <AssemblyVersion>1.0.1.0</AssemblyVersion>
<FileVersion>1.0.0.0</FileVersion> <FileVersion>1.0.1.0</FileVersion>
<TargetFramework>net8.0-windows7.0</TargetFramework> <TargetFramework>net8.0-windows7.0</TargetFramework>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
</PropertyGroup> </PropertyGroup>
@@ -35,7 +35,6 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<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="MaterialDesignThemes" Version="4.9.0" /> <PackageReference Include="MaterialDesignThemes" Version="4.9.0" />
+1
View File
@@ -8,3 +8,4 @@ using System.Diagnostics.CodeAnalysis;
[assembly: SuppressMessage("Interoperability", "CA1416:Validate platform compatibility", Justification = "Windows only application")] [assembly: SuppressMessage("Interoperability", "CA1416:Validate platform compatibility", Justification = "Windows only application")]
[assembly: SuppressMessage("Performance", "CA1822:Mark members as static", Justification = "No need to")] [assembly: SuppressMessage("Performance", "CA1822:Mark members as static", Justification = "No need to")]
[assembly: SuppressMessage("Minor Code Smell", "S1075:URIs should not be hardcoded", Justification = "<Pending>")] [assembly: SuppressMessage("Minor Code Smell", "S1075:URIs should not be hardcoded", Justification = "<Pending>")]
[assembly: SuppressMessage("Critical Code Smell", "S2696:Instance members should not write to \"static\" fields", Justification = "<Pending>", Scope = "member", Target = "~P:DesktopMagic.DataContexts.MainWindowDataContext.Settings")]
+1 -1
View File
@@ -1,7 +1,7 @@
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Text; using System.Text;
#pragma warning disable
namespace DesktopMagic.Helpers; namespace DesktopMagic.Helpers;
internal class W32 internal class W32
+1 -1
View File
@@ -3,7 +3,7 @@ using System.Runtime.InteropServices;
using System.Windows; using System.Windows;
using System.Windows.Interop; using System.Windows.Interop;
using System.Windows.Shapes; using System.Windows.Shapes;
#pragma warning disable
namespace DesktopMagic namespace DesktopMagic
{ {
using static NativeMethods; using static NativeMethods;
@@ -35,7 +35,7 @@ public partial class PluginWindow : Window
public bool IsRunning { get; private set; } = true; public bool IsRunning { get; private set; } = true;
public PluginMetadata PluginMetadata { get; private set; } public PluginMetadata PluginMetadata { get; private set; }
public string? PluginFolderPath { get; private set; } public string PluginFolderPath { get; private set; }
public PluginWindow(PluginMetadata pluginMetadata, PluginSettings settings, string pluginFolderPath) public PluginWindow(PluginMetadata pluginMetadata, PluginSettings settings, string pluginFolderPath)
{ {
@@ -6,8 +6,13 @@ namespace DesktopMagic.Api.Drawing;
internal class FontComparer : IEqualityComparer<Font> internal class FontComparer : IEqualityComparer<Font>
{ {
public bool Equals(Font font1, Font font2) public bool Equals(Font? font1, Font? font2)
{ {
if (font1 is null || font2 is null)
{
return false;
}
if (font1.Name != font2.Name) if (font1.Name != font2.Name)
{ {
return false; return false;
+2 -2
View File
@@ -10,9 +10,9 @@ public class Button : Setting
/// <summary> /// <summary>
/// Occurs when the button gets clicked. /// Occurs when the button gets clicked.
/// </summary> /// </summary>
public event Action OnClick; public event Action? OnClick;
private string _value; private string _value = string.Empty;
/// <summary> /// <summary>
/// Gets or sets the text caption displayed in the <see cref="Button"/> element. /// Gets or sets the text caption displayed in the <see cref="Button"/> element.
+1 -1
View File
@@ -5,7 +5,7 @@
/// </summary> /// </summary>
public class Label : Setting public class Label : Setting
{ {
private string _value; private string _value = string.Empty;
/// <summary> /// <summary>
/// Gets or sets the text associated with this <see cref="Label"/>. /// Gets or sets the text associated with this <see cref="Label"/>.
@@ -5,7 +5,7 @@
/// </summary> /// </summary>
public class TextBox : Setting public class TextBox : Setting
{ {
private string _value; private string _value = string.Empty;
/// <summary> /// <summary>
/// Gets or sets the text associated with this <see cref="TextBox"/>. /// Gets or sets the text associated with this <see cref="TextBox"/>.
Binary file not shown.
-4
View File
@@ -1,4 +0,0 @@
{
"Version":"0.0.3.1",
"FileUrl":"http://github.com/Stone-Red-Code/DesktopMagic/blob/main/update/DesktopMagic.zip?raw=true"
}