Skip to content

Commit

Permalink
Minor Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Taiizor committed Oct 2, 2024
1 parent 16dbf2b commit 1682b47
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 72 deletions.
5 changes: 1 addition & 4 deletions src/Bundle/Sucrose.Bundle/Main.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,7 @@ private void WindowCorner()
SWNM.DwmSetWindowAttribute(SWHWI.Handle(this), Attribute, ref Preference, (uint)Marshal.SizeOf(typeof(uint)));
}
}
catch
{
//
}
catch { }
}

private static async Task ExtractArchive()
Expand Down
14 changes: 8 additions & 6 deletions src/Library/Sucrose.Memory/Readonly.cs
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,12 @@ public static class Readonly

public static readonly string YouTubeContent = "YouTubeContent.html";

public static readonly string WebViewLive = "Sucrose.Live.WebView.exe";
public static readonly string GitHubWebsite = "https://api.github.com";

public static readonly string ValueSeparator = $"{ValueSeparatorChar}";

public static readonly string WebViewLive = "Sucrose.Live.WebView.exe";

public static readonly string Backgroundog = "Sucrose.Backgroundog.exe";

public static readonly string LogDescription = "SucroseWatchdog Thread";
Expand All @@ -164,7 +166,7 @@ public static class Readonly

public static readonly string PortalMutex = "{Sucrose-Wallpaper-Engine-Portal}";

public static readonly string SoferityWebsite = $"https://sucrose.soferity.com";
public static readonly string SoferityWebsite = "https://sucrose.soferity.com";

public static readonly string UpdateMutex = "{Sucrose-Wallpaper-Engine-Update}";

Expand All @@ -176,11 +178,11 @@ public static class Readonly

public static readonly string ReportdogMutex = "{Sucrose-Wallpaper-Engine-Reportdog}";

public static readonly string UserAgent = "Sucrose/1.7 (Wallpaper Engine) SucroseWebKit";

public static readonly string BrowseWebsite = $"https://github.com/{Owner}/{Repository}";

public static readonly string KeyYouTube = $"https://www.youtube.com/watch?v=kRyML8axJxA";
public static readonly string UserAgent = "Sucrose/1.7 (Wallpaper Engine) SucroseWebKit";

public static readonly string KeyYouTube = "https://www.youtube.com/watch?v=kRyML8axJxA";

public static readonly string SoferityRawWebsite = $"{SoferityWebsite}/{StoreRepository}";

Expand All @@ -206,7 +208,7 @@ public static class Readonly

public static readonly string AppDataPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);

public static readonly string DownloadStore = $"https://apps.microsoft.com/detail/XP8JGPBHTJGLCQ?launch=true&mode=full";
public static readonly string DownloadStore = "https://apps.microsoft.com/detail/XP8JGPBHTJGLCQ?launch=true&mode=full";

public static readonly string GitHubRawWebsite = $"https://raw.githubusercontent.com/{Owner}/{StoreRepository}/{Branch}";

Expand Down
8 changes: 4 additions & 4 deletions src/Library/Sucrose.Resources/Styles/ScrollBar.xaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:cor="clr-namespace:System;assembly=mscorlib">
xmlns:system="clr-namespace:System;assembly=mscorlib">

<cor:Double x:Key="ScrollBarWidth">16</cor:Double>
<cor:Double x:Key="ScrollBarArrowWidth">8</cor:Double>
<cor:Double x:Key="ScrollBarArrowHeight">4</cor:Double>
<system:Double x:Key="ScrollBarWidth">16</system:Double>
<system:Double x:Key="ScrollBarArrowWidth">8</system:Double>
<system:Double x:Key="ScrollBarArrowHeight">4</system:Double>

<SolidColorBrush x:Key="ScrollBarTrackBrush" Color="#222222" />
<SolidColorBrush x:Key="ScrollBarButtonBackgroundBrush" Color="#333333" />
Expand Down
4 changes: 2 additions & 2 deletions src/Portal/Sucrose.Portal/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
x:Class="Sucrose.Portal.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:cor="clr-namespace:System;assembly=mscorlib"
xmlns:helpers="clr-namespace:Sucrose.Portal.Helpers"
xmlns:system="clr-namespace:System;assembly=mscorlib"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
xmlns:xf="clr-namespace:XamlFlair;assembly=XamlFlair.WPF">
<Application.Resources>
Expand All @@ -18,7 +18,7 @@
<ResourceDictionary Source="/Sucrose.Resources;component/Locales/Locale.EN.xaml" />
</ResourceDictionary.MergedDictionaries>

