Skip to content

Commit

Permalink
Major Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Taiizor committed Jun 26, 2024
1 parent 2b41b6f commit d9a21de
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 64 deletions.
36 changes: 18 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,107 +235,107 @@
<tr align="center">
<td><a href="https://dotnet.microsoft.com/en-us/download/dotnet-framework/net48">.NET Framework 4.8</a></td>
<td>
<a href='https://github.com/Taiizor/Sucrose/releases/latest/download/Sucrose_Bundle_.NET_Framework_4.8_x64_24.6.25.0.exe'>
<a href='https://github.com/Taiizor/Sucrose/releases/download/v24.6.25.0/Sucrose_Bundle_.NET_Framework_4.8_x64_24.6.25.0.exe'>
<img src='.images/Badges/GitHub/English_get_it_from_GH_228X86.png' alt='Sucrose .NET Framework 4.8 x64' width='160' />
</a>
</td>
<td>
<a href='https://github.com/Taiizor/Sucrose/releases/latest/download/Sucrose_Bundle_.NET_Framework_4.8_x86_24.6.25.0.exe'>
<a href='https://github.com/Taiizor/Sucrose/releases/download/v24.6.25.0/Sucrose_Bundle_.NET_Framework_4.8_x86_24.6.25.0.exe'>
<img src='.images/Badges/GitHub/English_get_it_from_GH_228X86.png' alt='Sucrose .NET Framework 4.8 x86' width='160' />
</a>
</td>
<td>
<a href='https://github.com/Taiizor/Sucrose/releases/latest/download/Sucrose_Bundle_.NET_Framework_4.8_ARM64_24.6.25.0.exe'>
<a href='https://github.com/Taiizor/Sucrose/releases/download/v24.6.25.0/Sucrose_Bundle_.NET_Framework_4.8_ARM64_24.6.25.0.exe'>
<img src='.images/Badges/GitHub/English_get_it_from_GH_228X86.png' alt='Sucrose .NET Framework 4.8 ARM64' width='160' />
</a>
</td>
</tr>
<tr align="center">
<td><a href="https://dotnet.microsoft.com/en-us/download/dotnet-framework/net481">.NET Framework 4.8.1</a></td>
<td>
<a href='https://github.com/Taiizor/Sucrose/releases/latest/download/Sucrose_Bundle_.NET_Framework_4.8.1_x64_24.6.25.0.exe'>
<a href='https://github.com/Taiizor/Sucrose/releases/download/v24.6.25.0/Sucrose_Bundle_.NET_Framework_4.8.1_x64_24.6.25.0.exe'>
<img src='.images/Badges/GitHub/English_get_it_from_GH_228X86.png' alt='Sucrose .NET Framework 4.8.1 x64' width='160' />
</a>
</td>
<td>
<a href='https://github.com/Taiizor/Sucrose/releases/latest/download/Sucrose_Bundle_.NET_Framework_4.8.1_x86_24.6.25.0.exe'>
<a href='https://github.com/Taiizor/Sucrose/releases/download/v24.6.25.0/Sucrose_Bundle_.NET_Framework_4.8.1_x86_24.6.25.0.exe'>
<img src='.images/Badges/GitHub/English_get_it_from_GH_228X86.png' alt='Sucrose .NET Framework 4.8.1 x86' width='160' />
</a>
</td>
<td>
<a href='https://github.com/Taiizor/Sucrose/releases/latest/download/Sucrose_Bundle_.NET_Framework_4.8.1_ARM64_24.6.25.0.exe'>
<a href='https://github.com/Taiizor/Sucrose/releases/download/v24.6.25.0/Sucrose_Bundle_.NET_Framework_4.8.1_ARM64_24.6.25.0.exe'>
<img src='.images/Badges/GitHub/English_get_it_from_GH_228X86.png' alt='Sucrose .NET Framework 4.8.1 ARM64' width='160' />
</a>
</td>
</tr>
<tr align="center">
<td><a href="https://dotnet.microsoft.com/en-us/download/dotnet/6.0">.NET 6.0</a></td>
<td>
<a href='https://github.com/Taiizor/Sucrose/releases/latest/download/Sucrose_Bundle_.NET_6.0_x64_24.6.25.0.exe'>
<a href='https://github.com/Taiizor/Sucrose/releases/download/v24.6.25.0/Sucrose_Bundle_.NET_6.0_x64_24.6.25.0.exe'>
<img src='.images/Badges/GitHub/English_get_it_from_GH_228X86.png' alt='Sucrose .NET 6.0 x64' width='160' />
</a>
</td>
<td>
<a href='https://github.com/Taiizor/Sucrose/releases/latest/download/Sucrose_Bundle_.NET_6.0_x86_24.6.25.0.exe'>
<a href='https://github.com/Taiizor/Sucrose/releases/download/v24.6.25.0/Sucrose_Bundle_.NET_6.0_x86_24.6.25.0.exe'>
<img src='.images/Badges/GitHub/English_get_it_from_GH_228X86.png' alt='Sucrose .NET 6.0 x86' width='160' />
</a>
</td>
<td>
<a href='https://github.com/Taiizor/Sucrose/releases/latest/download/Sucrose_Bundle_.NET_6.0_ARM64_24.6.25.0.exe'>
<a href='https://github.com/Taiizor/Sucrose/releases/download/v24.6.25.0/Sucrose_Bundle_.NET_6.0_ARM64_24.6.25.0.exe'>
<img src='.images/Badges/GitHub/English_get_it_from_GH_228X86.png' alt='Sucrose .NET 6.0 ARM64' width='160' />
</a>
</td>
</tr>
<tr align="center">
<td><a href="https://dotnet.microsoft.com/en-us/download/dotnet/7.0">.NET 7.0</a></td>
<td>
<a href='https://github.com/Taiizor/Sucrose/releases/latest/download/Sucrose_Bundle_.NET_7.0_x64_24.6.25.0.exe'>
<a href='https://github.com/Taiizor/Sucrose/releases/download/v24.6.25.0/Sucrose_Bundle_.NET_7.0_x64_24.6.25.0.exe'>
<img src='.images/Badges/GitHub/English_get_it_from_GH_228X86.png' alt='Sucrose .NET 7.0 x64' width='160' />
</a>
</td>
<td>
<a href='https://github.com/Taiizor/Sucrose/releases/latest/download/Sucrose_Bundle_.NET_7.0_x86_24.6.25.0.exe'>
<a href='https://github.com/Taiizor/Sucrose/releases/download/v24.6.25.0/Sucrose_Bundle_.NET_7.0_x86_24.6.25.0.exe'>
<img src='.images/Badges/GitHub/English_get_it_from_GH_228X86.png' alt='Sucrose .NET 7.0 x86' width='160' />
</a>
</td>
<td>
<a href='https://github.com/Taiizor/Sucrose/releases/latest/download/Sucrose_Bundle_.NET_7.0_ARM64_24.6.25.0.exe'>
<a href='https://github.com/Taiizor/Sucrose/releases/download/v24.6.25.0/Sucrose_Bundle_.NET_7.0_ARM64_24.6.25.0.exe'>
<img src='.images/Badges/GitHub/English_get_it_from_GH_228X86.png' alt='Sucrose .NET 7.0 ARM64' width='160' />
</a>
</td>
</tr>
<tr align="center">
<td><a href="https://dotnet.microsoft.com/en-us/download/dotnet/8.0">.NET 8.0</a></td>
<td>
<a href='https://github.com/Taiizor/Sucrose/releases/latest/download/Sucrose_Bundle_.NET_8.0_x64_24.6.25.0.exe'>
<a href='https://github.com/Taiizor/Sucrose/releases/download/v24.6.25.0/Sucrose_Bundle_.NET_8.0_x64_24.6.25.0.exe'>
<img src='.images/Badges/GitHub/English_get_it_from_GH_228X86.png' alt='Sucrose .NET 8.0 x64' width='160' />
</a>
</td>
<td>
<a href='https://github.com/Taiizor/Sucrose/releases/latest/download/Sucrose_Bundle_.NET_8.0_x86_24.6.25.0.exe'>
<a href='https://github.com/Taiizor/Sucrose/releases/download/v24.6.25.0/Sucrose_Bundle_.NET_8.0_x86_24.6.25.0.exe'>
<img src='.images/Badges/GitHub/English_get_it_from_GH_228X86.png' alt='Sucrose .NET 8.0 x86' width='160' />
</a>
</td>
<td>
<a href='https://github.com/Taiizor/Sucrose/releases/latest/download/Sucrose_Bundle_.NET_8.0_ARM64_24.6.25.0.exe'>
<a href='https://github.com/Taiizor/Sucrose/releases/download/v24.6.25.0/Sucrose_Bundle_.NET_8.0_ARM64_24.6.25.0.exe'>
<img src='.images/Badges/GitHub/English_get_it_from_GH_228X86.png' alt='Sucrose .NET 8.0 ARM64' width='160' />
</a>
</td>
</tr>
<tr align="center">
<td><a href="https://dotnet.microsoft.com/en-us/download/dotnet/9.0">.NET 9.0</a></td>
<td>
<a href='https://github.com/Taiizor/Sucrose/releases/latest/download/Sucrose_Bundle_.NET_9.0_x64_24.6.25.0.exe'>
<a href='https://github.com/Taiizor/Sucrose/releases/download/v24.6.25.0/Sucrose_Bundle_.NET_9.0_x64_24.6.25.0.exe'>
<img src='.images/Badges/GitHub/English_get_it_from_GH_228X86.png' alt='Sucrose .NET 9.0 x64' width='160' />
</a>
</td>
<td>
<a href='https://github.com/Taiizor/Sucrose/releases/latest/download/Sucrose_Bundle_.NET_9.0_x86_24.6.25.0.exe'>
<a href='https://github.com/Taiizor/Sucrose/releases/download/v24.6.25.0/Sucrose_Bundle_.NET_9.0_x86_24.6.25.0.exe'>
<img src='.images/Badges/GitHub/English_get_it_from_GH_228X86.png' alt='Sucrose .NET 9.0 x86' width='160' />
</a>
</td>
<td>
<a href='https://github.com/Taiizor/Sucrose/releases/latest/download/Sucrose_Bundle_.NET_9.0_ARM64_24.6.25.0.exe'>
<a href='https://github.com/Taiizor/Sucrose/releases/download/v24.6.25.0/Sucrose_Bundle_.NET_9.0_ARM64_24.6.25.0.exe'>
<img src='.images/Badges/GitHub/English_get_it_from_GH_228X86.png' alt='Sucrose .NET 9.0 ARM64' width='160' />
</a>
</td>
Expand Down
4 changes: 2 additions & 2 deletions src/Library/Sucrose.Manager/Manage/Manager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ public static class Manager
{
public static IList<char> Chars => Enumerable.Range('A', 'Z' - 'A' + 1).Concat(Enumerable.Range('a', 'z' - 'a' + 1)).Concat(Enumerable.Range('0', '9' - '0' + 1)).Select(C => (char)C).ToList();

public static Dictionary<string, string> CefArguments => SMMI.EngineSettingManager.GetSetting(SMC.CefArguments, new Dictionary<string, string>());
public static string LibraryLocation => SMMI.LibrarySettingManager.GetSetting(SMC.LibraryLocation, Path.Combine(SMR.AppDataPath, SMR.AppName, SMR.Library));

public static string LibraryLocation => SMMI.LibrarySettingManager.GetSetting(SMC.LibraryLocation, Path.Combine(SMR.DocumentsPath, SMR.AppName));
public static Dictionary<string, string> CefArguments => SMMI.EngineSettingManager.GetSetting(SMC.CefArguments, new Dictionary<string, string>());

public static int UpdateLimitValue => SHS.Clamp(SMMI.UpdateSettingManager.GetSettingStable(SMC.UpdateLimitValue, 500), 0, 99999999);

Expand Down
6 changes: 1 addition & 5 deletions src/Portal/Sucrose.Portal/Manage/Manager.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
using System.IO;
using Wpf.Ui.Controls;
using Wpf.Ui.Controls;
using SMC = Sucrose.Memory.Constant;
using SMMI = Sucrose.Manager.Manage.Internal;
using SMR = Sucrose.Memory.Readonly;

namespace Sucrose.Portal.Manage
{
internal static class Manager
{
public static WindowBackdropType BackdropType => SMMI.PortalSettingManager.GetSetting(SMC.BackdropType, DefaultBackdropType);

public static string AlternativeLibrary => Path.Combine(SMR.AppDataPath, SMR.AppName, SMR.Library);

public static WindowBackdropType DefaultBackdropType => WindowBackdropType.None;
}
}
41 changes: 2 additions & 39 deletions src/Portal/Sucrose.Portal/Views/Pages/LibraryPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
using SMMM = Sucrose.Manager.Manage.Manager;
using SMR = Sucrose.Memory.Readonly;
using SPMI = Sucrose.Portal.Manage.Internal;
using SPMM = Sucrose.Portal.Manage.Manager;
using SPVCTI = Sucrose.Portal.Views.Controls.ThemeImport;
using SPVMPLVM = Sucrose.Portal.ViewModels.Pages.LibraryViewModel;
using SPVPLELP = Sucrose.Portal.Views.Pages.Library.EmptyLibraryPage;
Expand Down Expand Up @@ -44,8 +43,6 @@ public LibraryPage(SPVMPLVM ViewModel)
this.ViewModel = ViewModel;
DataContext = this;

CheckLibrary();

CheckShowcase();

InitializeThemes();
Expand Down Expand Up @@ -80,42 +77,6 @@ private void Library()
SPMI.LibraryService.CreatedWallpaper += LibraryService_CreatedWallpaper;
}

