From 99d2fafb720ce826223330d5083e3f5aad2907d6 Mon Sep 17 00:00:00 2001
From: NaBian <836904362@qq.com>
Date: Sun, 13 Mar 2022 18:54:34 +0800
Subject: [PATCH] refactor: massive refactor input elements, step 1/3
---
.../HandyControl_Net_40/Themes/Theme.xaml | 648 ++++++++----------
.../HandyControlDemo_Code.csproj | 6 -
.../HandyControlDemo_Shared.projitems | 4 +-
.../Service/Data/DataService.cs | 12 -
.../ValidationRule/NumericUpDownDemoRule.cs | 19 +
.../Controls/CheckComboBoxDemoCtl.xaml | 2 +-
.../UserControl/Controls/ComboBoxDemoCtl.xaml | 2 +-
.../Controls/NumericUpDownDemoCtl.xaml | 52 +-
.../Controls/NumericUpDownDemoCtl.xaml.cs | 11 +-
.../Controls/SearchBarDemoCtl.xaml | 50 +-
.../UserControl/Controls/TextBoxDemoCtl.xaml | 35 +-
.../UserControl/Main/LeftMainContent.xaml | 2 +-
.../UserControl/Styles/GroupBoxDemoCtl.xaml | 2 +-
.../Styles/NativeComboBoxDemoCtl.xaml | 2 +-
.../UserControl/Styles/ToolBarDemoCtl.xaml | 2 +-
.../ViewModel/Common/ComboBoxDemoViewModel.cs | 9 -
.../Common/InputElementDemoViewModel.cs | 92 +++
.../Controls/SearchBarDemoViewModel.cs | 16 -
.../ViewModel/ViewModelLocator.cs | 9 +-
.../Controls/Attach/InfoElement.cs | 9 +
.../Controls/Input/NumericUpDown.cs | 185 +----
.../Controls/Input/SearchBar.cs | 1 -
.../Controls/Input/TextBox.cs | 128 +---
.../HandyControl_Shared.projitems | 2 +
.../Themes/Styles/Base/BaseStyle.xaml | 34 +
.../Styles/Base/NumericUpDownBaseStyle.xaml | 240 +++----
.../Styles/Base/PropertyGridBaseStyle.xaml | 2 +-
.../Styles/Base/SearchBarBaseStyle.xaml | 175 ++---
.../Themes/Styles/Base/TextBoxBaseStyle.xaml | 152 ++--
.../Themes/Styles/NumericUpDown.xaml | 21 +
.../Themes/Styles/SearchBar.xaml | 21 +
.../Themes/Styles/TextBox.xaml | 12 +-
.../HandyControl_Shared/Themes/Theme.xaml | 648 ++++++++----------
.../Tools/ValidationRule/NoBlankTextRule.cs | 24 +
.../Tools/ValidationRule/RegexRule.cs | 44 ++
35 files changed, 1213 insertions(+), 1460 deletions(-)
create mode 100644 src/Shared/HandyControlDemo_Shared/Tools/ValidationRule/NumericUpDownDemoRule.cs
delete mode 100644 src/Shared/HandyControlDemo_Shared/ViewModel/Common/ComboBoxDemoViewModel.cs
create mode 100644 src/Shared/HandyControlDemo_Shared/ViewModel/Common/InputElementDemoViewModel.cs
delete mode 100644 src/Shared/HandyControlDemo_Shared/ViewModel/Controls/SearchBarDemoViewModel.cs
create mode 100644 src/Shared/HandyControl_Shared/Tools/ValidationRule/NoBlankTextRule.cs
create mode 100644 src/Shared/HandyControl_Shared/Tools/ValidationRule/RegexRule.cs
diff --git a/src/Net_40/HandyControl_Net_40/Themes/Theme.xaml b/src/Net_40/HandyControl_Net_40/Themes/Theme.xaml
index 7ef4398b..8fbfb137 100644
--- a/src/Net_40/HandyControl_Net_40/Themes/Theme.xaml
+++ b/src/Net_40/HandyControl_Net_40/Themes/Theme.xaml
@@ -1175,6 +1175,37 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
+
+
-
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
+
+
-
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
@@ -6822,109 +6798,81 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
-
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
-
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
+
@@ -6940,8 +6888,26 @@
+
+
+
@@ -9506,54 +9474,41 @@
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
-
+
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
-
+
-
-
-
-
-
+
-
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
-
+
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
-
+
-
-
-
-
-
+
-
+
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
@@ -134,110 +127,82 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
-
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
-
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
+
diff --git a/src/Shared/HandyControl_Shared/Themes/Styles/Base/TextBoxBaseStyle.xaml b/src/Shared/HandyControl_Shared/Themes/Styles/Base/TextBoxBaseStyle.xaml
index 3a772bee..cac7e07a 100644
--- a/src/Shared/HandyControl_Shared/Themes/Styles/Base/TextBoxBaseStyle.xaml
+++ b/src/Shared/HandyControl_Shared/Themes/Styles/Base/TextBoxBaseStyle.xaml
@@ -15,48 +15,37 @@
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
+
+
-
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
+
+
-
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
diff --git a/src/Shared/HandyControl_Shared/Themes/Styles/SearchBar.xaml b/src/Shared/HandyControl_Shared/Themes/Styles/SearchBar.xaml
index 9edf609f..e4b97bc9 100644
--- a/src/Shared/HandyControl_Shared/Themes/Styles/SearchBar.xaml
+++ b/src/Shared/HandyControl_Shared/Themes/Styles/SearchBar.xaml
@@ -4,8 +4,29 @@
+
+
+
+
+
+
diff --git a/src/Shared/HandyControl_Shared/Themes/Styles/TextBox.xaml b/src/Shared/HandyControl_Shared/Themes/Styles/TextBox.xaml
index d0cb5f86..3d4b22d0 100644
--- a/src/Shared/HandyControl_Shared/Themes/Styles/TextBox.xaml
+++ b/src/Shared/HandyControl_Shared/Themes/Styles/TextBox.xaml
@@ -8,7 +8,7 @@
@@ -16,8 +16,9 @@
@@ -25,8 +26,9 @@
diff --git a/src/Shared/HandyControl_Shared/Themes/Theme.xaml b/src/Shared/HandyControl_Shared/Themes/Theme.xaml
index d1fa08d8..5c904d64 100644
--- a/src/Shared/HandyControl_Shared/Themes/Theme.xaml
+++ b/src/Shared/HandyControl_Shared/Themes/Theme.xaml
@@ -1175,6 +1175,37 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
+
+
-
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
+
+
-
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
@@ -6905,109 +6881,81 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
-
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
-
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
+
@@ -7023,8 +6971,26 @@
+
+
+
@@ -9624,54 +9592,41 @@
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
-
+
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
-
+
-
-
-
-
-
+
-
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+