From 76cff4ec729128a73f5e5b9cd201d9d47f4b9e68 Mon Sep 17 00:00:00 2001
From: Taiizor <41683699+Taiizor@users.noreply.github.com>
Date: Sat, 21 Oct 2023 17:28:52 +0300
Subject: [PATCH] Preparing Theme Create Dialog
---
.../ViewModels/Windows/MainWindowViewModel.cs | 11 ++
.../Views/Controls/ThemeCreate.xaml | 151 ++++++++++++++++++
.../Views/Controls/ThemeCreate.xaml.cs | 42 +++++
.../Views/Windows/MainWindow.xaml | 1 +
.../Portal/Controls/Portal.Controls.DE.xaml | 1 +
.../Portal/Controls/Portal.Controls.EN.xaml | 1 +
.../Portal/Controls/Portal.Controls.ES.xaml | 1 +
.../Portal/Controls/Portal.Controls.FR.xaml | 1 +
.../Portal/Controls/Portal.Controls.PL.xaml | 1 +
.../Portal/Controls/Portal.Controls.TR.xaml | 1 +
.../ThemeCreate/Portal.ThemeCreate.DE.xaml | 9 ++
.../ThemeCreate/Portal.ThemeCreate.EN.xaml | 9 ++
.../ThemeCreate/Portal.ThemeCreate.ES.xaml | 9 ++
.../ThemeCreate/Portal.ThemeCreate.FR.xaml | 9 ++
.../ThemeCreate/Portal.ThemeCreate.PL.xaml | 9 ++
.../ThemeCreate/Portal.ThemeCreate.TR.xaml | 9 ++
.../Sucrose.Shared.Resources.projitems | 24 +++
17 files changed, 289 insertions(+)
create mode 100644 src/Portal/Sucrose.Portal/Views/Controls/ThemeCreate.xaml
create mode 100644 src/Portal/Sucrose.Portal/Views/Controls/ThemeCreate.xaml.cs
create mode 100644 src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeCreate/Portal.ThemeCreate.DE.xaml
create mode 100644 src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeCreate/Portal.ThemeCreate.EN.xaml
create mode 100644 src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeCreate/Portal.ThemeCreate.ES.xaml
create mode 100644 src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeCreate/Portal.ThemeCreate.FR.xaml
create mode 100644 src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeCreate/Portal.ThemeCreate.PL.xaml
create mode 100644 src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeCreate/Portal.ThemeCreate.TR.xaml
diff --git a/src/Portal/Sucrose.Portal/ViewModels/Windows/MainWindowViewModel.cs b/src/Portal/Sucrose.Portal/ViewModels/Windows/MainWindowViewModel.cs
index 59da9f84e..5e9ddc07d 100644
--- a/src/Portal/Sucrose.Portal/ViewModels/Windows/MainWindowViewModel.cs
+++ b/src/Portal/Sucrose.Portal/ViewModels/Windows/MainWindowViewModel.cs
@@ -15,6 +15,7 @@
using SPEIL = Sucrose.Portal.Extension.ImageLoader;
using SPMI = Sucrose.Portal.Manage.Internal;
using SPMM = Sucrose.Portal.Manage.Manager;
+using SPVCTC = Sucrose.Portal.Views.Controls.ThemeCreate;
using SPVCDP = Sucrose.Portal.Views.Controls.DisplayPreferences;
using SPVCOA = Sucrose.Portal.Views.Controls.OtherAbout;
using SPVCOH = Sucrose.Portal.Views.Controls.OtherHelp;
@@ -224,6 +225,16 @@ private async Task OnOtherAbout()
OtherAbout.Dispose();
}
+ [RelayCommand]
+ private async Task OnCreateWallpaper()
+ {
+ SPVCTC ThemeCreate = new();
+
+ await ThemeCreate.ShowAsync();
+
+ ThemeCreate.Dispose();
+ }
+
[RelayCommand]
private async Task OnDisplayPreferences()
{
diff --git a/src/Portal/Sucrose.Portal/Views/Controls/ThemeCreate.xaml b/src/Portal/Sucrose.Portal/Views/Controls/ThemeCreate.xaml
new file mode 100644
index 000000000..2edb2da69
--- /dev/null
+++ b/src/Portal/Sucrose.Portal/Views/Controls/ThemeCreate.xaml
@@ -0,0 +1,151 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Portal/Sucrose.Portal/Views/Controls/ThemeCreate.xaml.cs b/src/Portal/Sucrose.Portal/Views/Controls/ThemeCreate.xaml.cs
new file mode 100644
index 000000000..25fbf47a0
--- /dev/null
+++ b/src/Portal/Sucrose.Portal/Views/Controls/ThemeCreate.xaml.cs
@@ -0,0 +1,42 @@
+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 SMR = Sucrose.Memory.Readonly;
+using SPEIL = Sucrose.Portal.Extension.ImageLoader;
+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
+{
+ ///
+ /// ThemeCreate.xaml etkileşim mantığı
+ ///
+ public partial class ThemeCreate : ContentDialog, IDisposable
+ {
+ public ThemeCreate() : base(SPMI.ContentDialogService.GetContentPresenter())
+ {
+ InitializeComponent();
+ }
+
+ private void ContentDialog_Loaded(object sender, RoutedEventArgs e)
+ {
+ //tema oluşturma türü seçildiyse aktif edilecek
+ //IsPrimaryButtonEnabled = true;
+ }
+
+ public void Dispose()
+ {
+ GC.Collect();
+ GC.SuppressFinalize(this);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Portal/Sucrose.Portal/Views/Windows/MainWindow.xaml b/src/Portal/Sucrose.Portal/Views/Windows/MainWindow.xaml
index 65b1eeb59..5283506d0 100644
--- a/src/Portal/Sucrose.Portal/Views/Windows/MainWindow.xaml
+++ b/src/Portal/Sucrose.Portal/Views/Windows/MainWindow.xaml
@@ -182,6 +182,7 @@
Appearance="Transparent"
BorderBrush="Transparent"
Icon="{ui:SymbolIcon Add16}"
+ Command="{Binding ViewModel.CreateWallpaperCommand, Mode=OneWay}"
ToolTipService.ToolTip="{DynamicResource Portal.MainWindow.MenuCreateWallpaperTip}" />
+
diff --git a/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/Portal.Controls.EN.xaml b/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/Portal.Controls.EN.xaml
index 88c0e4090..7532f7142 100644
--- a/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/Portal.Controls.EN.xaml
+++ b/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/Portal.Controls.EN.xaml
@@ -12,6 +12,7 @@
+
diff --git a/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/Portal.Controls.ES.xaml b/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/Portal.Controls.ES.xaml
index 0c43fdb30..89f65c6c5 100644
--- a/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/Portal.Controls.ES.xaml
+++ b/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/Portal.Controls.ES.xaml
@@ -12,6 +12,7 @@
+
diff --git a/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/Portal.Controls.FR.xaml b/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/Portal.Controls.FR.xaml
index 34c88153b..920172cac 100644
--- a/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/Portal.Controls.FR.xaml
+++ b/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/Portal.Controls.FR.xaml
@@ -12,6 +12,7 @@
+
diff --git a/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/Portal.Controls.PL.xaml b/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/Portal.Controls.PL.xaml
index 0d3fa73d7..680ff8b37 100644
--- a/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/Portal.Controls.PL.xaml
+++ b/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/Portal.Controls.PL.xaml
@@ -12,6 +12,7 @@
+
diff --git a/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/Portal.Controls.TR.xaml b/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/Portal.Controls.TR.xaml
index 83d949028..9a236cd08 100644
--- a/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/Portal.Controls.TR.xaml
+++ b/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/Portal.Controls.TR.xaml
@@ -12,6 +12,7 @@
+
diff --git a/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeCreate/Portal.ThemeCreate.DE.xaml b/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeCreate/Portal.ThemeCreate.DE.xaml
new file mode 100644
index 000000000..f7cde1a6c
--- /dev/null
+++ b/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeCreate/Portal.ThemeCreate.DE.xaml
@@ -0,0 +1,9 @@
+
+ Tema Oluşturma
+ Oluştur
+ Kapat
+
\ No newline at end of file
diff --git a/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeCreate/Portal.ThemeCreate.EN.xaml b/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeCreate/Portal.ThemeCreate.EN.xaml
new file mode 100644
index 000000000..f7cde1a6c
--- /dev/null
+++ b/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeCreate/Portal.ThemeCreate.EN.xaml
@@ -0,0 +1,9 @@
+
+ Tema Oluşturma
+ Oluştur
+ Kapat
+
\ No newline at end of file
diff --git a/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeCreate/Portal.ThemeCreate.ES.xaml b/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeCreate/Portal.ThemeCreate.ES.xaml
new file mode 100644
index 000000000..f7cde1a6c
--- /dev/null
+++ b/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeCreate/Portal.ThemeCreate.ES.xaml
@@ -0,0 +1,9 @@
+
+ Tema Oluşturma
+ Oluştur
+ Kapat
+
\ No newline at end of file
diff --git a/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeCreate/Portal.ThemeCreate.FR.xaml b/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeCreate/Portal.ThemeCreate.FR.xaml
new file mode 100644
index 000000000..f7cde1a6c
--- /dev/null
+++ b/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeCreate/Portal.ThemeCreate.FR.xaml
@@ -0,0 +1,9 @@
+
+ Tema Oluşturma
+ Oluştur
+ Kapat
+
\ No newline at end of file
diff --git a/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeCreate/Portal.ThemeCreate.PL.xaml b/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeCreate/Portal.ThemeCreate.PL.xaml
new file mode 100644
index 000000000..f7cde1a6c
--- /dev/null
+++ b/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeCreate/Portal.ThemeCreate.PL.xaml
@@ -0,0 +1,9 @@
+
+ Tema Oluşturma
+ Oluştur
+ Kapat
+
\ No newline at end of file
diff --git a/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeCreate/Portal.ThemeCreate.TR.xaml b/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeCreate/Portal.ThemeCreate.TR.xaml
new file mode 100644
index 000000000..f7cde1a6c
--- /dev/null
+++ b/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeCreate/Portal.ThemeCreate.TR.xaml
@@ -0,0 +1,9 @@
+
+ Tema Oluşturma
+ Oluştur
+ Kapat
+
\ No newline at end of file
diff --git a/src/Shared/Sucrose.Shared.Resources/Sucrose.Shared.Resources.projitems b/src/Shared/Sucrose.Shared.Resources/Sucrose.Shared.Resources.projitems
index 72d15058a..e4cefddd1 100644
--- a/src/Shared/Sucrose.Shared.Resources/Sucrose.Shared.Resources.projitems
+++ b/src/Shared/Sucrose.Shared.Resources/Sucrose.Shared.Resources.projitems
@@ -325,6 +325,30 @@
Designer
MSBuild:Compile
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
Designer
MSBuild:Compile