Skip to content

Commit

Permalink
Preparing Help Dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
Taiizor committed Oct 16, 2023
1 parent d4e2096 commit 86f8763
Show file tree
Hide file tree
Showing 13 changed files with 161 additions and 29 deletions.
6 changes: 6 additions & 0 deletions src/Library/Sucrose.Memory/Readonly.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,20 @@ public static class Readonly

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

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

public static readonly string BackgroundogMutex = "{Sucrose-Wallpaper-Engine-Backgroundog}";

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

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

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

public static readonly string DesktopPath = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);

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

public static readonly string ReportWebsite = $"https://github.com/{Owner}/{Repository}/issues/new/choose";

public static readonly string DownloadWebsite = $"https://github.com/{Owner}/{Repository}/releases/latest";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
using SPEIL = Sucrose.Portal.Extension.ImageLoader;
using SPMI = Sucrose.Portal.Manage.Internal;
using SPMM = Sucrose.Portal.Manage.Manager;
using SPVCOH = Sucrose.Portal.Views.Controls.OtherHelp;
using SPVCDP = Sucrose.Portal.Views.Controls.DisplayPreferences;
using SPVCOH = Sucrose.Portal.Views.Controls.OtherHelp;
using SSCHA = Sucrose.Shared.Core.Helper.Architecture;
using SSCHF = Sucrose.Shared.Core.Helper.Framework;
using SSCHM = Sucrose.Shared.Core.Helper.Memory;
Expand Down
17 changes: 9 additions & 8 deletions src/Portal/Sucrose.Portal/Views/Controls/OtherHelp.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
CloseButtonText="{DynamicResource Portal.OtherHelp.Close}"
Title="{DynamicResource Portal.OtherHelp.Title}"
Loaded="ContentDialog_Loaded"
DialogMaxWidth="750"
mc:Ignorable="d">

<ui:ContentDialog.Resources>
<Style BasedOn="{StaticResource {x:Type ui:ContentDialog}}" TargetType="{x:Type local:OtherHelp}" />
</ui:ContentDialog.Resources>

<StackPanel x:Name="Panel" HorizontalAlignment="Stretch" VerticalAlignment="Center" Orientation="Vertical" MinWidth="400">
<vcontrols:ExpanderCard TitleText="İnternet Sayfası" DescriptionText="Sucrose Wallpaper Engine resmi internet sayfası" LeftIconSymbol="WebAsset24" Expandable="False">
<StackPanel HorizontalAlignment="Stretch" VerticalAlignment="Center" Orientation="Vertical" MinWidth="400">
<vcontrols:ExpanderCard x:Name="WebPage" LeftIconSymbol="WebAsset24" Expandable="False">
<vcontrols:ExpanderCard.HeaderFrame>
<ui:Button
Cursor="Hand"
Expand All @@ -28,7 +29,7 @@
</vcontrols:ExpanderCard.HeaderFrame>
</vcontrols:ExpanderCard>

<vcontrols:ExpanderCard TitleText="Dokümantasyon" DescriptionText="Sucrose Wallpaper Engine resmi dökümantasyon sayfası" LeftIconSymbol="BookOpenGlobe24" Margin="0 3 0 0" Expandable="False">
<vcontrols:ExpanderCard x:Name="Documentation" LeftIconSymbol="BookOpenGlobe24" Margin="0 3 0 0" Expandable="False">
<vcontrols:ExpanderCard.HeaderFrame>
<ui:Button
Cursor="Hand"
Expand All @@ -39,29 +40,29 @@
</vcontrols:ExpanderCard.HeaderFrame>
</vcontrols:ExpanderCard>