private void CheckLibrary()
{
try
{
if (!Directory.Exists(SMMM.LibraryLocation))
{
Directory.CreateDirectory(SMMM.LibraryLocation);

if (!Directory.Exists(SMMM.LibraryLocation))
{
if (!Directory.Exists(SPMM.AlternativeLibrary))
{
Directory.CreateDirectory(SPMM.AlternativeLibrary);
}

if (SMMM.LibraryLocation != SPMM.AlternativeLibrary)
{
SMMI.LibrarySettingManager.SetSetting(SMC.LibraryLocation, SPMM.AlternativeLibrary);
}
}
}
}
catch
{
if (!Directory.Exists(SPMM.AlternativeLibrary))
{
Directory.CreateDirectory(SPMM.AlternativeLibrary);
}

if (SMMM.LibraryLocation != SPMM.AlternativeLibrary)
{
SMMI.LibrarySettingManager.SetSetting(SMC.LibraryLocation, SPMM.AlternativeLibrary);
}
}
}

private void CheckShowcase()
{
string ShowcasePath = Path.Combine(SMR.AppDataPath, SMR.AppName, SMR.Showcase);
Expand Down Expand Up @@ -208,6 +169,8 @@ private void InitializeThemes()
else
{
Themes.Clear();

Directory.CreateDirectory(SMMM.LibraryLocation);
}

Dictionary<string, object> SortThemes = new();
Expand Down

0 comments on commit d9a21de

Please sign in to comment.