<cor:Double x:Key="NormalScaleFactor">1.05</cor:Double>
<system:Double x:Key="NormalScaleFactor">1.05</system:Double>

<xf:AnimationSettings
x:Key="Entered"
Expand Down
41 changes: 22 additions & 19 deletions src/Portal/Sucrose.Portal/Views/Pages/Store/FullStorePage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,32 +50,35 @@ internal FullStorePage(SSSIR Root)

Categories.Add(AllMenu);

foreach (KeyValuePair<string, SSSIC> Category in Root.Categories)
if (Root != null && Root.Categories != null && Root.Categories.Any())
{
if (Category.Value.Wallpapers.Any() && (SMMM.Adult || Category.Value.Wallpapers.Count(Wallpaper => Wallpaper.Value.Adult) != Category.Value.Wallpapers.Count()))
foreach (KeyValuePair<string, SSSIC> Category in Root.Categories)
{
SymbolRegular Symbol = SPMI.DefaultIcon;

SymbolTip = new()
if (Category.Value.Wallpapers.Any() && (SMMM.Adult || Category.Value.Wallpapers.Count(Wallpaper => Wallpaper.Value.Adult) != Category.Value.Wallpapers.Count()))
{
Content = SRER.GetValue("Portal", "Category", Category.Key.Replace(" ", ""))
};
SymbolRegular Symbol = SPMI.DefaultIcon;

if (SPMI.CategoryIcons.TryGetValue(Category.Key, out SymbolRegular Icon))
{
Symbol = Icon;
}
SymbolTip = new()
{
Content = SRER.GetValue("Portal", "Category", Category.Key.Replace(" ", ""))
};

NavigationViewItem Menu = new(SRER.GetValue("Portal", "Category", Category.Key.Replace(" ", "")), Symbol, null)
{
Tag = Category.Key,
ToolTip = SymbolTip,
IsActive = SPMI.CategoryService.CategoryTag == Category.Key
};
if (SPMI.CategoryIcons.TryGetValue(Category.Key, out SymbolRegular Icon))
{
Symbol = Icon;
}

Menu.Click += (s, e) => CategoryClick(s);
NavigationViewItem Menu = new(SRER.GetValue("Portal", "Category", Category.Key.Replace(" ", "")), Symbol, null)
{
Tag = Category.Key,
ToolTip = SymbolTip,
IsActive = SPMI.CategoryService.CategoryTag == Category.Key
};

Categories.Add(Menu);
Menu.Click += (s, e) => CategoryClick(s);

Categories.Add(Menu);
}
}
}

Expand Down
5 changes: 1 addition & 4 deletions src/Shared/Sucrose.Shared.Launcher/Helper/Radius.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@ public static void Corner(ContextMenuStrip ContextMenu)

SWNM.DwmSetWindowAttribute(ContextMenu.Handle, Attribute, ref Preference, (uint)Marshal.SizeOf(typeof(uint)));
}
catch
{
//
}
catch { }
}
}
}
40 changes: 11 additions & 29 deletions src/Shared/Sucrose.Shared.Launcher/Manager/TrayIconManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
using SSLCU = Sucrose.Shared.Launcher.Command.Update;
using SSLHC = Sucrose.Shared.Launcher.Helper.Calculate;
using SSLHR = Sucrose.Shared.Launcher.Helper.Radius;
using SSLMI = Sucrose.Shared.Launcher.Manage.Internal;
using SSLPE = Sucrose.Shared.Launcher.Command.Property;
using SSLRDR = Sucrose.Shared.Launcher.Renderer.DarkRenderer;
using SSLRLR = Sucrose.Shared.Launcher.Renderer.LightRenderer;
Expand Down Expand Up @@ -79,21 +80,10 @@ public void Initialize()
ContextMenu.Renderer = new SSLRLR();
}

ToolStripItem Interface = new ToolStripMenuItem();

