From 95d19726ebf2ade775bea16dcf2f284a1ce96284 Mon Sep 17 00:00:00 2001
From: NaBian <836904362@qq.com>
Date: Thu, 27 Dec 2018 00:01:03 +0800
Subject: [PATCH] add Rate
---
HandyControl/Controls/Input/NumericUpDown.cs | 15 +-
HandyControl/Controls/Rate/Rate.cs | 225 ++++++++++++++++++
HandyControl/Controls/Rate/RateItem.cs | 201 ++++++++++++++++
HandyControl/Controls/Window/BlurWindow.cs | 9 +-
HandyControl/Data/ResourceToken.cs | 2 +
HandyControl/Data/ResourceToken.tt | 3 +-
HandyControl/Data/ValueBoxes.cs | 4 +
HandyControl/HandyControl.csproj | 13 +-
HandyControl/Themes/Basic/Geometries.xaml | 1 +
.../Themes/Styles/Base/RateBaseStyle.xaml | 90 +++++++
HandyControl/Themes/Styles/Rate.xaml | 10 +
HandyControl/Themes/Styles/Style.xaml | 1 +
HandyControl/Tools/Helper/ArithmeticHelper.cs | 8 +
HandyControlDemo/App.xaml.cs | 4 +
HandyControlDemo/Data/MessageToken.cs | 2 +
HandyControlDemo/Data/MessageToken.tt | 3 +-
HandyControlDemo/HandyControlDemo.csproj | 10 +
.../Properties/Langs/Lang.Designer.cs | 9 +
.../Properties/Langs/Lang.en.resx | 3 +
HandyControlDemo/Properties/Langs/Lang.resx | 3 +
.../Resources/Img/LeftMainContent/Star.png | Bin 0 -> 1904 bytes
.../Resources/Themes/Basic/Geometries.xaml | 1 +
.../Tools}/CommonHelper.cs | 2 +-
.../UserControl/Controls/RateDemoCtl.xaml | 14 ++
.../UserControl/Controls/RateDemoCtl.xaml.cs | 10 +
.../UserControl/Main/LeftMainContent.xaml | 9 +-
README.md | 4 +
Resources/Rate.png | Bin 0 -> 3435 bytes
28 files changed, 634 insertions(+), 22 deletions(-)
create mode 100644 HandyControl/Controls/Rate/Rate.cs
create mode 100644 HandyControl/Controls/Rate/RateItem.cs
create mode 100644 HandyControl/Themes/Styles/Base/RateBaseStyle.xaml
create mode 100644 HandyControl/Themes/Styles/Rate.xaml
create mode 100644 HandyControlDemo/Resources/Img/LeftMainContent/Star.png
rename {HandyControl/Tools/Helper => HandyControlDemo/Tools}/CommonHelper.cs (95%)
create mode 100644 HandyControlDemo/UserControl/Controls/RateDemoCtl.xaml
create mode 100644 HandyControlDemo/UserControl/Controls/RateDemoCtl.xaml.cs
create mode 100644 Resources/Rate.png
diff --git a/HandyControl/Controls/Input/NumericUpDown.cs b/HandyControl/Controls/Input/NumericUpDown.cs
index 8c539a2d..a22eab01 100644
--- a/HandyControl/Controls/Input/NumericUpDown.cs
+++ b/HandyControl/Controls/Input/NumericUpDown.cs
@@ -4,6 +4,7 @@ using System.Windows.Controls;
using System.Windows.Input;
using HandyControl.Data;
using HandyControl.Interactivity;
+using HandyControl.Tools;
namespace HandyControl.Controls
{
@@ -152,7 +153,7 @@ namespace HandyControl.Controls
public static readonly DependencyProperty ValueProperty = DependencyProperty.Register(
"Value", typeof(double), typeof(NumericUpDown),
new FrameworkPropertyMetadata(default(double), FrameworkPropertyMetadataOptions.BindsTwoWayByDefault,
- OnValueChanged, CoerceValue), IsValidDoubleValue);
+ OnValueChanged, CoerceValue), ArithmeticHelper.IsValidDoubleValue);
private static void OnValueChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
@@ -203,7 +204,7 @@ namespace HandyControl.Controls
/// 最大值
///
public static readonly DependencyProperty MaximumProperty = DependencyProperty.Register(
- "Maximum", typeof(double), typeof(NumericUpDown), new PropertyMetadata(100.0, OnMaximumChanged, CoerceMaximum), IsValidDoubleValue);
+ "Maximum", typeof(double), typeof(NumericUpDown), new PropertyMetadata(100.0, OnMaximumChanged, CoerceMaximum), ArithmeticHelper.IsValidDoubleValue);
private static void OnMaximumChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
@@ -231,7 +232,7 @@ namespace HandyControl.Controls
/// 最小值
///
public static readonly DependencyProperty MinimumProperty = DependencyProperty.Register(
- "Minimum", typeof(double), typeof(NumericUpDown), new PropertyMetadata(default(double), OnMinimumChanged, CoerceMinimum), IsValidDoubleValue);
+ "Minimum", typeof(double), typeof(NumericUpDown), new PropertyMetadata(default(double), OnMinimumChanged, CoerceMinimum), ArithmeticHelper.IsValidDoubleValue);
private static void OnMinimumChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
@@ -255,14 +256,6 @@ namespace HandyControl.Controls
set => SetValue(MinimumProperty, value);
}
- private static bool IsValidDoubleValue(object value)
- {
- var d = (double)value;
- if (!double.IsNaN(d))
- return !double.IsInfinity(d);
- return false;
- }
-
///
/// 指示每单击一下按钮时增加或减少的数量
///
diff --git a/HandyControl/Controls/Rate/Rate.cs b/HandyControl/Controls/Rate/Rate.cs
new file mode 100644
index 00000000..e2595971
--- /dev/null
+++ b/HandyControl/Controls/Rate/Rate.cs
@@ -0,0 +1,225 @@
+using System.Linq;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Input;
+using System.Windows.Media;
+using HandyControl.Data;
+
+namespace HandyControl.Controls
+{
+ public class Rate : ItemsControl
+ {
+ private bool _isLoaded;
+
+ public Rate()
+ {
+ AddHandler(RateItem.SelectedChangedEvent, new RoutedEventHandler(RateItemSelectedChanged));
+ AddHandler(RateItem.ValueChangedEvent, new RoutedEventHandler(RateItemValueChanged));
+
+ Loaded += (s, e) =>
+ {
+ if (_isLoaded) return;
+ _isLoaded = true;
+ if (Value <= 0)
+ {
+ if (DefaultValue > 0)
+ {
+ Value = DefaultValue;
+ UpdateItems();
+ }
+ }
+ else
+ {
+ UpdateItems();
+ }
+ };
+ }
+
+ private void RateItemValueChanged(object sender, RoutedEventArgs e) => Value =
+ (from RateItem item in Items where item.IsSelected select item.IsHalf ? 0.5 : 1).Sum();
+
+ private void RateItemSelectedChanged(object sender, RoutedEventArgs e)
+ {
+ if (e.OriginalSource is RateItem rateItem)
+ {
+ var index = rateItem.Index;
+ for (int i = 0; i < index; i++)
+ {
+ if (Items[i] is RateItem item)
+ {
+ item.IsSelected = true;
+ item.IsHalf = false;
+ }
+ }
+ for (int i = index; i < Count; i++)
+ {
+ if (Items[i] is RateItem item)
+ {
+ item.IsSelected = false;
+ item.IsHalf = false;
+ }
+ }
+ }
+ }
+
+ public static readonly DependencyProperty ItemMarginProperty = DependencyProperty.Register(
+ "ItemMargin", typeof(Thickness), typeof(Rate), new PropertyMetadata(default(Thickness)));
+
+ public Thickness ItemMargin
+ {
+ get => (Thickness)GetValue(ItemMarginProperty);
+ set => SetValue(ItemMarginProperty, value);
+ }
+
+ public static readonly DependencyProperty ItemWidthProperty = DependencyProperty.Register(
+ "ItemWidth", typeof(double), typeof(Rate), new PropertyMetadata(ValueBoxes.Double20Box));
+
+ public double ItemWidth
+ {
+ get => (double)GetValue(ItemWidthProperty);
+ set => SetValue(ItemWidthProperty, value);
+ }
+
+ public static readonly DependencyProperty ItemHeightProperty = DependencyProperty.Register(
+ "ItemHeight", typeof(double), typeof(Rate), new PropertyMetadata(ValueBoxes.Double20Box));
+
+ public double ItemHeight
+ {
+ get => (double)GetValue(ItemHeightProperty);
+ set => SetValue(ItemHeightProperty, value);
+ }
+
+ public static readonly DependencyProperty AllowHalfProperty = DependencyProperty.Register(
+ "AllowHalf", typeof(bool), typeof(Rate), new PropertyMetadata(ValueBoxes.FalseBox));
+
+ public bool AllowHalf
+ {
+ get => (bool)GetValue(AllowHalfProperty);
+ set => SetValue(AllowHalfProperty, value);
+ }
+
+ public static readonly DependencyProperty AllowClearProperty = DependencyProperty.Register(
+ "AllowClear", typeof(bool), typeof(Rate), new PropertyMetadata(ValueBoxes.TrueBox));
+
+ public bool AllowClear
+ {
+ get => (bool)GetValue(AllowClearProperty);
+ set => SetValue(AllowClearProperty, value);
+ }
+
+ public static readonly DependencyProperty IconProperty = DependencyProperty.Register(
+ "Icon", typeof(Geometry), typeof(Rate), new PropertyMetadata(default(Geometry)));
+
+ public Geometry Icon
+ {
+ get => (Geometry)GetValue(IconProperty);
+ set => SetValue(IconProperty, value);
+ }
+
+ public static readonly DependencyProperty CountProperty = DependencyProperty.Register(
+ "Count", typeof(int), typeof(Rate), new PropertyMetadata(ValueBoxes.Int5Box));
+
+ public int Count
+ {
+ get => (int)GetValue(CountProperty);
+ set => SetValue(CountProperty, value);
+ }
+
+ public static readonly DependencyProperty DefaultValueProperty = DependencyProperty.Register(
+ "DefaultValue", typeof(double), typeof(Rate), new PropertyMetadata(ValueBoxes.Double0Box));
+
+ public double DefaultValue
+ {
+ get => (double)GetValue(DefaultValueProperty);
+ set => SetValue(DefaultValueProperty, value);
+ }
+
+ public static readonly DependencyProperty ValueProperty = DependencyProperty.Register(
+ "Value", typeof(double), typeof(Rate), new PropertyMetadata(ValueBoxes.Double0Box));
+
+ public double Value
+ {
+ get => (double)GetValue(ValueProperty);
+ set => SetValue(ValueProperty, value);
+ }
+
+ public static readonly DependencyProperty TextProperty = DependencyProperty.Register(
+ "Text", typeof(string), typeof(Rate), new PropertyMetadata(default(string)));
+
+ public string Text
+ {
+ get => (string)GetValue(TextProperty);
+ set => SetValue(TextProperty, value);
+ }
+
+ public static readonly DependencyProperty ShowTextProperty = DependencyProperty.Register(
+ "ShowText", typeof(bool), typeof(Rate), new PropertyMetadata(ValueBoxes.FalseBox));
+
+ public bool ShowText
+ {
+ get => (bool)GetValue(ShowTextProperty);
+ set => SetValue(ShowTextProperty, value);
+ }
+
+ protected override bool IsItemItsOwnContainerOverride(object item) => item is RateItem;
+
+ protected override DependencyObject GetContainerForItemOverride() => new RateItem();
+
+ public override void OnApplyTemplate()
+ {
+ base.OnApplyTemplate();
+
+ if (!_isLoaded)
+ {
+ Items.Clear();
+
+ for (int i = 1; i <= Count; i++)
+ {
+ Items.Add(new RateItem
+ {
+ Index = i
+ });
+ }
+ }
+ }
+
+ protected override void OnMouseLeave(MouseEventArgs e)
+ {
+ base.OnMouseLeave(e);
+
+ UpdateItems();
+ }
+
+ private void UpdateItems()
+ {
+ var count = (int)Value;
+ for (int i = 0; i < count; i++)
+ {
+ if (Items[i] is RateItem rateItem)
+ {
+ rateItem.IsSelected = true;
+ rateItem.IsHalf = false;
+ }
+ }
+ if (Value > count)
+ {
+ if (Items[count] is RateItem rateItem)
+ {
+ rateItem.IsSelected = true;
+ rateItem.IsHalf = true;
+ }
+ count += 1;
+ }
+ for (int i = count; i < Count; i++)
+ {
+ if (Items[i] is RateItem rateItem)
+ {
+ rateItem.IsSelected = false;
+ rateItem.IsHalf = false;
+ }
+ }
+ }
+
+ public void Reset() => Value = DefaultValue;
+ }
+}
diff --git a/HandyControl/Controls/Rate/RateItem.cs b/HandyControl/Controls/Rate/RateItem.cs
new file mode 100644
index 00000000..383a61ea
--- /dev/null
+++ b/HandyControl/Controls/Rate/RateItem.cs
@@ -0,0 +1,201 @@
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Input;
+using System.Windows.Media;
+using HandyControl.Data;
+using HandyControl.Tools.Extension;
+
+namespace HandyControl.Controls
+{
+ [TemplatePart(Name = ElementIcon, Type = typeof(FrameworkElement))]
+ public class RateItem : Control
+ {
+ private const string ElementIcon = "PART_Icon";
+
+ private FrameworkElement _icon;
+
+ private bool _isLoaded;
+
+ private bool _isSentValue;
+
+ private bool _isMouseLeftButtonDown;
+
+ public RateItem() => Loaded += (s, e) => _isLoaded = true;
+
+ public static readonly DependencyProperty AllowClearProperty = DependencyProperty.Register(
+ "AllowClear", typeof(bool), typeof(RateItem), new PropertyMetadata(ValueBoxes.TrueBox));
+
+ public bool AllowClear
+ {
+ get => (bool)GetValue(AllowClearProperty);
+ set => SetValue(AllowClearProperty, value);
+ }
+
+ public static readonly DependencyProperty AllowHalfProperty = DependencyProperty.Register(
+ "AllowHalf", typeof(bool), typeof(RateItem), new PropertyMetadata(ValueBoxes.FalseBox, OnAllowHalfChanged));
+
+ private static void OnAllowHalfChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
+ {
+ var ctl = (RateItem)d;
+ ctl.HandleMouseMoveEvent((bool)e.NewValue);
+ }
+
+ public bool AllowHalf
+ {
+ get => (bool)GetValue(AllowHalfProperty);
+ set => SetValue(AllowHalfProperty, value);
+ }
+
+ public static readonly DependencyProperty IconProperty = DependencyProperty.Register(
+ "Icon", typeof(Geometry), typeof(RateItem), new PropertyMetadata(default(Geometry)));
+
+ public Geometry Icon
+ {
+ get => (Geometry)GetValue(IconProperty);
+ set => SetValue(IconProperty, value);
+ }
+
+ internal static readonly DependencyProperty IsSelectedProperty = DependencyProperty.Register(
+ "IsSelected", typeof(bool), typeof(RateItem), new PropertyMetadata(ValueBoxes.FalseBox, OnIsSelectedChanged));
+
+ private static void OnIsSelectedChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
+ {
+ var ctl = (RateItem)d;
+ ctl._icon.Show((bool)e.NewValue);
+ }
+
+ internal bool IsSelected
+ {
+ get => (bool)GetValue(IsSelectedProperty);
+ set => SetValue(IsSelectedProperty, value);
+ }
+
+ public static readonly RoutedEvent SelectedChangedEvent =
+ EventManager.RegisterRoutedEvent("SelectedChanged", RoutingStrategy.Bubble,
+ typeof(RoutedEventHandler), typeof(RateItem));
+
+ public event RoutedEventHandler SelectedChanged
+ {
+ add => AddHandler(SelectedChangedEvent, value);
+ remove => RemoveHandler(SelectedChangedEvent, value);
+ }
+
+ public static readonly RoutedEvent ValueChangedEvent =
+ EventManager.RegisterRoutedEvent("ValueChanged", RoutingStrategy.Bubble,
+ typeof(RoutedEventHandler), typeof(RateItem));
+
+ public event RoutedEventHandler ValueChanged
+ {
+ add => AddHandler(ValueChangedEvent, value);
+ remove => RemoveHandler(ValueChangedEvent, value);
+ }
+
+ private bool _isHalf;
+
+ internal bool IsHalf
+ {
+ get => _isHalf;
+ set
+ {
+ if (_isHalf == value) return;
+ _isHalf = value;
+ _icon.Width = value ? ActualWidth / 2 : ActualWidth;
+ }
+ }
+
+ internal int Index { get; set; }
+
+ private void HandleMouseMoveEvent(bool handle)
+ {
+ if (handle)
+ {
+ MouseMove += RateItem_MouseMove;
+ }
+ else
+ {
+ MouseMove -= RateItem_MouseMove;
+ }
+ }
+
+ private void RateItem_MouseMove(object sender, MouseEventArgs e)
+ {
+ if (!AllowHalf) return;
+ var p = e.GetPosition(this);
+ IsHalf = p.X < ActualWidth / 2;
+ }
+
+ public override void OnApplyTemplate()
+ {
+ base.OnApplyTemplate();
+
+ _icon = GetTemplateChild(ElementIcon) as FrameworkElement;
+
+ if (_isLoaded)
+ {
+ if (_icon == null) return;
+ _icon.Show(IsSelected);
+ _icon.Width = IsHalf ? ActualWidth / 2 : ActualWidth;
+ }
+ }
+
+ protected override void OnMouseEnter(MouseEventArgs e)
+ {
+ base.OnMouseEnter(e);
+
+ _isSentValue = false;
+ IsSelected = true;
+ RaiseEvent(new RoutedEventArgs(SelectedChangedEvent) { Source = this });
+ }
+
+ protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
+ {
+ base.OnMouseLeftButtonDown(e);
+
+ _isMouseLeftButtonDown = true;
+ }
+
+ protected override void OnMouseLeave(MouseEventArgs e)
+ {
+ base.OnMouseLeave(e);
+
+ _isMouseLeftButtonDown = false;
+ }
+
+ protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e)
+ {
+ base.OnMouseLeftButtonUp(e);
+
+ if (_isMouseLeftButtonDown)
+ {
+ if (Index == 1 && AllowClear)
+ {
+ if (IsSelected)
+ {
+ if (!_isSentValue)
+ {
+ RaiseEvent(new RoutedEventArgs(ValueChangedEvent) {Source = this});
+ _isMouseLeftButtonDown = false;
+ _isSentValue = true;
+ return;
+ }
+ _isSentValue = false;
+ IsSelected = false;
+ IsHalf = false;
+ }
+ else
+ {
+ IsSelected = true;
+ if (AllowHalf)
+ {
+ var p = e.GetPosition(this);
+ IsHalf = p.X < ActualWidth / 2;
+ }
+ }
+ }
+
+ RaiseEvent(new RoutedEventArgs(ValueChangedEvent) {Source = this});
+ _isMouseLeftButtonDown = false;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/HandyControl/Controls/Window/BlurWindow.cs b/HandyControl/Controls/Window/BlurWindow.cs
index 44ec09d5..e9ccb82c 100644
--- a/HandyControl/Controls/Window/BlurWindow.cs
+++ b/HandyControl/Controls/Window/BlurWindow.cs
@@ -13,17 +13,18 @@ namespace HandyControl.Controls
EnableBlur(this);
}
+ public static SystemVersionInfo SystemVersionInfo { get; set; }
+
internal static void EnableBlur(Window window)
{
var accentPolicy = new ExternDllHelper.ACCENTPOLICY();
var accentPolicySize = Marshal.SizeOf(accentPolicy);
- var versionInfo = CommonHelper.GetSystemVersionInfo();
- if (versionInfo >= SystemVersionInfo.Windows10_1809)
+ if (SystemVersionInfo >= SystemVersionInfo.Windows10_1809)
{
accentPolicy.AccentState = ExternDllHelper.ACCENTSTATE.ACCENT_ENABLE_ACRYLICBLURBEHIND;
}
- else if (versionInfo >= SystemVersionInfo.Windows10)
+ else if (SystemVersionInfo >= SystemVersionInfo.Windows10)
{
accentPolicy.AccentState = ExternDllHelper.ACCENTSTATE.ACCENT_ENABLE_BLURBEHIND;
}
@@ -33,7 +34,7 @@ namespace HandyControl.Controls
}
accentPolicy.AccentFlags = 2;
- accentPolicy.GradientColor = ResourceHelper.GetResource("BlurGradientValue");
+ accentPolicy.GradientColor = ResourceHelper.GetResource(ResourceToken.BlurGradientValue);
var accentPtr = Marshal.AllocHGlobal(accentPolicySize);
Marshal.StructureToPtr(accentPolicy, accentPtr, false);
diff --git a/HandyControl/Data/ResourceToken.cs b/HandyControl/Data/ResourceToken.cs
index 7107e421..e3c9c236 100644
--- a/HandyControl/Data/ResourceToken.cs
+++ b/HandyControl/Data/ResourceToken.cs
@@ -30,6 +30,8 @@
public static readonly string ThirdlyTextBrush = nameof(ThirdlyTextBrush);
+ public static readonly string BlurGradientValue = nameof(BlurGradientValue);
+
public static readonly string ButtonCustom = nameof(ButtonCustom);
public static readonly string PaginationButtonStyle = nameof(PaginationButtonStyle);
diff --git a/HandyControl/Data/ResourceToken.tt b/HandyControl/Data/ResourceToken.tt
index e4a77c12..ad53ea13 100644
--- a/HandyControl/Data/ResourceToken.tt
+++ b/HandyControl/Data/ResourceToken.tt
@@ -20,7 +20,8 @@ var brushList = new List
"WarningBrush",
"AccentBrush",
"PrimaryTextBrush",
- "ThirdlyTextBrush"
+ "ThirdlyTextBrush",
+ "BlurGradientValue"
};
var styleList = new List
{
diff --git a/HandyControl/Data/ValueBoxes.cs b/HandyControl/Data/ValueBoxes.cs
index ece11652..63599e41 100644
--- a/HandyControl/Data/ValueBoxes.cs
+++ b/HandyControl/Data/ValueBoxes.cs
@@ -13,6 +13,8 @@
internal static object Double1Box = 1.0;
+ internal static object Double20Box = 20.0;
+
internal static object Double100Box = 100.0;
internal static object DoubleNeg1Box = -1.0;
@@ -21,6 +23,8 @@
internal static object Int1Box = 1;
+ internal static object Int5Box = 5;
+
internal static object BooleanBox(bool value) => value ? TrueBox : FalseBox;
}
}
\ No newline at end of file
diff --git a/HandyControl/HandyControl.csproj b/HandyControl/HandyControl.csproj
index bd2d4e25..d28b79d8 100644
--- a/HandyControl/HandyControl.csproj
+++ b/HandyControl/HandyControl.csproj
@@ -110,6 +110,8 @@
+
+
@@ -200,7 +202,6 @@
-
@@ -575,6 +576,14 @@
Designer
MSBuild:Compile
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
Designer
MSBuild:Compile
@@ -667,7 +676,6 @@
-
@@ -701,6 +709,7 @@
+
diff --git a/HandyControl/Themes/Basic/Geometries.xaml b/HandyControl/Themes/Basic/Geometries.xaml
index 09aa01b0..9fb0882e 100644
--- a/HandyControl/Themes/Basic/Geometries.xaml
+++ b/HandyControl/Themes/Basic/Geometries.xaml
@@ -23,6 +23,7 @@
M0,4 L10,4 L10,5 L0,5 z
M1,3 L1,9 L7,9 L7,3 z M3,1 L3,2 L8,2 L8,7 L9,7 L9,1 z M2,0 L10,0 L10,8 L8,8 L8,10 L0,10 L0,2 L2,2 z
M1,1 L1,9 L9,9 L9,1 z M0,0 L10,0 L10,10 L0,10 z
+ M535.9 165.2l96.5 195.4c3.9 7.9 11.4 13.3 20.1 14.6l215.7 31.3c21.9 3.2 30.6 30 14.8 45.5L726.8 604.1c-6.3 6.1-9.1 14.9-7.7 23.6L756 842.5c3.7 21.8-19.1 38.4-38.7 28.1L524.4 769.2c-7.8-4.1-17-4.1-24.8 0L306.7 870.6c-19.6 10.3-42.4-6.3-38.7-28.1l36.8-214.8c1.5-8.6-1.4-17.5-7.7-23.6L141.1 452c-15.8-15.4-7.1-42.3 14.8-45.5l215.7-31.3c8.7-1.3 16.2-6.7 20.1-14.6l96.5-195.4c9.7-19.9 37.9-19.9 47.7 0z
M938.666667 426.666667h-341.333334V85.333333c0-46.933333-38.4-85.333333-85.333333-85.333333s-85.333333 38.4-85.333333 85.333333v341.333334H85.333333c-46.933333 0-85.333333 38.4-85.333333 85.333333s38.4 85.333333 85.333333 85.333333h341.333334v341.333334c0 46.933333 38.4 85.333333 85.333333 85.333333s85.333333-38.4 85.333333-85.333333v-341.333334h341.333334c46.933333 0 85.333333-38.4 85.333333-85.333333s-38.4-85.333333-85.333333-85.333333z
M62.5797 488.9508c0.2632 42.5185 34.985 77.2116 77.5035 77.5035l743.0216-0.6728c42.5185 0.3215 76.7437-33.9333 76.4518-76.4805l0 0c-0.2918-42.5175-34.985-77.2106-77.5045-77.5035l-743.0216-0.087C96.513 411.4473 62.2879 446.4323 62.5797 488.9508L62.5797 488.9508z
M943.644188 827.215696l-351.176649-608.204749c-42.945473-74.36249-113.147387-74.36249-156.092861 0l-351.176649 608.204749c-42.946498 74.431167-7.811716 135.14955 78.012605 135.14955l702.420949 0C951.455904 962.36422 986.555836 901.645838 943.644188 827.215696zM466.187532 391.579035c12.621133-13.644108 28.66175-20.466675 48.233578-20.466675 19.580028 0 35.612444 6.75389 48.241778 20.194018 12.544256 13.473954 18.820484 30.325365 18.820484 50.587035 0 17.430551-26.19759 145.621205-34.929778 238.882082l-63.105666 0c-7.666162-93.259852-36.090106-221.450507-36.090106-238.882082C447.358847 421.938226 453.643275 405.155491 466.187532 391.579035zM561.76804 835.026386c-13.268949 12.928641-29.062535 19.375023-47.345906 19.375023-18.275171 0-34.076957-6.447407-47.346931-19.375023-13.235123-12.89379-19.818859-28.517221-19.818859-46.869269 0-18.249546 6.583736-34.043131 19.818859-47.278254 13.268949-13.235123 29.07176-19.852685 47.346931-19.852685 18.283371 0 34.076957 6.617562 47.345906 19.852685 13.235123 13.235123 19.827059 29.028709 19.827059 47.278254C581.595099 806.51019 575.003163 822.132597 561.76804 835.026386z
diff --git a/HandyControl/Themes/Styles/Base/RateBaseStyle.xaml b/HandyControl/Themes/Styles/Base/RateBaseStyle.xaml
new file mode 100644
index 00000000..9d29a661
--- /dev/null
+++ b/HandyControl/Themes/Styles/Base/RateBaseStyle.xaml
@@ -0,0 +1,90 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HandyControl/Themes/Styles/Rate.xaml b/HandyControl/Themes/Styles/Rate.xaml
new file mode 100644
index 00000000..e738b8c6
--- /dev/null
+++ b/HandyControl/Themes/Styles/Rate.xaml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HandyControl/Themes/Styles/Style.xaml b/HandyControl/Themes/Styles/Style.xaml
index 67c82899..aaa06631 100644
--- a/HandyControl/Themes/Styles/Style.xaml
+++ b/HandyControl/Themes/Styles/Style.xaml
@@ -48,6 +48,7 @@
+
\ No newline at end of file
diff --git a/HandyControl/Tools/Helper/ArithmeticHelper.cs b/HandyControl/Tools/Helper/ArithmeticHelper.cs
index c5d7cfe8..4ce4efdf 100644
--- a/HandyControl/Tools/Helper/ArithmeticHelper.cs
+++ b/HandyControl/Tools/Helper/ArithmeticHelper.cs
@@ -120,5 +120,13 @@ namespace HandyControl.Tools
///
///
public static double CalAngle(Point center, Point p) => Math.Atan2(p.Y - center.Y, p.X - center.X) * 180 / Math.PI;
+
+ public static bool IsValidDoubleValue(object value)
+ {
+ var d = (double)value;
+ if (!double.IsNaN(d))
+ return !double.IsInfinity(d);
+ return false;
+ }
}
}
\ No newline at end of file
diff --git a/HandyControlDemo/App.xaml.cs b/HandyControlDemo/App.xaml.cs
index eb2dfa4a..4be12a85 100644
--- a/HandyControlDemo/App.xaml.cs
+++ b/HandyControlDemo/App.xaml.cs
@@ -2,9 +2,11 @@
using System.Globalization;
using System.Threading;
using System.Windows;
+using HandyControl.Controls;
using HandyControl.Data;
using HandyControl.Tools;
using HandyControlDemo.Data;
+using HandyControlDemo.Tools;
namespace HandyControlDemo
{
@@ -24,6 +26,8 @@ namespace HandyControlDemo
{
UpdateSkin(GlobalData.Config.Skin);
}
+
+ BlurWindow.SystemVersionInfo = CommonHelper.GetSystemVersionInfo();
}
protected override void OnExit(ExitEventArgs e)
diff --git a/HandyControlDemo/Data/MessageToken.cs b/HandyControlDemo/Data/MessageToken.cs
index 99352199..588a5b6d 100644
--- a/HandyControlDemo/Data/MessageToken.cs
+++ b/HandyControlDemo/Data/MessageToken.cs
@@ -64,6 +64,8 @@
public static readonly string BlurWindow = nameof(BlurWindow);
+ public static readonly string RateDemoCtl = nameof(RateDemoCtl);
+
public static readonly string ButtonDemoCtl = nameof(ButtonDemoCtl);
public static readonly string ToggleButtonDemoCtl = nameof(ToggleButtonDemoCtl);
diff --git a/HandyControlDemo/Data/MessageToken.tt b/HandyControlDemo/Data/MessageToken.tt
index 33d5df37..f9ae0db6 100644
--- a/HandyControlDemo/Data/MessageToken.tt
+++ b/HandyControlDemo/Data/MessageToken.tt
@@ -34,7 +34,8 @@ var controlList = new List
"OutlineTextDemoCtl",
"FlipClockDemoCtl",
"QQGroupView",
- "BlurWindow"
+ "BlurWindow",
+ "RateDemoCtl"
};
var styleList = new List
{
diff --git a/HandyControlDemo/HandyControlDemo.csproj b/HandyControlDemo/HandyControlDemo.csproj
index 2febdddd..87384aa3 100644
--- a/HandyControlDemo/HandyControlDemo.csproj
+++ b/HandyControlDemo/HandyControlDemo.csproj
@@ -59,6 +59,7 @@
+
..\packages\MvvmLightLibs.5.4.1\lib\net45\System.Windows.Interactivity.dll
@@ -96,6 +97,7 @@
+
Avatar.xaml
@@ -160,6 +162,9 @@
PreviewSliderDemoCtl.xaml
+
+ RateDemoCtl.xaml
+
ScrollViewerDemoCtl.xaml
@@ -438,6 +443,10 @@
Designer
MSBuild:Compile
+
+ Designer
+ MSBuild:Compile
+
Designer
MSBuild:Compile
@@ -638,6 +647,7 @@
TextTemplatingFileGenerator
MessageToken.cs
+
diff --git a/HandyControlDemo/Properties/Langs/Lang.Designer.cs b/HandyControlDemo/Properties/Langs/Lang.Designer.cs
index 0ae57398..a4904768 100644
--- a/HandyControlDemo/Properties/Langs/Lang.Designer.cs
+++ b/HandyControlDemo/Properties/Langs/Lang.Designer.cs
@@ -744,6 +744,15 @@ namespace HandyControlDemo.Properties.Langs {
}
}
+ ///
+ /// 查找类似 评分 的本地化字符串。
+ ///
+ public static string Rate {
+ get {
+ return ResourceManager.GetString("Rate", resourceCulture);
+ }
+ }
+
///
/// 查找类似 注册 的本地化字符串。
///
diff --git a/HandyControlDemo/Properties/Langs/Lang.en.resx b/HandyControlDemo/Properties/Langs/Lang.en.resx
index 0c3e71ad..b3355a51 100644
--- a/HandyControlDemo/Properties/Langs/Lang.en.resx
+++ b/HandyControlDemo/Properties/Langs/Lang.en.resx
@@ -444,4 +444,7 @@
open blur window
+
+ Rate
+
\ No newline at end of file
diff --git a/HandyControlDemo/Properties/Langs/Lang.resx b/HandyControlDemo/Properties/Langs/Lang.resx
index 18453f64..218da9cf 100644
--- a/HandyControlDemo/Properties/Langs/Lang.resx
+++ b/HandyControlDemo/Properties/Langs/Lang.resx
@@ -424,4 +424,7 @@
点击打开背景模糊窗口
+
+ 评分
+
\ No newline at end of file
diff --git a/HandyControlDemo/Resources/Img/LeftMainContent/Star.png b/HandyControlDemo/Resources/Img/LeftMainContent/Star.png
new file mode 100644
index 0000000000000000000000000000000000000000..da69341b015e7ee6a4daa8f032274180141d26f4
GIT binary patch
literal 1904
zcmbVMeQXnD7=Opy2gME8FhdkP4*UYzyX(5!dbVR9?QDUTW^EWF7BM*v8X1mALPxoZi-$w33l%hk{j
z4T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yc@ATf%Z!0?1Ir_Zs-cvns@|LNA@BW%n
z*Hg40N!nfoBh}%R135*EG&A6|yKNmMRU7{S(F=E?
literal 0
HcmV?d00001
diff --git a/HandyControlDemo/Resources/Themes/Basic/Geometries.xaml b/HandyControlDemo/Resources/Themes/Basic/Geometries.xaml
index d8672bc3..de1ea0c5 100644
--- a/HandyControlDemo/Resources/Themes/Basic/Geometries.xaml
+++ b/HandyControlDemo/Resources/Themes/Basic/Geometries.xaml
@@ -9,6 +9,7 @@
M449.722947 199.412211H706.021053c130.967579 0 237.136842 106.169263 237.136842 237.136842v256.298105c0 130.967579-106.169263 237.136842-237.136842 237.136842H449.722947c-130.965895 0-237.136842-106.169263-237.136842-237.136842V436.549053c0-130.967579 106.170947-237.136842 237.136842-237.136842z m-201.205894-21.557895c0-64.299789-70.085053-104.704-125.850948-72.55579s-55.764211 112.96 0 145.111579 125.850947-8.257684 125.850948-72.555789z m239.528421 234.74021c0-68.003368-74.088421-110.736842-133.037474-76.734315s-58.950737 119.467789 0 153.470315 133.039158-8.730947 133.039158-76.736zM835.368421 692.847158c0-117.596632-128.154947-191.494737-230.123789-132.695579s-101.970526 206.593684 0 265.391158S835.368421 810.443789 835.368421 692.847158z
M430.079734 481.464543c45.196365 45.596478 118.486578 45.596478 163.68499 0l360.684736-324.939627c0.547469 3.751441 1.13894 7.490601 1.13894 11.401678l0 404.753417 0 116.754121c0 42.995233-34.547841 77.838809-77.145008 77.838809L145.397996 767.272941c-42.597167 0-77.145008-34.844599-77.145008-77.838809L68.252988 494.839155 68.252988 167.926594c0-3.911076 0.593518-7.65126 1.139963-11.401678L430.079734 481.464543zM910.960992 74.226538 562.044278 387.28558c-38.470173 38.811957-62.276369 38.811957-100.770078 0L112.538611 74.408687c10.011005-4.789073 21.069875-7.673773 32.859385-7.673773l733.044372 0C890.095779 66.735937 901.065622 69.539796 910.960992 74.226538z
M260.8 645H160V0h100.8v645zM461.8 152.2h-100.8V1024h100.8V152.2z m201.2 0h-100.8V1024h100.8V152.2zM864 152h-100.8v494H864V152z
+ M890.2 208.2c-91.8-91.9-242.1-91.9-334 0L544.4 220c-18.2 18.2-47.6 18.2-65.8 0l-11.8-11.8c-91.9-91.9-242.1-91.9-334 0C41 300 24.7 533.9 203.6 722.1 304 827.8 412.4 882.3 470 905.9c26.6 10.9 56.5 10.9 83 0 57.6-23.6 166-78.1 266.4-183.8 178.9-188.2 162.6-422 70.8-513.9z
M512 0C229.234472 0 0 229.226146 0 512 0 794.765528 229.234472 1024 512 1024S1024 794.765528 1024 512C1024 229.226146 794.765528 0 512 0zM228.776585 836.066862c-63.163317 0-114.371642-51.208325-114.371642-114.371642S165.613268 607.323577 228.776585 607.323577s114.371642 51.208325 114.371643 114.371643c0 63.171642-51.208325 114.371642-114.371643 114.371642z m420.555968-89.612488a391.867317 391.867317 0 0 1-1.989724 16.975089c-7.259577 30.203837-33.950179 52.898341-66.376845 52.898342-38.104455 0-68.990959-34.158309-68.99096-72.204488 0-5.877593 0.81587-11.463805 2.206179-16.775284-1.756618-131.096976-103.981789-237.867707-233.205593-246.883903l-6.343805-0.740943-1.015675-0.041626c-5.453008-0.216455-10.930992-0.732618-16.142569-2.331057a67.958634 67.958634 0 0 1-47.91987-65.078114c0-37.604943 30.245463-68.091837 67.550699-68.091837 0.299707 0 0.591089 0.041626 0.890797 0.049951l0.124878-0.049951c205.707447 2.139577 371.836878 169.484488 371.836878 375.699772 0 7.717463-0.341333 15.34335-0.824195 22.94426 0.066602 1.207154 0.19148 2.397659 0.199805 3.629789z m254.085203-63.329821c-10.856065 45.172553-25.80813 104.114992-74.310764 104.114992-56.994341 0-48.236228-66.085463-48.236228-122.996553 0-8.791415 1.223805-17.149919 3.296781-25.100488-2.639089-196.108488-169.834146-387.812943-363.137041-401.291447l-35.806699-5.827642c-42.117203-7.492683-111.715902-3.255154-111.715903-49.193626 0-56.253398 50.234276-81.861724 106.038114-81.861724 0.449561 0 0.882472 0.058276 1.332033 0.066602l0.183154-0.066602c307.724488 3.180228 526.252748 208.546341 526.252748 517.028423a538.474146 538.474146 0 0 1-1.23213 34.316488c0.108228 1.806569 0.291382 3.596488 0.308033 5.428032a542.72 542.72 0 0 1-2.972098 25.383545z
M827.904 541.184a278.592 278.592 0 0 0 0-58.368l73.728-58.368c15.872-13.056 20.224-35.584 9.728-53.504l-78.592-137.728c-9.984-17.408-31.232-25.856-51.712-18.176l-86.528 35.072c-15.872-11.52-32.512-21.248-49.664-29.184l-12.8-92.928c-3.072-20.224-20.736-35.584-41.216-35.584h-157.44c-20.736 0-38.144 14.848-41.216 35.84L378.88 221.44c-17.152 7.936-33.792 17.92-49.664 29.184L242.688 215.296c-18.688-7.168-41.216 0.768-51.2 18.176L112.64 371.2c-10.24 17.92-6.144 40.448 10.24 53.76l73.472 58.112c-1.024 9.472-1.536 19.2-1.536 29.184 0 9.728 0.512 19.456 1.536 29.184l-73.984 58.368c-15.872 13.056-19.968 35.584-9.728 53.248l78.848 137.728c9.984 17.408 32 25.856 51.456 17.92l86.528-35.072c15.872 11.52 32.512 21.248 49.664 29.184l13.056 93.696c3.328 20.48 20.48 35.328 41.216 35.328h157.44c20.48 0 38.144-15.36 41.216-35.84l13.056-93.184c17.152-7.936 33.792-17.664 49.664-29.184l86.784 35.328c4.864 1.792 9.984 2.816 15.104 2.816 14.848 0 28.672-7.936 36.096-20.992l78.592-137.728c10.24-17.664 6.4-40.192-9.984-53.76l-73.472-58.112z m-25.344 231.168l-99.584-40.448c-7.424-3.072-15.872-1.792-22.272 3.072-19.712 15.36-40.704 27.648-62.464 36.608-7.424 3.072-12.544 9.728-13.568 17.664l-14.592 104.96-155.392 2.304-15.104-107.264c-1.024-7.936-6.4-14.592-13.568-17.664-21.76-8.96-42.752-21.504-62.464-36.608-4.096-3.072-8.96-4.608-13.824-4.608-2.816 0-5.888 0.512-8.448 1.536l-96.256 41.472-80.896-137.216 84.48-66.816c6.144-4.864 9.472-12.8 8.448-20.48-1.536-12.032-2.56-24.32-2.56-36.608 0-12.288 1.024-24.576 2.56-36.608 1.024-7.936-2.048-15.616-8.448-20.48l-83.712-64 76.544-139.264 99.584 40.448c7.424 3.072 15.872 1.792 22.272-3.072 19.712-15.36 40.96-27.648 62.72-36.864 7.424-3.072 12.544-9.728 13.568-17.664l12.544-104.704 157.696-2.304 15.104 107.264c1.024 7.936 6.4 14.592 13.568 17.664 21.76 8.96 42.752 21.504 62.464 36.864 6.4 4.864 14.848 6.144 22.272 3.072l96.256-41.472 80.896 137.216-84.48 66.816c-6.144 4.864-9.472 12.544-8.448 20.48 1.536 12.032 2.56 24.32 2.56 36.608 0 12.288-1.024 24.576-2.56 36.608-1.024 7.936 2.304 15.616 8.448 20.48l83.712 63.744-77.056 139.264zM512 345.6c-91.136 0-165.12 74.752-165.12 166.4s73.984 166.4 165.12 166.4 165.12-74.752 165.12-166.4-73.984-166.4-165.12-166.4z m0 297.216c-71.168 0-129.28-58.624-129.28-130.816 0-72.192 58.112-130.816 129.28-130.816s129.28 58.624 129.28 130.816c0 72.192-57.856 130.816-129.28 130.816z
M657.486769 287.744c5.671385 0 11.264-5.671385 16.935385-5.671385l186.289231-124.140307c5.592615-5.592615 16.935385-16.935385 16.935384-28.199385V73.334154A74.673231 74.673231 0 0 0 804.233846 0H606.680615v220.002462c0 22.606769-16.935385 33.870769-39.463384 33.870769H454.262154c-22.528 0-39.463385-16.935385-39.463385-33.870769V5.671385H222.838154c-45.134769 0-79.005538 33.870769-79.005539 73.255384v56.477539c0 11.264 5.671385 22.528 16.935385 28.199384l186.289231 124.140308h16.935384C200.310154 349.735385 98.697846 507.746462 121.304615 693.878154c22.528 169.275077 169.353846 310.350769 344.221539 327.207384 237.095385 28.199385 440.32-152.339692 440.32-377.934769 0-158.011077-101.612308-299.008-248.359385-355.406769z m-146.747077 671.271385C335.793231 959.015385 189.046154 818.018462 189.046154 643.150769c0-174.867692 146.747077-310.350769 321.693538-310.350769 174.946462 0 321.693538 141.075692 321.693539 315.943385s-146.747077 310.350769-321.693539 310.350769zM670.798769 572.967385l-68.371692-11.185231a31.507692 31.507692 0 0 1-28.514462-16.777846l-28.514461-55.926154c-17.092923-27.963077-51.278769-27.963077-68.371692 0l-28.514462 55.926154a31.507692 31.507692 0 0 1-28.514462 16.777846l-68.371692 11.185231c-28.514462 5.592615-39.936 39.148308-17.092923 61.44l45.528615 39.227077c5.750154 11.185231 17.171692 22.370462 11.421539 33.555692l-11.421539 67.111384c-5.671385 27.963077 28.514462 50.333538 51.357539 33.555693l62.700308-27.963077a37.021538 37.021538 0 0 1 34.185846 0l62.700307 33.555692c28.514462 16.777846 57.028923-5.592615 51.27877-33.555692l-11.421539-67.111385c0-16.777846 5.750154-27.963077 11.421539-33.555692l51.278769-44.740923a38.596923 38.596923 0 0 0-22.843077-61.518769z
diff --git a/HandyControl/Tools/Helper/CommonHelper.cs b/HandyControlDemo/Tools/CommonHelper.cs
similarity index 95%
rename from HandyControl/Tools/Helper/CommonHelper.cs
rename to HandyControlDemo/Tools/CommonHelper.cs
index 976740a4..a9daea11 100644
--- a/HandyControl/Tools/Helper/CommonHelper.cs
+++ b/HandyControlDemo/Tools/CommonHelper.cs
@@ -2,7 +2,7 @@
using System.Management;
using HandyControl.Data;
-namespace HandyControl.Tools
+namespace HandyControlDemo.Tools
{
public class CommonHelper
{
diff --git a/HandyControlDemo/UserControl/Controls/RateDemoCtl.xaml b/HandyControlDemo/UserControl/Controls/RateDemoCtl.xaml
new file mode 100644
index 00000000..2fe07025
--- /dev/null
+++ b/HandyControlDemo/UserControl/Controls/RateDemoCtl.xaml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/HandyControlDemo/UserControl/Controls/RateDemoCtl.xaml.cs b/HandyControlDemo/UserControl/Controls/RateDemoCtl.xaml.cs
new file mode 100644
index 00000000..5f5c2bb6
--- /dev/null
+++ b/HandyControlDemo/UserControl/Controls/RateDemoCtl.xaml.cs
@@ -0,0 +1,10 @@
+namespace HandyControlDemo.UserControl
+{
+ public partial class RateDemoCtl
+ {
+ public RateDemoCtl()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/HandyControlDemo/UserControl/Main/LeftMainContent.xaml b/HandyControlDemo/UserControl/Main/LeftMainContent.xaml
index 98ba6821..6b51a723 100644
--- a/HandyControlDemo/UserControl/Main/LeftMainContent.xaml
+++ b/HandyControlDemo/UserControl/Main/LeftMainContent.xaml
@@ -116,7 +116,7 @@
-
+
@@ -195,6 +195,11 @@
+
+
+
+
+
@@ -290,7 +295,7 @@
-
+
diff --git a/README.md b/README.md
index 3ca5cde8..6d0f0716 100644
--- a/README.md
+++ b/README.md
@@ -6,6 +6,10 @@
## Latest examples
+### Rate
+
+
+
### BlurWindow

diff --git a/Resources/Rate.png b/Resources/Rate.png
new file mode 100644
index 0000000000000000000000000000000000000000..1a1f87ca5ff43091f61d3caf70f85782a1f0d2c9
GIT binary patch
literal 3435
zcmbtXS5yL5eNwa(gj68ni2xYrAW~rAfbhb
zC;=l)sss{HLJOe=LK9xR@8_-i^WIwTV`kQxv*(;S`^;W5lWJpS!ow-fdE&$g9y3!z
zJI2_;XgTbxjDDc_aU)}1#mw-!ePkgO2@8}MmBe9HwRCT3JtomEas
zmT?PmIAsYe$#WbON!8moDX(^rx2>`(Kf1wDR@|NnBT!
z&w;7m*Ko>s`zW$`e&u10*^worHC190t=n^p#5T733rs}UtxbQ!3XnIy$tKcb^R6{nahSvOsaPDPg=qTTLp~kfl
zv$9e*H006>E`2RpPKOsc4c3seemabYFIis7`?5Eub5fUAf`0$-&LhESe)KgcDv8L%
z)gd~ke)#a1Mom0;u*}>DV!8M7WTU#vJ%q3K-Z{3QEmdlSK}+sM$X2%7>}G^q
zAi-ERyLWp2Ldz>z$dZDzIWTrnjE~KF;->O%2cbdP4Z`g^<|T*g&1!yDs%~sGPbMGI{Rj43|iYY<#qZW*%zSg
z@1UvTv~OOC?@xXa2*7O@$o09J(+m_nj(cBytQ>V@YrgCL
z$dwSSHYVILV{LeaPx?uWm03&s^IlA@_6!i3FHE53>D@Agz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