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 bebc896 commit d4e2096
Show file tree
Hide file tree
Showing 30 changed files with 373 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
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 SSCHA = Sucrose.Shared.Core.Helper.Architecture;
using SSCHF = Sucrose.Shared.Core.Helper.Framework;
Expand Down Expand Up @@ -202,6 +203,22 @@ private void OnChangeTheme()
}
}

[RelayCommand]
private async Task OnOtherHelp()
{
SPVCOH OtherHelp = new();

await OtherHelp.ShowAsync();

OtherHelp.Dispose();
}

[RelayCommand]
private async Task OnOtherAbout()
{

}

[RelayCommand]
private async Task OnDisplayPreferences()
{
Expand Down
75 changes: 75 additions & 0 deletions src/Portal/Sucrose.Portal/Views/Controls/OtherHelp.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<ui:ContentDialog
x:Class="Sucrose.Portal.Views.Controls.OtherHelp"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vcontrols="clr-namespace:Sucrose.Portal.Views.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Sucrose.Portal.Views.Controls"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
CloseButtonText="{DynamicResource Portal.OtherHelp.Close}"
Title="{DynamicResource Portal.OtherHelp.Title}"
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">
<vcontrols:ExpanderCard.HeaderFrame>
<ui:Button
Cursor="Hand"
Click="WebPage_Click"
Appearance="Transparent"
BorderBrush="Transparent"
Icon="{ui:SymbolIcon LinkSquare24}" />
</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.HeaderFrame>
<ui:Button
Cursor="Hand"
Appearance="Transparent"
BorderBrush="Transparent"
Click="Documentation_Click"
Icon="{ui:SymbolIcon LinkSquare24}" />
</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.HeaderFrame>
<ui:Button
Cursor="Hand"
Appearance="Transparent"
Click="Discussions_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.HeaderFrame>
<ui:Button
Cursor="Hand"
Appearance="Transparent"
Click="Repository_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.HeaderFrame>
<ui:Button
Cursor="Hand"
Click="Report_Click"
Appearance="Transparent"
BorderBrush="Transparent"
Icon="{ui:SymbolIcon LinkSquare24}" />
</vcontrols:ExpanderCard.HeaderFrame>
</vcontrols:ExpanderCard>
</StackPanel>
</ui:ContentDialog>
48 changes: 48 additions & 0 deletions src/Portal/Sucrose.Portal/Views/Controls/OtherHelp.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
using System.Windows;
using Wpf.Ui.Controls;
using SPMI = Sucrose.Portal.Manage.Internal;

namespace Sucrose.Portal.Views.Controls
{
/// <summary>
/// OtherHelp.xaml etkileşim mantığı
/// </summary>
public partial class OtherHelp : ContentDialog, IDisposable
{
public OtherHelp() : base(SPMI.ContentDialogService.GetContentPresenter())
{
InitializeComponent();
}

private void Report_Click(object sender, RoutedEventArgs e)
{

}

private void WebPage_Click(object sender, RoutedEventArgs e)
{

}

private void Repository_Click(object sender, RoutedEventArgs e)
{

}

private void Discussions_Click(object sender, RoutedEventArgs e)
{

}

private void Documentation_Click(object sender, RoutedEventArgs e)
{

}

public void Dispose()
{
GC.Collect();
GC.SuppressFinalize(this);
}
}
}
28 changes: 27 additions & 1 deletion src/Portal/Sucrose.Portal/Views/Windows/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
WindowStartupLocation="CenterScreen"
SizeChanged="MainWindow_SizeChanged"
mc:Ignorable="d">

<Grid>
<Grid.Background>
<ImageBrush ImageSource="{Binding ViewModel.Backgrounder, Mode=OneWay}" Stretch="{Binding ViewModel.Stretch, Mode=OneWay}" Opacity="{Binding ViewModel.Opacity, Mode=OneWay}" />
Expand Down Expand Up @@ -200,6 +200,32 @@
Icon="{ui:SymbolIcon DrinkMargarita16}"
Visibility="{Binding ViewModel.Donater, Mode=OneWay}"
ToolTipService.ToolTip="{DynamicResource Portal.MainWindow.MenuDonateOptionsTip}" />
<ui:Button
Cursor="Hand"
Margin="0 0 5 0"
x:Name="OtherOptions"
Appearance="Transparent"
BorderBrush="Transparent"
Click="OtherOptions_Click"
Icon="{ui:SymbolIcon MoreVertical16}"
ToolTipService.ToolTip="{DynamicResource Portal.MainWindow.MenuOtherOptionsTip}">
<ui:Button.ContextMenu>
<ContextMenu Background="{DynamicResource SolidBackgroundFillColorQuarternaryBrush}" Placement="Bottom" Opacity="0.9">
<ui:MenuItem
Cursor="Hand"
Icon="{ui:SymbolIcon Question24}"
Header="{DynamicResource Portal.MainWindow.MenuHelp}"
Command="{Binding ViewModel.OtherHelpCommand, Mode=OneWay}"
ToolTipService.ToolTip="{DynamicResource Portal.MainWindow.MenuHelpTip}" />
<ui:MenuItem
Cursor="Hand"
Icon="{ui:SymbolIcon ChatBubblesQuestion24}"
Header="{DynamicResource Portal.MainWindow.MenuAbout}"
Command="{Binding ViewModel.OtherAboutCommand, Mode=OneWay}"
ToolTipService.ToolTip="{DynamicResource Portal.MainWindow.MenuAboutTip}" />
</ContextMenu>
</ui:Button.ContextMenu>
</ui:Button>
<ui:NavigationViewItemSeparator Background="{DynamicResource TextFillColorSecondaryBrush}" />
<!--<Separator VerticalAlignment="Stretch" Width="1" Background="{DynamicResource TextFillColorSecondaryBrush}" />-->
</DockPanel>
Expand Down
10 changes: 8 additions & 2 deletions src/Portal/Sucrose.Portal/Views/Windows/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,11 @@ private void ApplySearch(double Width)
{
if (ViewModel.Donater == Visibility.Visible)
{
SearchBox.Margin = new Thickness(0, 0, ((Width - SearchBox.MaxWidth) / 2) - 210, 0);
SearchBox.Margin = new Thickness(0, 0, ((Width - SearchBox.MaxWidth) / 2) - 230, 0);
}
else
{
SearchBox.Margin = new Thickness(0, 0, ((Width - SearchBox.MaxWidth) / 2) - 190, 0);
SearchBox.Margin = new Thickness(0, 0, ((Width - SearchBox.MaxWidth) / 2) - 210, 0);
}
}

Expand Down Expand Up @@ -177,6 +177,12 @@ private void ThemeChange_click(object sender, RoutedEventArgs e)
Dispose();
}