if (SSSHP.Work(SSSMI.Portal))
{
Interface = new ToolStripMenuItem(SRER.GetValue("Launcher", "OpenText"), Image.FromFile(SSSHA.Get(SRER.GetValue("Launcher", "OpenIcon"))))
{
Enabled = false
};
}
else
ContextMenu.Items.Add(new ToolStripMenuItem(SRER.GetValue("Launcher", "OpenText"), Image.FromFile(SSSHA.Get(SRER.GetValue("Launcher", "OpenIcon"))), CommandInterface)
{
Interface = new ToolStripMenuItem(SRER.GetValue("Launcher", "OpenText"), Image.FromFile(SSSHA.Get(SRER.GetValue("Launcher", "OpenIcon"))), CommandInterface);
}

ContextMenu.Items.Add(Interface);
Enabled = !SSSHP.Work(SSSMI.Portal)
});

SSLSSS Separator1 = new(SSDMM.ThemeType);

Expand Down Expand Up @@ -212,23 +202,15 @@ public void Initialize()
SSLSSS Separator2 = new(SSDMM.ThemeType);
ContextMenu.Items.Add(Separator2.Strip);

ToolStripItem Setting = new ToolStripMenuItem();

if (SSSHP.Work(SSSMI.Portal))
ContextMenu.Items.Add(new ToolStripMenuItem(SRER.GetValue("Launcher", "SettingText"), Image.FromFile(SSSHA.Get(SRER.GetValue("Launcher", "SettingIcon"))), CommandSetting)
{
Setting = new ToolStripMenuItem(SRER.GetValue("Launcher", "SettingText"), Image.FromFile(SSSHA.Get(SRER.GetValue("Launcher", "SettingIcon"))))
{
Enabled = false
};
}
else
{
Setting = new ToolStripMenuItem(SRER.GetValue("Launcher", "SettingText"), Image.FromFile(SSSHA.Get(SRER.GetValue("Launcher", "SettingIcon"))), CommandSetting);
}

ContextMenu.Items.Add(Setting);
Enabled = !SSSHP.Work(SSSMI.Portal)
});

ContextMenu.Items.Add(SRER.GetValue("Launcher", "ReportText"), Image.FromFile(SSSHA.Get(SRER.GetValue("Launcher", "ReportIcon"))), CommandReport);
ContextMenu.Items.Add(new ToolStripMenuItem(SRER.GetValue("Launcher", "ReportText"), Image.FromFile(SSSHA.Get(SRER.GetValue("Launcher", "ReportIcon"))), CommandReport)
{
Enabled = SSLMI.ReportBox
});

ToolStripItem Update = new ToolStripMenuItem();

Expand Down
19 changes: 15 additions & 4 deletions src/Update/Sucrose.Update/View/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
using SSCMM = Sucrose.Shared.Core.Manage.Manager;
using SSDECDT = Sucrose.Shared.Dependency.Enum.CommandType;
using SSDECYT = Sucrose.Shared.Dependency.Enum.CompatibilityType;
using SSDEUST = Sucrose.Shared.Dependency.Enum.UpdateServerType;
using SSDMM = Sucrose.Shared.Dependency.Manage.Manager;
using SSESSE = Skylark.Standard.Extension.Storage.StorageExtension;
using SSHG = Skylark.Standard.Helper.GitHub;
using SSIIA = Skylark.Standard.Interface.IAssets;
Expand Down Expand Up @@ -117,10 +119,7 @@ private void WindowCorner()
SWNM.DwmSetWindowAttribute(SWHWI.Handle(this), Attribute, ref Preference, (uint)Marshal.SizeOf(typeof(uint)));
}
}
catch
{
//
}
catch { }
}

private async Task Start()
Expand Down Expand Up @@ -335,6 +334,18 @@ private bool StepReleases()
{
Message.Text = SRER.GetValue("Update", "MessageText", "Listing");

switch (SSDMM.UpdateServerType)
{
case SSDEUST.GitHub:
SSHG.SetUri(SMR.GitHubWebsite);
break;
case SSDEUST.Soferity:
SSHG.SetUri(SMR.SoferityWebsite);
break;
default:
break;
}

Releases = SSHG.ReleasesList(SMR.Owner, SMR.Repository, SMMM.UserAgent, SMMM.Key);

if (Releases.Any())
Expand Down

0 comments on commit 1682b47

Please sign in to comment.