From 4da2d6cd1406fe50afc6e5f35671821347a923d3 Mon Sep 17 00:00:00 2001
From: Taiizor <41683699+Taiizor@users.noreply.github.com>
Date: Fri, 20 Oct 2023 19:33:01 +0300
Subject: [PATCH] Preparing Import Dialog
---
.../Views/Controls/ThemeImport.xaml | 2 +-
.../Views/Pages/LibraryPage.xaml.cs | 15 +++++++++++-
.../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 +
.../ThemeImport/Portal.ThemeImport.DE.xaml | 10 ++++++++
.../ThemeImport/Portal.ThemeImport.EN.xaml | 10 ++++++++
.../ThemeImport/Portal.ThemeImport.ES.xaml | 10 ++++++++
.../ThemeImport/Portal.ThemeImport.FR.xaml | 10 ++++++++
.../ThemeImport/Portal.ThemeImport.PL.xaml | 10 ++++++++
.../ThemeImport/Portal.ThemeImport.TR.xaml | 10 ++++++++
.../Sucrose.Shared.Resources.projitems | 24 +++++++++++++++++++
15 files changed, 105 insertions(+), 2 deletions(-)
create mode 100644 src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeImport/Portal.ThemeImport.DE.xaml
create mode 100644 src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeImport/Portal.ThemeImport.EN.xaml
create mode 100644 src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeImport/Portal.ThemeImport.ES.xaml
create mode 100644 src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeImport/Portal.ThemeImport.FR.xaml
create mode 100644 src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeImport/Portal.ThemeImport.PL.xaml
create mode 100644 src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeImport/Portal.ThemeImport.TR.xaml
diff --git a/src/Portal/Sucrose.Portal/Views/Controls/ThemeImport.xaml b/src/Portal/Sucrose.Portal/Views/Controls/ThemeImport.xaml
index c8c4449c7..032f43b91 100644
--- a/src/Portal/Sucrose.Portal/Views/Controls/ThemeImport.xaml
+++ b/src/Portal/Sucrose.Portal/Views/Controls/ThemeImport.xaml
@@ -16,7 +16,7 @@
-
+
\ No newline at end of file
diff --git a/src/Portal/Sucrose.Portal/Views/Pages/LibraryPage.xaml.cs b/src/Portal/Sucrose.Portal/Views/Pages/LibraryPage.xaml.cs
index 0d2c27c0c..f4a9c5f95 100644
--- a/src/Portal/Sucrose.Portal/Views/Pages/LibraryPage.xaml.cs
+++ b/src/Portal/Sucrose.Portal/Views/Pages/LibraryPage.xaml.cs
@@ -14,6 +14,9 @@
using SSDECT = Sucrose.Shared.Dependency.Enum.CompatibilityType;
using SSZEZ = Sucrose.Shared.Zip.Extension.Zip;
using SSZHA = Sucrose.Shared.Zip.Helper.Archive;
+using SPVCTI = Sucrose.Portal.Views.Controls.ThemeImport;
+using Sucrose.Shared.Space.Helper;
+using Sucrose.Shared.Theme.Helper;
namespace Sucrose.Portal.Views.Pages
{
@@ -158,6 +161,7 @@ private async void GridLibrary_Drop(object sender, DragEventArgs e)
if (e.Data.GetDataPresent(DataFormats.FileDrop))
{
bool State = false;
+ List Types = new();
List Messages = new();
string[] Files = (string[])e.Data.GetData(DataFormats.FileDrop);
@@ -190,6 +194,7 @@ private async void GridLibrary_Drop(object sender, DragEventArgs e)
}
else
{
+ Types.Add(Result);
Messages.Add($"{Path.GetFileNameWithoutExtension(Record)} adlı tema kütüphaneye eklenemedi. Nedeni: {Result}");
}
}
@@ -206,7 +211,15 @@ private async void GridLibrary_Drop(object sender, DragEventArgs e)
Messages.ForEach(Message => SB.AppendLine(Message));
- System.Windows.MessageBox.Show(SB.ToString());
+ SPVCTI ThemeImport = new()
+ {
+ Types = Types,
+ Info = SB.ToString()
+ };
+
+ await ThemeImport.ShowAsync();
+
+ ThemeImport.Dispose();
}
if (State)
diff --git a/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/Portal.Controls.DE.xaml b/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/Portal.Controls.DE.xaml
index 19fe5693c..46043249f 100644
--- a/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/Portal.Controls.DE.xaml
+++ b/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/Portal.Controls.DE.xaml
@@ -11,6 +11,7 @@
+
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 872ff57d7..88c0e4090 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
@@ -11,6 +11,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 e39aa62b2..0c43fdb30 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
@@ -11,6 +11,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 8c624aa42..34c88153b 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
@@ -11,6 +11,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 a9d4787be..0d3fa73d7 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
@@ -11,6 +11,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 34c9f8ac0..83d949028 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
@@ -11,6 +11,7 @@
+
diff --git a/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeImport/Portal.ThemeImport.DE.xaml b/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeImport/Portal.ThemeImport.DE.xaml
new file mode 100644
index 000000000..11b1a103c
--- /dev/null
+++ b/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeImport/Portal.ThemeImport.DE.xaml
@@ -0,0 +1,10 @@
+
+ Tema İçeri Aktarma
+ Kapat
+
+ Test
+
\ No newline at end of file
diff --git a/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeImport/Portal.ThemeImport.EN.xaml b/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeImport/Portal.ThemeImport.EN.xaml
new file mode 100644
index 000000000..11b1a103c
--- /dev/null
+++ b/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeImport/Portal.ThemeImport.EN.xaml
@@ -0,0 +1,10 @@
+
+ Tema İçeri Aktarma
+ Kapat
+
+ Test
+
\ No newline at end of file
diff --git a/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeImport/Portal.ThemeImport.ES.xaml b/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeImport/Portal.ThemeImport.ES.xaml
new file mode 100644
index 000000000..11b1a103c
--- /dev/null
+++ b/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeImport/Portal.ThemeImport.ES.xaml
@@ -0,0 +1,10 @@
+
+ Tema İçeri Aktarma
+ Kapat
+
+ Test
+
\ No newline at end of file
diff --git a/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeImport/Portal.ThemeImport.FR.xaml b/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeImport/Portal.ThemeImport.FR.xaml
new file mode 100644
index 000000000..11b1a103c
--- /dev/null
+++ b/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeImport/Portal.ThemeImport.FR.xaml
@@ -0,0 +1,10 @@
+
+ Tema İçeri Aktarma
+ Kapat
+
+ Test
+
\ No newline at end of file
diff --git a/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeImport/Portal.ThemeImport.PL.xaml b/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeImport/Portal.ThemeImport.PL.xaml
new file mode 100644
index 000000000..11b1a103c
--- /dev/null
+++ b/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeImport/Portal.ThemeImport.PL.xaml
@@ -0,0 +1,10 @@
+
+ Tema İçeri Aktarma
+ Kapat
+
+ Test
+
\ No newline at end of file
diff --git a/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeImport/Portal.ThemeImport.TR.xaml b/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeImport/Portal.ThemeImport.TR.xaml
new file mode 100644
index 000000000..abc050ab9
--- /dev/null
+++ b/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeImport/Portal.ThemeImport.TR.xaml
@@ -0,0 +1,10 @@
+
+ Tema İçeri Aktarma
+ Kapat
+
+ Bilgi
+
\ 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 665305ef8..72d15058a 100644
--- a/src/Shared/Sucrose.Shared.Resources/Sucrose.Shared.Resources.projitems
+++ b/src/Shared/Sucrose.Shared.Resources/Sucrose.Shared.Resources.projitems
@@ -373,6 +373,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