<vcontrols:ExpanderCard TitleText="Tartışmalar" DescriptionText="Sucrose Wallpaper Engine resmi tartışmalar sayfası" LeftIconSymbol="GlobePerson24" Margin="0 3 0 0" Expandable="False">
<vcontrols:ExpanderCard x:Name="Repository" LeftIconSymbol="CodeBlock24" Margin="0 3 0 0" Expandable="False">
<vcontrols:ExpanderCard.HeaderFrame>
<ui:Button
Cursor="Hand"
Appearance="Transparent"
Click="Discussions_Click"
Click="Repository_Click"
BorderBrush="Transparent"
Icon="{ui:SymbolIcon LinkSquare24}" />
</vcontrols:ExpanderCard.HeaderFrame>
</vcontrols:ExpanderCard>

<vcontrols:ExpanderCard TitleText="Kaynak Kodu" DescriptionText="Sucrose Wallpaper Engine resmi kaynak kodu sayfası" LeftIconSymbol="CodeBlock24" Margin="0 3 0 0" Expandable="False">
<vcontrols:ExpanderCard x:Name="Discussions" LeftIconSymbol="GlobePerson24" Margin="0 3 0 0" Expandable="False">
<vcontrols:ExpanderCard.HeaderFrame>
<ui:Button
Cursor="Hand"
Appearance="Transparent"
Click="Repository_Click"
Click="Discussions_Click"
BorderBrush="Transparent"
Icon="{ui:SymbolIcon LinkSquare24}" />
</vcontrols:ExpanderCard.HeaderFrame>
</vcontrols:ExpanderCard>

<vcontrols:ExpanderCard TitleText="Hata Bildir" DescriptionText="Sucrose Wallpaper Engine resmi hata bildirme sayfası" LeftIconSymbol="Bug24" Margin="0 3 0 0" Expandable="False">
<vcontrols:ExpanderCard x:Name="Report" LeftIconSymbol="Bug24" Margin="0 3 0 0" Expandable="False">
<vcontrols:ExpanderCard.HeaderFrame>
<ui:Button
Cursor="Hand"
Expand Down
31 changes: 27 additions & 4 deletions src/Portal/Sucrose.Portal/Views/Controls/OtherHelp.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
using System.Windows;
using Wpf.Ui.Controls;
using SMR = Sucrose.Memory.Readonly;
using SPMI = Sucrose.Portal.Manage.Internal;
using SSDECT = Sucrose.Shared.Dependency.Enum.CommandsType;
using SSRER = Sucrose.Shared.Resources.Extension.Resources;
using SSSHP = Sucrose.Shared.Space.Helper.Processor;
using SSSMI = Sucrose.Shared.Space.Manage.Internal;

