diff --git a/GoldDiff.Playground/App.xaml b/GoldDiff.Playground/App.xaml index 6e413ac..4a536cf 100644 --- a/GoldDiff.Playground/App.xaml +++ b/GoldDiff.Playground/App.xaml @@ -12,6 +12,8 @@ + + diff --git a/GoldDiff.Playground/Dialog.xaml b/GoldDiff.Playground/Dialog.xaml new file mode 100644 index 0000000..3cdb7db --- /dev/null +++ b/GoldDiff.Playground/Dialog.xaml @@ -0,0 +1,16 @@ + + + + + + \ No newline at end of file diff --git a/GoldDiff.Playground/Dialog.xaml.cs b/GoldDiff.Playground/Dialog.xaml.cs new file mode 100644 index 0000000..a1e848c --- /dev/null +++ b/GoldDiff.Playground/Dialog.xaml.cs @@ -0,0 +1,12 @@ +using GoldDiff.Shared.View; + +namespace GoldDiff.Playground +{ + public partial class Dialog : GoldDiffDialog + { + public Dialog() + { + InitializeComponent(); + } + } +} \ No newline at end of file diff --git a/GoldDiff.Playground/GoldDiff.Playground.csproj b/GoldDiff.Playground/GoldDiff.Playground.csproj index 333acc4..e7e3606 100644 --- a/GoldDiff.Playground/GoldDiff.Playground.csproj +++ b/GoldDiff.Playground/GoldDiff.Playground.csproj @@ -50,6 +50,7 @@ MSBuild:Compile Designer + MSBuild:Compile Designer @@ -58,6 +59,9 @@ App.xaml Code + + Dialog.xaml + MainWindow.xaml Code diff --git a/GoldDiff.Playground/MainWindow.xaml b/GoldDiff.Playground/MainWindow.xaml index d83ca0a..ca70338 100644 --- a/GoldDiff.Playground/MainWindow.xaml +++ b/GoldDiff.Playground/MainWindow.xaml @@ -11,21 +11,31 @@ mc:Ignorable="d" x:Name="This" - Style="{DynamicResource {x:Static view:GoldDiffSharedResourceKeys.DefaultWindowStyle}}" + WindowStyle="None" + ResizeMode="NoResize" Title="MainWindow" Height="350" Width="525"> - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/GoldDiff.Playground/MainWindow.xaml.cs b/GoldDiff.Playground/MainWindow.xaml.cs index 0883683..4bb3332 100644 --- a/GoldDiff.Playground/MainWindow.xaml.cs +++ b/GoldDiff.Playground/MainWindow.xaml.cs @@ -1,4 +1,6 @@ -using GoldDiff.LeagueOfLegends.Game; +using System.Windows; +using System.Windows.Input; +using GoldDiff.LeagueOfLegends.Game; namespace GoldDiff.Playground { @@ -11,5 +13,20 @@ public MainWindow() { InitializeComponent(); } + + protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e) + { + base.OnMouseLeftButtonDown(e); + DragMove(); + } + + private void ButtonBase_OnClick(object sender, RoutedEventArgs e) + { + var dialog = new Dialog() + { + Owner = this, + }; + dialog.ShowDialog(); + } } } \ No newline at end of file diff --git a/GoldDiff.Shared/GoldDiff.Shared.csproj b/GoldDiff.Shared/GoldDiff.Shared.csproj index 155d8cd..54f2c49 100644 --- a/GoldDiff.Shared/GoldDiff.Shared.csproj +++ b/GoldDiff.Shared/GoldDiff.Shared.csproj @@ -69,6 +69,7 @@ + @@ -80,6 +81,7 @@ + @@ -91,6 +93,8 @@ + + diff --git a/GoldDiff.Shared/View/ControlElement/GoldDiffCheckBox.cs b/GoldDiff.Shared/View/ControlElement/GoldDiffCheckBox.cs new file mode 100644 index 0000000..a3fd72b --- /dev/null +++ b/GoldDiff.Shared/View/ControlElement/GoldDiffCheckBox.cs @@ -0,0 +1,72 @@ +using System.Reflection; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Media; + +namespace GoldDiff.Shared.View.ControlElement +{ + public class GoldDiffCheckBox : CheckBox + { + public static readonly DependencyProperty NotCheckedIconProperty = DependencyProperty.Register(nameof(NotCheckedIcon), typeof(Geometry), MethodBase.GetCurrentMethod().DeclaringType); + public static readonly DependencyProperty CheckedIconProperty = DependencyProperty.Register(nameof(CheckedIcon), typeof(Geometry), MethodBase.GetCurrentMethod().DeclaringType); + public static readonly DependencyProperty NotCheckedBackgroundProperty = DependencyProperty.Register(nameof(NotCheckedBackground), typeof(Brush), MethodBase.GetCurrentMethod().DeclaringType); + public static readonly DependencyProperty CheckedBackgroundProperty = DependencyProperty.Register(nameof(CheckedBackground), typeof(Brush), MethodBase.GetCurrentMethod().DeclaringType); + public static readonly DependencyProperty NotCheckedIconForegroundProperty = DependencyProperty.Register(nameof(NotCheckedIconForeground), typeof(Brush), MethodBase.GetCurrentMethod().DeclaringType); + public static readonly DependencyProperty CheckedIconForegroundProperty = DependencyProperty.Register(nameof(CheckedIconForeground), typeof(Brush), MethodBase.GetCurrentMethod().DeclaringType); + public static readonly DependencyProperty NotCheckedIconBackgroundProperty = DependencyProperty.Register(nameof(NotCheckedIconBackground), typeof(Brush), MethodBase.GetCurrentMethod().DeclaringType); + public static readonly DependencyProperty CheckedIconBackgroundProperty = DependencyProperty.Register(nameof(CheckedIconBackground), typeof(Brush), MethodBase.GetCurrentMethod().DeclaringType); + + public Geometry? NotCheckedIcon + { + get => GetValue(NotCheckedIconProperty) as Geometry; + set => SetValue(NotCheckedIconProperty, value); + } + + public Geometry? CheckedIcon + { + get => GetValue(CheckedIconProperty) as Geometry; + set => SetValue(CheckedIconProperty, value); + } + + public Brush? NotCheckedBackground + { + get => GetValue(NotCheckedBackgroundProperty) as Brush; + set => SetValue(NotCheckedBackgroundProperty, value); + } + + public Brush? CheckedBackground + { + get => GetValue(CheckedBackgroundProperty) as Brush; + set => SetValue(CheckedBackgroundProperty, value); + } + + public Brush? NotCheckedIconForeground + { + get => GetValue(NotCheckedIconForegroundProperty) as Brush; + set => SetValue(NotCheckedIconForegroundProperty, value); + } + + public Brush? CheckedIconForeground + { + get => GetValue(CheckedIconForegroundProperty) as Brush; + set => SetValue(CheckedIconForegroundProperty, value); + } + + public Brush? NotCheckedIconBackground + { + get => GetValue(NotCheckedIconBackgroundProperty) as Brush; + set => SetValue(NotCheckedIconBackgroundProperty, value); + } + + public Brush? CheckedIconBackground + { + get => GetValue(CheckedIconBackgroundProperty) as Brush; + set => SetValue(CheckedIconBackgroundProperty, value); + } + + public GoldDiffCheckBox() + { + Style = Application.Current?.Resources[GoldDiffSharedResourceKeys.DefaultGoldDiffCheckBoxStyle] as Style; + } + } +} \ No newline at end of file diff --git a/GoldDiff.Shared/View/ControlElement/IconButton.cs b/GoldDiff.Shared/View/ControlElement/IconButton.cs index ae476ac..be5deb5 100644 --- a/GoldDiff.Shared/View/ControlElement/IconButton.cs +++ b/GoldDiff.Shared/View/ControlElement/IconButton.cs @@ -97,7 +97,7 @@ public Brush? BorderBrushWhenDisabled public IconButton() { - Style = Application.Current?.Resources[GoldDiffSharedResourceKeys.DefaultIconButtonStyle] as Style ?? null; + Style = Application.Current?.Resources[GoldDiffSharedResourceKeys.DefaultIconButtonStyle] as Style; } } } \ No newline at end of file diff --git a/GoldDiff.Shared/View/ControlElement/IconControl.cs b/GoldDiff.Shared/View/ControlElement/IconControl.cs index 232a620..9396c04 100644 --- a/GoldDiff.Shared/View/ControlElement/IconControl.cs +++ b/GoldDiff.Shared/View/ControlElement/IconControl.cs @@ -17,7 +17,7 @@ public Geometry? Source public IconControl() { - Style = Application.Current?.Resources[GoldDiffSharedResourceKeys.DefaultIconControlStyle] as Style ?? null; + Style = Application.Current?.Resources[GoldDiffSharedResourceKeys.DefaultIconControlStyle] as Style; } } } \ No newline at end of file diff --git a/GoldDiff.Shared/View/ControlElement/WindowControlBar.xaml b/GoldDiff.Shared/View/ControlElement/WindowControlBar.xaml index b02f861..b0cc49a 100644 --- a/GoldDiff.Shared/View/ControlElement/WindowControlBar.xaml +++ b/GoldDiff.Shared/View/ControlElement/WindowControlBar.xaml @@ -41,7 +41,7 @@ Command="{x:Static command:Commands.ToggleMaximizeWindow}" CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Window}}}" /> - - + M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z + + + M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z + diff --git a/GoldDiff.Shared/View/Style/DefaultDialogStyle.xaml b/GoldDiff.Shared/View/Style/DefaultDialogStyle.xaml new file mode 100644 index 0000000..fde4218 --- /dev/null +++ b/GoldDiff.Shared/View/Style/DefaultDialogStyle.xaml @@ -0,0 +1,57 @@ + + + + + \ No newline at end of file diff --git a/GoldDiff.Shared/View/Style/DefaultGoldDiffCheckBoxStyle.xaml b/GoldDiff.Shared/View/Style/DefaultGoldDiffCheckBoxStyle.xaml new file mode 100644 index 0000000..6f44b3a --- /dev/null +++ b/GoldDiff.Shared/View/Style/DefaultGoldDiffCheckBoxStyle.xaml @@ -0,0 +1,97 @@ + + + + + \ No newline at end of file