diff --git a/src/Portal/Sucrose.Portal/Views/Controls/DisplayPreferences.xaml.cs b/src/Portal/Sucrose.Portal/Views/Controls/DisplayPreferences.xaml.cs index bf00b55c5..5bc05dfbd 100644 --- a/src/Portal/Sucrose.Portal/Views/Controls/DisplayPreferences.xaml.cs +++ b/src/Portal/Sucrose.Portal/Views/Controls/DisplayPreferences.xaml.cs @@ -60,11 +60,9 @@ private async Task ScreenMonitor() int ScreenCount = SWUS.Screens.Count(); - while (SMMM.ScreenIndex > ScreenCount - 1) + if (SMMM.ScreenIndex > ScreenCount - 1) { - SMMI.EngineSettingManager.SetSetting(SMC.ScreenIndex, SMMM.ScreenIndex - 1); - - await Task.Delay(10); + SMMI.EngineSettingManager.SetSetting(SMC.ScreenIndex, ScreenCount - 1); } for (int Count = 0; Count < ScreenCount; Count++) diff --git a/src/Portal/Sucrose.Portal/Views/Controls/LibraryCard.xaml.cs b/src/Portal/Sucrose.Portal/Views/Controls/LibraryCard.xaml.cs index 81540a1fa..a360387b9 100644 --- a/src/Portal/Sucrose.Portal/Views/Controls/LibraryCard.xaml.cs +++ b/src/Portal/Sucrose.Portal/Views/Controls/LibraryCard.xaml.cs @@ -62,6 +62,25 @@ private void Use() } } + private void UpdateInfo() + { + ToolTip TitleTip = new() + { + Content = Info.Title + }; + + ToolTip DescriptionTip = new() + { + Content = Info.Description + }; + + ThemeTitle.ToolTip = TitleTip; + ThemeDescription.ToolTip = DescriptionTip; + + ThemeTitle.Text = Info.Title.Length > SMMM.TitleLength ? $"{SHA.Cut(Info.Title, SMMM.TitleLength)}..." : Info.Title; + ThemeDescription.Text = Info.Description.Length > SMMM.DescriptionLength ? $"{SHA.Cut(Info.Description, SMMM.DescriptionLength)}..." : Info.Description; + } + private void MenuUse_Click(object sender, RoutedEventArgs e) { if (Info.AppVersion.CompareTo(SHV.Entry()) <= 0) @@ -83,27 +102,13 @@ private async void MenuEdit_Click(object sender, RoutedEventArgs e) Theme = Theme }; - ContentDialogResult result = await ThemeEdit.ShowAsync(); + ContentDialogResult Result = await ThemeEdit.ShowAsync(); - if (result == ContentDialogResult.Primary) + if (Result == ContentDialogResult.Primary) { Info = SSTHI.ReadJson(Path.Combine(Theme, SMR.SucroseInfo)); - ToolTip TitleTip = new() - { - Content = Info.Title - }; - - ToolTip DescriptionTip = new() - { - Content = Info.Description - }; - - ThemeTitle.ToolTip = TitleTip; - ThemeDescription.ToolTip = DescriptionTip; - - ThemeTitle.Text = Info.Title.Length > SMMM.TitleLength ? $"{SHA.Cut(Info.Title, SMMM.TitleLength)}..." : Info.Title; - ThemeDescription.Text = Info.Description.Length > SMMM.DescriptionLength ? $"{SHA.Cut(Info.Description, SMMM.DescriptionLength)}..." : Info.Description; + UpdateInfo(); } ThemeEdit.Dispose(); @@ -199,21 +204,7 @@ private void ContextMenu_Opened(object sender, RoutedEventArgs e) private void LibraryCard_Loaded(object sender, RoutedEventArgs e) { - ToolTip TitleTip = new() - { - Content = Info.Title - }; - - ToolTip DescriptionTip = new() - { - Content = Info.Description - }; - - ThemeTitle.ToolTip = TitleTip; - ThemeDescription.ToolTip = DescriptionTip; - - ThemeTitle.Text = Info.Title.Length > SMMM.TitleLength ? $"{SHA.Cut(Info.Title, SMMM.TitleLength)}..." : Info.Title; - ThemeDescription.Text = Info.Description.Length > SMMM.DescriptionLength ? $"{SHA.Cut(Info.Description, SMMM.DescriptionLength)}..." : Info.Description; + UpdateInfo(); string ImagePath = Path.Combine(Theme, Info.Thumbnail); diff --git a/src/Portal/Sucrose.Portal/Views/Controls/ThemeEdit.xaml b/src/Portal/Sucrose.Portal/Views/Controls/ThemeEdit.xaml index 8452aae73..1174a2936 100644 --- a/src/Portal/Sucrose.Portal/Views/Controls/ThemeEdit.xaml +++ b/src/Portal/Sucrose.Portal/Views/Controls/ThemeEdit.xaml @@ -6,9 +6,9 @@ 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="Kapat" - PrimaryButtonText="Kaydet" - Title="Tema Düzenleme" + PrimaryButtonText="{DynamicResource Portal.ThemeEdit.Save}" + CloseButtonText="{DynamicResource Portal.ThemeEdit.Close}" + Title="{DynamicResource Portal.ThemeEdit.Title}" PreviewKeyDown="ContentDialog_PreviewKeyDown" Loaded="ContentDialog_Loaded" DialogMaxWidth="750" @@ -20,21 +20,21 @@ - - + + - + - + - + - + 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 82bea38e1..fb6218282 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 @@ -2,6 +2,7 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" > + 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 0254d662c..0fdc3a062 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 @@ -2,6 +2,7 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" > + 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 c727d7238..1394f9f71 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 @@ -2,6 +2,7 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" > + 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 f7c3c806f..34a4cbd8b 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 @@ -2,6 +2,7 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" > + 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 6d0e8183d..d998abee5 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 @@ -2,6 +2,7 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" > + 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 3c7728e45..a7f4eddfe 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 @@ -2,6 +2,7 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" > + diff --git a/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeEdit/Portal.ThemeEdit.DE.xaml b/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeEdit/Portal.ThemeEdit.DE.xaml new file mode 100644 index 000000000..fbb683b6f --- /dev/null +++ b/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeEdit/Portal.ThemeEdit.DE.xaml @@ -0,0 +1,15 @@ + + Themenbearbeitung + Schließen + Speichern + + Titel + Beschreibung + Autor + Kontakt + Argumente + \ No newline at end of file diff --git a/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeEdit/Portal.ThemeEdit.EN.xaml b/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeEdit/Portal.ThemeEdit.EN.xaml new file mode 100644 index 000000000..3371b409c --- /dev/null +++ b/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeEdit/Portal.ThemeEdit.EN.xaml @@ -0,0 +1,15 @@ + + Edit Theme + Close + Save + + Title + Description + Author + Contact + Arguments + \ No newline at end of file diff --git a/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeEdit/Portal.ThemeEdit.ES.xaml b/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeEdit/Portal.ThemeEdit.ES.xaml new file mode 100644 index 000000000..e7ca6e1f1 --- /dev/null +++ b/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeEdit/Portal.ThemeEdit.ES.xaml @@ -0,0 +1,15 @@ + + Edición de Tema + Cerrar + Guardar + + Título + Descripción + Autor + Contacto + Argumentos + \ No newline at end of file diff --git a/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeEdit/Portal.ThemeEdit.FR.xaml b/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeEdit/Portal.ThemeEdit.FR.xaml new file mode 100644 index 000000000..ada150cc5 --- /dev/null +++ b/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeEdit/Portal.ThemeEdit.FR.xaml @@ -0,0 +1,15 @@ + + Édition de Thème + Fermer + Enregistrer + + Titre + Description + Auteur + Contact + Arguments + \ No newline at end of file diff --git a/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeEdit/Portal.ThemeEdit.PL.xaml b/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeEdit/Portal.ThemeEdit.PL.xaml new file mode 100644 index 000000000..b3ef2caf4 --- /dev/null +++ b/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeEdit/Portal.ThemeEdit.PL.xaml @@ -0,0 +1,15 @@ + + Edycja Motywu + Zamknij + Zapisz + + Tytuł + Opis + Autor + Kontakt + Argumenty + \ No newline at end of file diff --git a/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeEdit/Portal.ThemeEdit.TR.xaml b/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeEdit/Portal.ThemeEdit.TR.xaml new file mode 100644 index 000000000..fec7bc330 --- /dev/null +++ b/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeEdit/Portal.ThemeEdit.TR.xaml @@ -0,0 +1,15 @@ + + Tema Düzenleme + Kapat + Kaydet + + Başlık + Açıklama + Yazar + İletişim + Argümanlar + \ No newline at end of file diff --git a/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeReview/Portal.ThemeReview.DE.xaml b/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeReview/Portal.ThemeReview.DE.xaml index 4f093ed35..e299785bd 100644 --- a/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeReview/Portal.ThemeReview.DE.xaml +++ b/src/Shared/Sucrose.Shared.Resources/Locales/Portal/Controls/ThemeReview/Portal.ThemeReview.DE.xaml @@ -4,7 +4,7 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" > Themenbewertung - Kapat + Schließen Titel Beschreibung diff --git a/src/Shared/Sucrose.Shared.Resources/Sucrose.Shared.Resources.projitems b/src/Shared/Sucrose.Shared.Resources/Sucrose.Shared.Resources.projitems index 037b94c19..842663d7a 100644 --- a/src/Shared/Sucrose.Shared.Resources/Sucrose.Shared.Resources.projitems +++ b/src/Shared/Sucrose.Shared.Resources/Sucrose.Shared.Resources.projitems @@ -277,6 +277,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