namespace Sucrose.Portal.Views.Controls
{
Expand All @@ -16,27 +21,45 @@ public OtherHelp() : base(SPMI.ContentDialogService.GetContentPresenter())

private void Report_Click(object sender, RoutedEventArgs e)
{

SSSHP.Run(SSSMI.Commandog, $"{SMR.StartCommand}{SSDECT.Report}{SMR.ValueSeparator}{SMR.ReportWebsite}");
}

private void WebPage_Click(object sender, RoutedEventArgs e)
{

SSSHP.Run(SSSMI.Commandog, $"{SMR.StartCommand}{SSDECT.Official}{SMR.ValueSeparator}{SMR.OfficialWebsite}");
}

private void Repository_Click(object sender, RoutedEventArgs e)
{

SSSHP.Run(SSSMI.Commandog, $"{SMR.StartCommand}{SSDECT.Repository}{SMR.ValueSeparator}{SMR.RepositoryWebsite}");
}

private void Discussions_Click(object sender, RoutedEventArgs e)
{

SSSHP.Run(SSSMI.Commandog, $"{SMR.StartCommand}{SSDECT.Discussions}{SMR.ValueSeparator}{SMR.DiscussionsWebsite}");
}

private void Documentation_Click(object sender, RoutedEventArgs e)
{
SSSHP.Run(SSSMI.Commandog, $"{SMR.StartCommand}{SSDECT.Wiki}{SMR.ValueSeparator}{SMR.WikiWebsite}");
}

private void ContentDialog_Loaded(object sender, RoutedEventArgs e)
{
WebPage.TitleText = SSRER.GetValue("Portal", "OtherHelp", "WebPage");
WebPage.DescriptionText = SSRER.GetValue("Portal", "OtherHelp", "WebPage", "Description");

Documentation.TitleText = SSRER.GetValue("Portal", "OtherHelp", "Documentation");
Documentation.DescriptionText = SSRER.GetValue("Portal", "OtherHelp", "Documentation", "Description");

Repository.TitleText = SSRER.GetValue("Portal", "OtherHelp", "Repository");
Repository.DescriptionText = SSRER.GetValue("Portal", "OtherHelp", "Repository", "Description");

Discussions.TitleText = SSRER.GetValue("Portal", "OtherHelp", "Discussions");
Discussions.DescriptionText = SSRER.GetValue("Portal", "OtherHelp", "Discussions", "Description");

Report.TitleText = SSRER.GetValue("Portal", "OtherHelp", "Report");
Report.DescriptionText = SSRER.GetValue("Portal", "OtherHelp", "Report", "Description");
}

public void Dispose()
Expand Down
9 changes: 9 additions & 0 deletions src/Project/Sucrose.Commandog/Helper/Arguments.cs
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ public static async Task Parse(string[] Arguments)
case SSDECT.StartupP:
SWHWSP.SetStartup(SCHP.ArgumentValue<string>(Values[0]), SCHP.ArgumentValue<bool>(Values[1]));
break;
case SSDECT.Official:
SSSHP.Run(SCHP.ArgumentValue<string>(Values[0]));
break;
case SSDECT.Scheduler:
switch (SCHP.ArgumentValue<SSDESCT>(Values[0]))
{
Expand Down Expand Up @@ -146,6 +149,12 @@ public static async Task Parse(string[] Arguments)
SSSHP.Run(SCHP.ArgumentValue<string>(Values[0]));
}
break;
case SSDECT.Repository:
SSSHP.Run(SCHP.ArgumentValue<string>(Values[0]));
break;
case SSDECT.Discussions:
SSSHP.Run(SCHP.ArgumentValue<string>(Values[0]));
break;
case SSDECT.Backgroundog:
SSSHP.Run(SCHP.ArgumentValue<string>(Values[0]), string.Empty);
break;
Expand Down
3 changes: 3 additions & 0 deletions src/Shared/Sucrose.Shared.Dependency/Enum/CommandsType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@ internal enum CommandsType
Startup,
StartupM,
StartupP,
Official,
Scheduler,
Interface,
Repository,
Discussions,
Backgroundog
}

Expand Down
12 changes: 6 additions & 6 deletions src/Shared/Sucrose.Shared.Resources/Locales/Locale.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
>
<system:String x:Key="Locale.DE">Deutsch (v0.3)</system:String>
<system:String x:Key="Locale.EN">English (v0.5)</system:String>
<system:String x:Key="Locale.ES">Español (v0.3)</system:String>
<system:String x:Key="Locale.FR">Français (v0.3)</system:String>
<system:String x:Key="Locale.DE">Deutsch (v0.4)</system:String>
<system:String x:Key="Locale.EN">English (v0.6)</system:String>
<system:String x:Key="Locale.ES">Español (v0.4)</system:String>
<system:String x:Key="Locale.FR">Français (v0.4)</system:String>
<system:String x:Key="Locale.JA">日本語 (v0.0)</system:String>
<system:String x:Key="Locale.PL">Polski (v0.3)</system:String>
<system:String x:Key="Locale.TR">Türkçe (v0.6)</system:String>
<system:String x:Key="Locale.PL">Polski (v0.4)</system:String>
<system:String x:Key="Locale.TR">Türkçe (v0.7)</system:String>
</ResourceDictionary>
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,21 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
>
<system:String x:Key="Portal.OtherHelp.Title">Yardım</system:String>
<system:String x:Key="Portal.OtherHelp.Close">Kapat</system:String>
<system:String x:Key="Portal.OtherHelp.Title">Hilfe</system:String>
<system:String x:Key="Portal.OtherHelp.Close">Schließen</system:String>

