From 46f4b13150e40ee902157ce69c6e0ce6106f5b69 Mon Sep 17 00:00:00 2001 From: Taiizor <41683699+Taiizor@users.noreply.github.com> Date: Tue, 3 Oct 2023 01:39:06 +0300 Subject: [PATCH] Preparing Display Preferences Dialog --- src/Portal/Sucrose.Portal/Manage/Manager.cs | 6 +- .../Sucrose.Portal/Sucrose.Portal.csproj | 9 + .../ViewModels/Windows/MainWindowViewModel.cs | 2 +- .../Views/Controls/Display/Duplicate.xaml | 15 ++ .../Views/Controls/Display/Duplicate.xaml.cs | 15 ++ .../Views/Controls/Display/Expand.xaml | 15 ++ .../Views/Controls/Display/Expand.xaml.cs | 15 ++ .../Views/Controls/Display/Screen.xaml | 2 +- .../Views/Controls/DisplayPreferences.xaml | 30 ++- .../Views/Controls/DisplayPreferences.xaml.cs | 218 ++++++++++++++++-- .../Views/Controls/ExpanderCard.xaml | 4 - .../Views/Controls/ExpanderCard.xaml.cs | 15 -- 12 files changed, 290 insertions(+), 56 deletions(-) create mode 100644 src/Portal/Sucrose.Portal/Views/Controls/Display/Duplicate.xaml create mode 100644 src/Portal/Sucrose.Portal/Views/Controls/Display/Duplicate.xaml.cs create mode 100644 src/Portal/Sucrose.Portal/Views/Controls/Display/Expand.xaml create mode 100644 src/Portal/Sucrose.Portal/Views/Controls/Display/Expand.xaml.cs diff --git a/src/Portal/Sucrose.Portal/Manage/Manager.cs b/src/Portal/Sucrose.Portal/Manage/Manager.cs index e56c12bcc..51d7e8337 100644 --- a/src/Portal/Sucrose.Portal/Manage/Manager.cs +++ b/src/Portal/Sucrose.Portal/Manage/Manager.cs @@ -1,18 +1,18 @@ using System.Net; using System.Windows.Media; using Wpf.Ui.Controls; +using SEDST = Skylark.Enum.DuplicateScreenType; +using SEEST = Skylark.Enum.ExpandScreenType; using SEST = Skylark.Enum.ScreenType; using SEWTT = Skylark.Enum.WindowsThemeType; using SHS = Skylark.Helper.Skymath; using SMC = Sucrose.Memory.Constant; using SMMI = Sucrose.Manager.Manage.Internal; using SMR = Sucrose.Memory.Readonly; +using SSDEDT = Sucrose.Shared.Dependency.Enum.DisplayType; using SSDEPT = Sucrose.Shared.Dependency.Enum.PerformanceType; using SSDEST = Sucrose.Shared.Dependency.Enum.StretchType; using SWHWT = Skylark.Wing.Helper.WindowsTheme; -using SSDEDT = Sucrose.Shared.Dependency.Enum.DisplayType; -using SEDST = Skylark.Enum.DuplicateScreenType; -using SEEST = Skylark.Enum.ExpandScreenType; namespace Sucrose.Portal.Manage { diff --git a/src/Portal/Sucrose.Portal/Sucrose.Portal.csproj b/src/Portal/Sucrose.Portal/Sucrose.Portal.csproj index 0e58e586b..6ad18af27 100644 --- a/src/Portal/Sucrose.Portal/Sucrose.Portal.csproj +++ b/src/Portal/Sucrose.Portal/Sucrose.Portal.csproj @@ -118,6 +118,15 @@ + + + Code + + + Code + + + $(OutputPath)\$(TargetFramework)\win-$(Platform) ..\..\Sucrose\Package\$(TargetFramework)\$(Platform)\$(AssemblyName)\ diff --git a/src/Portal/Sucrose.Portal/ViewModels/Windows/MainWindowViewModel.cs b/src/Portal/Sucrose.Portal/ViewModels/Windows/MainWindowViewModel.cs index ae5411198..7202e27fd 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 SPVCDP = Sucrose.Portal.Views.Controls.DisplayPreferences; using SSCHA = Sucrose.Shared.Core.Helper.Architecture; using SSCHF = Sucrose.Shared.Core.Helper.Framework; using SSCHM = Sucrose.Shared.Core.Helper.Memory; @@ -23,7 +24,6 @@ using SSRER = Sucrose.Shared.Resources.Extension.Resources; using WUAAT = Wpf.Ui.Appearance.ApplicationTheme; using WUAT = Wpf.Ui.Appearance.ApplicationThemeManager; -using SPVCDP = Sucrose.Portal.Views.Controls.DisplayPreferences; namespace Sucrose.Portal.ViewModels.Windows { diff --git a/src/Portal/Sucrose.Portal/Views/Controls/Display/Duplicate.xaml b/src/Portal/Sucrose.Portal/Views/Controls/Display/Duplicate.xaml new file mode 100644 index 000000000..8f6f6d264 --- /dev/null +++ b/src/Portal/Sucrose.Portal/Views/Controls/Display/Duplicate.xaml @@ -0,0 +1,15 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/Portal/Sucrose.Portal/Views/Controls/Display/Duplicate.xaml.cs b/src/Portal/Sucrose.Portal/Views/Controls/Display/Duplicate.xaml.cs new file mode 100644 index 000000000..5d8b3968c --- /dev/null +++ b/src/Portal/Sucrose.Portal/Views/Controls/Display/Duplicate.xaml.cs @@ -0,0 +1,15 @@ +using System.Windows.Controls; + +namespace Sucrose.Portal.Views.Controls.Display +{ + /// + /// Duplicate.xaml etkileşim mantığı + /// + public partial class Duplicate : UserControl + { + public Duplicate() + { + InitializeComponent(); + } + } +} \ No newline at end of file diff --git a/src/Portal/Sucrose.Portal/Views/Controls/Display/Expand.xaml b/src/Portal/Sucrose.Portal/Views/Controls/Display/Expand.xaml new file mode 100644 index 000000000..1caf5d06d --- /dev/null +++ b/src/Portal/Sucrose.Portal/Views/Controls/Display/Expand.xaml @@ -0,0 +1,15 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/Portal/Sucrose.Portal/Views/Controls/Display/Expand.xaml.cs b/src/Portal/Sucrose.Portal/Views/Controls/Display/Expand.xaml.cs new file mode 100644 index 000000000..613bb2d77 --- /dev/null +++ b/src/Portal/Sucrose.Portal/Views/Controls/Display/Expand.xaml.cs @@ -0,0 +1,15 @@ +using System.Windows.Controls; + +namespace Sucrose.Portal.Views.Controls.Display +{ + /// + /// Expand.xaml etkileşim mantığı + /// + public partial class Expand : UserControl + { + public Expand() + { + InitializeComponent(); + } + } +} \ No newline at end of file diff --git a/src/Portal/Sucrose.Portal/Views/Controls/Display/Screen.xaml b/src/Portal/Sucrose.Portal/Views/Controls/Display/Screen.xaml index 7f2b20ce0..70ce2105d 100644 --- a/src/Portal/Sucrose.Portal/Views/Controls/Display/Screen.xaml +++ b/src/Portal/Sucrose.Portal/Views/Controls/Display/Screen.xaml @@ -2,7 +2,7 @@ x:Class="Sucrose.Portal.Views.Controls.Display.Screen" 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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" mc:Ignorable="d"> diff --git a/src/Portal/Sucrose.Portal/Views/Controls/DisplayPreferences.xaml b/src/Portal/Sucrose.Portal/Views/Controls/DisplayPreferences.xaml index b1cbc22f6..70934a839 100644 --- a/src/Portal/Sucrose.Portal/Views/Controls/DisplayPreferences.xaml +++ b/src/Portal/Sucrose.Portal/Views/Controls/DisplayPreferences.xaml @@ -2,7 +2,8 @@ x:Class="Sucrose.Portal.Views.Controls.DisplayPreferences" 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: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" @@ -16,18 +17,27 @@