private void OtherOptions_Click(object sender, RoutedEventArgs e)
{
OtherOptions.ContextMenu.PlacementTarget = OtherOptions;
OtherOptions.ContextMenu.IsOpen = true;
}

private void MainWindow_ContentRendered(object sender, EventArgs e)
{
Topmost = false;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<ResourceDictionary
xmlns:system="clr-namespace:System;assembly=mscorlib"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
>
<system:String x:Key="Portal.OtherAbout.Title">Hakkında</system:String>
<system:String x:Key="Portal.OtherAbout.Close">Kapat</system:String>
</ResourceDictionary>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<ResourceDictionary
xmlns:system="clr-namespace:System;assembly=mscorlib"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
>
<system:String x:Key="Portal.OtherAbout.Title">Hakkında</system:String>
<system:String x:Key="Portal.OtherAbout.Close">Kapat</system:String>
</ResourceDictionary>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<ResourceDictionary
xmlns:system="clr-namespace:System;assembly=mscorlib"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
>
<system:String x:Key="Portal.OtherAbout.Title">Hakkında</system:String>
<system:String x:Key="Portal.OtherAbout.Close">Kapat</system:String>
</ResourceDictionary>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<ResourceDictionary
xmlns:system="clr-namespace:System;assembly=mscorlib"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
>
<system:String x:Key="Portal.OtherAbout.Title">Hakkında</system:String>
<system:String x:Key="Portal.OtherAbout.Close">Kapat</system:String>
</ResourceDictionary>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<ResourceDictionary
xmlns:system="clr-namespace:System;assembly=mscorlib"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
>
<system:String x:Key="Portal.OtherAbout.Title">Hakkında</system:String>
<system:String x:Key="Portal.OtherAbout.Close">Kapat</system:String>
</ResourceDictionary>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<ResourceDictionary
xmlns:system="clr-namespace:System;assembly=mscorlib"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
>
<system:String x:Key="Portal.OtherAbout.Title">Hakkında</system:String>
<system:String x:Key="Portal.OtherAbout.Close">Kapat</system:String>
</ResourceDictionary>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<ResourceDictionary
xmlns:system="clr-namespace:System;assembly=mscorlib"
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>
</ResourceDictionary>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<ResourceDictionary
xmlns:system="clr-namespace:System;assembly=mscorlib"
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>
</ResourceDictionary>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<ResourceDictionary
xmlns:system="clr-namespace:System;assembly=mscorlib"
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>
</ResourceDictionary>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<ResourceDictionary
xmlns:system="clr-namespace:System;assembly=mscorlib"
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>
</ResourceDictionary>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<ResourceDictionary
xmlns:system="clr-namespace:System;assembly=mscorlib"
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>
</ResourceDictionary>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<ResourceDictionary
xmlns:system="clr-namespace:System;assembly=mscorlib"
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>
</ResourceDictionary>
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="OtherHelp/Portal.OtherHelp.DE.xaml" />
<ResourceDictionary Source="ThemeEdit/Portal.ThemeEdit.DE.xaml" />
<ResourceDictionary Source="StoreCard/Portal.StoreCard.DE.xaml" />
<ResourceDictionary Source="OtherAbout/Portal.OtherAbout.DE.xaml" />
<ResourceDictionary Source="Pagination/Portal.Pagination.DE.xaml" />
<ResourceDictionary Source="ThemeShare/Portal.ThemeShare.DE.xaml" />
<ResourceDictionary Source="LibraryCard/Portal.LibraryCard.DE.xaml" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="OtherHelp/Portal.OtherHelp.EN.xaml" />
<ResourceDictionary Source="ThemeEdit/Portal.ThemeEdit.EN.xaml" />
<ResourceDictionary Source="StoreCard/Portal.StoreCard.EN.xaml" />
<ResourceDictionary Source="OtherAbout/Portal.OtherAbout.EN.xaml" />
<ResourceDictionary Source="Pagination/Portal.Pagination.EN.xaml" />
<ResourceDictionary Source="ThemeShare/Portal.ThemeShare.EN.xaml" />
<ResourceDictionary Source="LibraryCard/Portal.LibraryCard.EN.xaml" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="OtherHelp/Portal.OtherHelp.ES.xaml" />
<ResourceDictionary Source="ThemeEdit/Portal.ThemeEdit.ES.xaml" />
<ResourceDictionary Source="StoreCard/Portal.StoreCard.ES.xaml" />
<ResourceDictionary Source="OtherAbout/Portal.OtherAbout.ES.xaml" />
<ResourceDictionary Source="Pagination/Portal.Pagination.ES.xaml" />
<ResourceDictionary Source="ThemeShare/Portal.ThemeShare.ES.xaml" />
<ResourceDictionary Source="LibraryCard/Portal.LibraryCard.ES.xaml" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="OtherHelp/Portal.OtherHelp.FR.xaml" />
<ResourceDictionary Source="ThemeEdit/Portal.ThemeEdit.FR.xaml" />
<ResourceDictionary Source="StoreCard/Portal.StoreCard.FR.xaml" />
<ResourceDictionary Source="OtherAbout/Portal.OtherAbout.FR.xaml" />
<ResourceDictionary Source="Pagination/Portal.Pagination.FR.xaml" />
<ResourceDictionary Source="ThemeShare/Portal.ThemeShare.FR.xaml" />
<ResourceDictionary Source="LibraryCard/Portal.LibraryCard.FR.xaml" />
Expand Down
Loading

0 comments on commit d4e2096

Please sign in to comment.