<system:String x:Key="Portal.OtherHelp.WebPage">Webseite</system:String>
<system:String x:Key="Portal.OtherHelp.WebPage.Description">Offizielle Sucrose Wallpaper Engine Webseite</system:String>

<system:String x:Key="Portal.OtherHelp.Documentation">Dokumentation</system:String>
<system:String x:Key="Portal.OtherHelp.Documentation.Description">Offizielle Sucrose Wallpaper Engine Dokumentationsseite</system:String>

<system:String x:Key="Portal.OtherHelp.Repository">Quellcode</system:String>
<system:String x:Key="Portal.OtherHelp.Repository.Description">Offizielle Sucrose Wallpaper Engine Quellcode-Seite</system:String>

<system:String x:Key="Portal.OtherHelp.Discussions">Diskussionen</system:String>
<system:String x:Key="Portal.OtherHelp.Discussions.Description">Offizielle Sucrose Wallpaper Engine Diskussionen-Seite</system:String>

<system:String x:Key="Portal.OtherHelp.Report">Fehler Melden</system:String>
<system:String x:Key="Portal.OtherHelp.Report.Description">Offizielle Sucrose Wallpaper Engine Fehlermeldungsseite</system:String>
</ResourceDictionary>
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,21 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
>
<system:String x:Key="Portal.OtherHelp.Title">Yardım</system:String>
<system:String x:Key="Portal.OtherHelp.Close">Kapat</system:String>
<system:String x:Key="Portal.OtherHelp.Title">Help</system:String>
<system:String x:Key="Portal.OtherHelp.Close">Close</system:String>

<system:String x:Key="Portal.OtherHelp.WebPage">Web Page</system:String>
<system:String x:Key="Portal.OtherHelp.WebPage.Description">Official Sucrose Wallpaper Engine web page</system:String>

<system:String x:Key="Portal.OtherHelp.Documentation">Documentation</system:String>
<system:String x:Key="Portal.OtherHelp.Documentation.Description">Official Sucrose Wallpaper Engine documentation page</system:String>

<system:String x:Key="Portal.OtherHelp.Repository">Source Code</system:String>
<system:String x:Key="Portal.OtherHelp.Repository.Description">Official Sucrose Wallpaper Engine source code page</system:String>

<system:String x:Key="Portal.OtherHelp.Discussions">Discussions</system:String>
<system:String x:Key="Portal.OtherHelp.Discussions.Description">Official Sucrose Wallpaper Engine discussions page</system:String>

<system:String x:Key="Portal.OtherHelp.Report">Report Issue</system:String>
<system:String x:Key="Portal.OtherHelp.Report.Description">Official Sucrose Wallpaper Engine issue reporting page</system:String>
</ResourceDictionary>
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,21 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
>
<system:String x:Key="Portal.OtherHelp.Title">Yardım</system:String>
<system:String x:Key="Portal.OtherHelp.Close">Kapat</system:String>
<system:String x:Key="Portal.OtherHelp.Title">Ayuda</system:String>
<system:String x:Key="Portal.OtherHelp.Close">Cerrar</system:String>

<system:String x:Key="Portal.OtherHelp.WebPage">Página Web</system:String>
<system:String x:Key="Portal.OtherHelp.WebPage.Description">Página web oficial de Sucrose Wallpaper Engine</system:String>

<system:String x:Key="Portal.OtherHelp.Documentation">Documentación</system:String>
<system:String x:Key="Portal.OtherHelp.Documentation.Description">Página de documentación oficial de Sucrose Wallpaper Engine</system:String>

