-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
273 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<ui:ContentDialog | ||
x:Class="Sucrose.Portal.Views.Controls.ThemeDelete" | ||
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: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" | ||
PrimaryButtonText="{DynamicResource Portal.ThemeDelete.Delete}" | ||
CloseButtonText="{DynamicResource Portal.ThemeDelete.Close}" | ||
Title="{DynamicResource Portal.ThemeDelete.Title}" | ||
Loaded="ContentDialog_Loaded" | ||
DialogMaxWidth="750" | ||
mc:Ignorable="d"> | ||
|
||
<ui:ContentDialog.Resources> | ||
<Style BasedOn="{StaticResource {x:Type ui:ContentDialog}}" TargetType="{x:Type local:ThemeDelete}" /> | ||
</ui:ContentDialog.Resources> | ||
|
||
<StackPanel HorizontalAlignment="Stretch" VerticalAlignment="Center" Orientation="Vertical" MinWidth="400"> | ||
<TextBlock x:Name="ThemeTitle" Text="{DynamicResource Portal.ThemeDelete.ThemeTitle}" TextWrapping="WrapWithOverflow" FontSize="16" Foreground="{DynamicResource TextFillColorPrimaryBrush}" /> | ||
<TextBlock x:Name="ThemeDescription" Text="{DynamicResource Portal.ThemeDelete.ThemeDescription}" TextWrapping="WrapWithOverflow" FontSize="14" Foreground="{DynamicResource TextFillColorSecondaryBrush}" /> | ||
|
||
<TextBlock x:Name="ThemeType" Text="{DynamicResource Portal.ThemeDelete.ThemeType}" TextWrapping="WrapWithOverflow" FontSize="16" Margin="0 12 0 0" Foreground="{DynamicResource TextFillColorPrimaryBrush}" /> | ||
<TextBlock x:Name="ThemeTypeName" Text="{DynamicResource Portal.ThemeDelete.ThemeTypeName}" TextWrapping="WrapWithOverflow" FontSize="14" Foreground="{DynamicResource TextFillColorSecondaryBrush}" /> | ||
|
||
<TextBlock x:Name="ThemeAuthor" Text="{DynamicResource Portal.ThemeDelete.ThemeAuthor}" TextWrapping="WrapWithOverflow" FontSize="16" Margin="0 12 0 0" Foreground="{DynamicResource TextFillColorPrimaryBrush}" /> | ||
<TextBlock x:Name="ThemeAuthorName" Text="{DynamicResource Portal.ThemeDelete.ThemeAuthorName}" TextWrapping="WrapWithOverflow" FontSize="14" Foreground="{DynamicResource TextFillColorSecondaryBrush}" /> | ||
|
||
<TextBlock x:Name="ThemeSize" Text="{DynamicResource Portal.ThemeDelete.ThemeSize}" TextWrapping="WrapWithOverflow" FontSize="16" Margin="0 12 0 0" Foreground="{DynamicResource TextFillColorPrimaryBrush}" /> | ||
<TextBlock x:Name="ThemeSizeTotal" Text="{DynamicResource Portal.ThemeDelete.ThemeSizeTotal}" TextWrapping="WrapWithOverflow" FontSize="14" Foreground="{DynamicResource TextFillColorSecondaryBrush}" /> | ||
|
||
<TextBlock x:Name="ThemeVersion" Text="{DynamicResource Portal.ThemeDelete.ThemeVersion}" TextWrapping="WrapWithOverflow" FontSize="16" Margin="0 12 0 0" Foreground="{DynamicResource TextFillColorPrimaryBrush}" /> | ||
<TextBlock x:Name="ThemeVersionText" Text="{DynamicResource Portal.ThemeDelete.ThemeVersionText}" TextWrapping="WrapWithOverflow" FontSize="14" Foreground="{DynamicResource TextFillColorSecondaryBrush}" /> | ||
|
||
<TextBlock x:Name="ThemeCreate" Text="{DynamicResource Portal.ThemeDelete.ThemeCreate}" TextWrapping="WrapWithOverflow" FontSize="16" Margin="0 12 0 0" Foreground="{DynamicResource TextFillColorPrimaryBrush}" /> | ||
<TextBlock x:Name="ThemeCreateDate" Text="{DynamicResource Portal.ThemeDelete.ThemeCreateDate}" TextWrapping="WrapWithOverflow" FontSize="14" Foreground="{DynamicResource TextFillColorSecondaryBrush}" /> | ||
</StackPanel> | ||
</ui:ContentDialog> |
62 changes: 62 additions & 0 deletions
62
src/Portal/Sucrose.Portal/Views/Controls/ThemeDelete.xaml.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
using System.IO; | ||
using System.Windows; | ||
using Wpf.Ui.Controls; | ||
using SECNT = Skylark.Enum.ClearNumericType; | ||
using SEMST = Skylark.Enum.ModeStorageType; | ||
using SEST = Skylark.Enum.StorageType; | ||
using SHC = Skylark.Helper.Culture; | ||
using SHN = Skylark.Helper.Numeric; | ||
using SPMI = Sucrose.Portal.Manage.Internal; | ||
using SSESSE = Skylark.Standard.Extension.Storage.StorageExtension; | ||
using SSSHS = Sucrose.Shared.Space.Helper.Size; | ||
using SSSSS = Skylark.Struct.Storage.StorageStruct; | ||
using SSTHI = Sucrose.Shared.Theme.Helper.Info; | ||
using SSTHV = Sucrose.Shared.Theme.Helper.Various; | ||
|
||
namespace Sucrose.Portal.Views.Controls | ||
{ | ||
/// <summary> | ||
/// ThemeDelete.xaml etkileşim mantığı | ||
/// </summary> | ||
public partial class ThemeDelete : ContentDialog, IDisposable | ||
{ | ||
internal string Theme = string.Empty; | ||
internal SSTHI Info = new(); | ||
|
||
public ThemeDelete() : base(SPMI.ContentDialogService.GetContentPresenter()) | ||
{ | ||
InitializeComponent(); | ||
} | ||
|
||
private string Size(string Path) | ||
{ | ||
SSSSS Data = SSESSE.AutoConvert(SSSHS.Calc(Path), SEST.Byte, SEMST.Palila); | ||
|
||
return $"{SHN.Numeral(Data.Value, true, true, 1, '0', SECNT.None)} {Data.Short}"; | ||
} | ||
|
||
private void ContentDialog_Loaded(object sender, RoutedEventArgs e) | ||
{ | ||
ThemeTitle.Text = Info.Title; | ||
ThemeDescription.Text = Info.Description; | ||
|
||
ThemeTypeName.Text = Info.Type.ToString(); | ||
|
||
ThemeAuthorName.Text = Info.Author; | ||
|
||
ThemeSizeTotal.Text = Size(Theme); | ||
|
||
ThemeVersionText.Text = $"{Info.Version} ({Info.AppVersion})"; | ||
|
||
DateTime CreationTime = Directory.GetCreationTime(Theme); | ||
|
||
ThemeCreateDate.Text = CreationTime.ToString(SHC.CurrentUI); | ||
} | ||
|
||
public void Dispose() | ||
{ | ||
GC.Collect(); | ||
GC.SuppressFinalize(this); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
...d/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeDelete/Portal.ThemeDelete.DE.xaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<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.ThemeDelete.Title">Themenbewertung</system:String> | ||
<system:String x:Key="Portal.ThemeDelete.Close">Schließen</system:String> | ||
|
||
<system:String x:Key="Portal.ThemeDelete.ThemeTitle">Titel</system:String> | ||
<system:String x:Key="Portal.ThemeDelete.ThemeDescription">Beschreibung</system:String> | ||
<system:String x:Key="Portal.ThemeDelete.ThemeType">Typ</system:String> | ||
<system:String x:Key="Portal.ThemeDelete.ThemeTypeName">Gif</system:String> | ||
<system:String x:Key="Portal.ThemeDelete.ThemeAuthor">Autor</system:String> | ||
<system:String x:Key="Portal.ThemeDelete.ThemeAuthorName">Taiizor</system:String> | ||
<system:String x:Key="Portal.ThemeDelete.ThemeSize">Größe</system:String> | ||
<system:String x:Key="Portal.ThemeDelete.ThemeSizeTotal">0 b</system:String> | ||
<system:String x:Key="Portal.ThemeDelete.ThemeVersion">Version</system:String> | ||
<system:String x:Key="Portal.ThemeDelete.ThemeVersionText">0.0.0.0 (0.0.0.0)</system:String> | ||
<system:String x:Key="Portal.ThemeDelete.ThemeCreate">Erstellt</system:String> | ||
<system:String x:Key="Portal.ThemeDelete.ThemeCreateDate">Unbekannt</system:String> | ||
</ResourceDictionary> |
21 changes: 21 additions & 0 deletions
21
...d/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeDelete/Portal.ThemeDelete.EN.xaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<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.ThemeDelete.Title">Theme Review</system:String> | ||
<system:String x:Key="Portal.ThemeDelete.Close">Close</system:String> | ||
|
||
<system:String x:Key="Portal.ThemeDelete.ThemeTitle">Title</system:String> | ||
<system:String x:Key="Portal.ThemeDelete.ThemeDescription">Description</system:String> | ||
<system:String x:Key="Portal.ThemeDelete.ThemeType">Type</system:String> | ||
<system:String x:Key="Portal.ThemeDelete.ThemeTypeName">Gif</system:String> | ||
<system:String x:Key="Portal.ThemeDelete.ThemeAuthor">Author</system:String> | ||
<system:String x:Key="Portal.ThemeDelete.ThemeAuthorName">Taiizor</system:String> | ||
<system:String x:Key="Portal.ThemeDelete.ThemeSize">Size</system:String> | ||
<system:String x:Key="Portal.ThemeDelete.ThemeSizeTotal">0 b</system:String> | ||
<system:String x:Key="Portal.ThemeDelete.ThemeVersion">Version</system:String> | ||
<system:String x:Key="Portal.ThemeDelete.ThemeVersionText">0.0.0.0 (0.0.0.0)</system:String> | ||
<system:String x:Key="Portal.ThemeDelete.ThemeCreate">Creation</system:String> | ||
<system:String x:Key="Portal.ThemeDelete.ThemeCreateDate">Unknown</system:String> | ||
</ResourceDictionary> |
21 changes: 21 additions & 0 deletions
21
...d/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeDelete/Portal.ThemeDelete.ES.xaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<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.ThemeDelete.Title">Reseña del Tema</system:String> | ||
<system:String x:Key="Portal.ThemeDelete.Close">Cerrar</system:String> | ||
|
||
<system:String x:Key="Portal.ThemeDelete.ThemeTitle">Título</system:String> | ||
<system:String x:Key="Portal.ThemeDelete.ThemeDescription">Descripción</system:String> | ||
<system:String x:Key="Portal.ThemeDelete.ThemeType">Tipo</system:String> | ||
<system:String x:Key="Portal.ThemeDelete.ThemeTypeName">Gif</system:String> | ||
<system:String x:Key="Portal.ThemeDelete.ThemeAuthor">Autor</system:String> | ||
<system:String x:Key="Portal.ThemeDelete.ThemeAuthorName">Taiizor</system:String> | ||
<system:String x:Key="Portal.ThemeDelete.ThemeSize">Tamaño</system:String> | ||
<system:String x:Key="Portal.ThemeDelete.ThemeSizeTotal">0 b</system:String> | ||
<system:String x:Key="Portal.ThemeDelete.ThemeVersion">Versión</system:String> | ||
<system:String x:Key="Portal.ThemeDelete.ThemeVersionText">0.0.0.0 (0.0.0.0)</system:String> | ||
<system:String x:Key="Portal.ThemeDelete.ThemeCreate">Creación</system:String> | ||
<system:String x:Key="Portal.ThemeDelete.ThemeCreateDate">Desconocido</system:String> | ||
</ResourceDictionary> |
Oops, something went wrong.