<system:String x:Key="Portal.OtherHelp.Repository">Código Fuente</system:String>
<system:String x:Key="Portal.OtherHelp.Repository.Description">Página de código fuente oficial de Sucrose Wallpaper Engine</system:String>

<system:String x:Key="Portal.OtherHelp.Discussions">Discusiones</system:String>
<system:String x:Key="Portal.OtherHelp.Discussions.Description">Página de discusiones oficial de Sucrose Wallpaper Engine</system:String>

<system:String x:Key="Portal.OtherHelp.Report">Informar Problema</system:String>
<system:String x:Key="Portal.OtherHelp.Report.Description">Página de informe de problemas oficial de Sucrose Wallpaper Engine</system:String>
</ResourceDictionary>
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,21 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
>
<system:String x:Key="Portal.OtherHelp.Title">Yardım</system:String>
<system:String x:Key="Portal.OtherHelp.Close">Kapat</system:String>
<system:String x:Key="Portal.OtherHelp.Title">Aide</system:String>
<system:String x:Key="Portal.OtherHelp.Close">Fermer</system:String>

<system:String x:Key="Portal.OtherHelp.WebPage">Page Web</system:String>
<system:String x:Key="Portal.OtherHelp.WebPage.Description">Page web officielle de Sucrose Wallpaper Engine</system:String>

<system:String x:Key="Portal.OtherHelp.Documentation">Documentation</system:String>
<system:String x:Key="Portal.OtherHelp.Documentation.Description">Page de documentation officielle de Sucrose Wallpaper Engine</system:String>

<system:String x:Key="Portal.OtherHelp.Repository">Code Source</system:String>
<system:String x:Key="Portal.OtherHelp.Repository.Description">Page de code source officielle de Sucrose Wallpaper Engine</system:String>

<system:String x:Key="Portal.OtherHelp.Discussions">Discussions</system:String>
<system:String x:Key="Portal.OtherHelp.Discussions.Description">Page de discussions officielle de Sucrose Wallpaper Engine</system:String>

<system:String x:Key="Portal.OtherHelp.Report">Signaler un Problème</system:String>
<system:String x:Key="Portal.OtherHelp.Report.Description">Page de signalement de problèmes officielle de Sucrose Wallpaper Engine</system:String>
</ResourceDictionary>
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,21 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
>
<system:String x:Key="Portal.OtherHelp.Title">Yardım</system:String>
<system:String x:Key="Portal.OtherHelp.Close">Kapat</system:String>
<system:String x:Key="Portal.OtherHelp.Title">Pomoc</system:String>
<system:String x:Key="Portal.OtherHelp.Close">Zamknij</system:String>

<system:String x:Key="Portal.OtherHelp.WebPage">Strona Internetowa</system:String>
<system:String x:Key="Portal.OtherHelp.WebPage.Description">Oficjalna strona internetowa Sucrose Wallpaper Engine</system:String>

<system:String x:Key="Portal.OtherHelp.Documentation">Dokumentacja</system:String>
<system:String x:Key="Portal.OtherHelp.Documentation.Description">Oficjalna strona dokumentacji Sucrose Wallpaper Engine</system:String>

<system:String x:Key="Portal.OtherHelp.Repository">Kod Źródłowy</system:String>
<system:String x:Key="Portal.OtherHelp.Repository.Description">Oficjalna strona kodu źródłowego Sucrose Wallpaper Engine</system:String>

<system:String x:Key="Portal.OtherHelp.Discussions">Dyskusje</system:String>
<system:String x:Key="Portal.OtherHelp.Discussions.Description">Oficjalna strona dyskusji Sucrose Wallpaper Engine</system:String>

<system:String x:Key="Portal.OtherHelp.Report">Zgłoś Problem</system:String>
<system:String x:Key="Portal.OtherHelp.Report.Description">Oficjalna strona zgłaszania problemów Sucrose Wallpaper Engine</system:String>
</ResourceDictionary>
Loading

0 comments on commit 86f8763

Please sign in to comment.