From e6719725df98cc8ef03a5dc1cdb37df813abaead Mon Sep 17 00:00:00 2001 From: NaBian <836904362@qq.com> Date: Mon, 11 Mar 2019 22:17:15 +0800 Subject: [PATCH 1/2] init pr --- HandyControl/HandyControl.csproj | 8 ++++++++ .../Themes/Styles/Base/DialogBaseStyle.xaml | 9 +++++++++ HandyControl/Themes/Styles/Dialog.xaml | 10 ++++++++++ HandyControl/Themes/Styles/Style.xaml | 1 + HandyControlDemo/Data/MessageToken.cs | 2 ++ HandyControlDemo/Data/MessageToken.tt | 3 ++- HandyControlDemo/HandyControlDemo.csproj | 8 ++++++++ .../Properties/Langs/Lang.Designer.cs | 9 +++++++++ HandyControlDemo/Properties/Langs/Lang.en.resx | 3 +++ HandyControlDemo/Properties/Langs/Lang.resx | 3 +++ .../Resources/Img/LeftMainContent/Dialog_16x.png | Bin 0 -> 183 bytes .../UserControl/Controls/DialogDemoCtl.xaml | 6 ++++++ .../UserControl/Controls/DialogDemoCtl.xaml.cs | 10 ++++++++++ .../UserControl/Main/LeftMainContent.xaml | 7 ++++++- 14 files changed, 77 insertions(+), 2 deletions(-) create mode 100644 HandyControl/Themes/Styles/Base/DialogBaseStyle.xaml create mode 100644 HandyControl/Themes/Styles/Dialog.xaml create mode 100644 HandyControlDemo/Resources/Img/LeftMainContent/Dialog_16x.png create mode 100644 HandyControlDemo/UserControl/Controls/DialogDemoCtl.xaml create mode 100644 HandyControlDemo/UserControl/Controls/DialogDemoCtl.xaml.cs diff --git a/HandyControl/HandyControl.csproj b/HandyControl/HandyControl.csproj index a01d6620..a5a8e24d 100644 --- a/HandyControl/HandyControl.csproj +++ b/HandyControl/HandyControl.csproj @@ -398,6 +398,10 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + Designer MSBuild:Compile @@ -450,6 +454,10 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + Designer MSBuild:Compile diff --git a/HandyControl/Themes/Styles/Base/DialogBaseStyle.xaml b/HandyControl/Themes/Styles/Base/DialogBaseStyle.xaml new file mode 100644 index 00000000..4516fd43 --- /dev/null +++ b/HandyControl/Themes/Styles/Base/DialogBaseStyle.xaml @@ -0,0 +1,9 @@ + + + + + \ No newline at end of file diff --git a/HandyControl/Themes/Styles/Dialog.xaml b/HandyControl/Themes/Styles/Dialog.xaml new file mode 100644 index 00000000..d74f807e --- /dev/null +++ b/HandyControl/Themes/Styles/Dialog.xaml @@ -0,0 +1,10 @@ + + + + + + + \ No newline at end of file diff --git a/HandyControl/Tools/Helper/VisualHelper.cs b/HandyControl/Tools/Helper/VisualHelper.cs index 77b127a8..5ba5ae07 100644 --- a/HandyControl/Tools/Helper/VisualHelper.cs +++ b/HandyControl/Tools/Helper/VisualHelper.cs @@ -27,18 +27,18 @@ namespace HandyControl.Tools : null; } - internal static T GetGetChild(DependencyObject d) where T : DependencyObject + internal static T GetChild(DependencyObject d) where T : DependencyObject { - if (d is T scrollViewer) + if (d is T t) { - return scrollViewer; + return t; } for (int i = 0; i < VisualTreeHelper.GetChildrenCount(d); i++) { var child = VisualTreeHelper.GetChild(d, i); - var result = GetGetChild(child); + var result = GetChild(child); if (result != null) return result; } diff --git a/HandyControlDemo/App.xaml b/HandyControlDemo/App.xaml index dea6f894..cdd77978 100644 --- a/HandyControlDemo/App.xaml +++ b/HandyControlDemo/App.xaml @@ -31,7 +31,7 @@ - + diff --git a/HandyControlDemo/HandyControlDemo.csproj b/HandyControlDemo/HandyControlDemo.csproj index c9039d90..3c727753 100644 --- a/HandyControlDemo/HandyControlDemo.csproj +++ b/HandyControlDemo/HandyControlDemo.csproj @@ -130,6 +130,9 @@ ChatBox.xaml + + TextDialog.xaml + AnimationPathDemoCtl.xaml @@ -355,6 +358,7 @@ + @@ -443,6 +447,10 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + Designer MSBuild:Compile diff --git a/HandyControlDemo/Properties/Langs/Lang.Designer.cs b/HandyControlDemo/Properties/Langs/Lang.Designer.cs index 33c85990..0ed9c7fa 100644 --- a/HandyControlDemo/Properties/Langs/Lang.Designer.cs +++ b/HandyControlDemo/Properties/Langs/Lang.Designer.cs @@ -798,6 +798,15 @@ namespace HandyControlDemo.Properties.Langs { } } + /// + /// 查找类似 请稍后... 的本地化字符串。 + /// + public static string PleaseWait { + get { + return ResourceManager.GetString("PleaseWait", resourceCulture); + } + } + /// /// 查找类似 请输入内容 的本地化字符串。 /// @@ -1113,6 +1122,15 @@ namespace HandyControlDemo.Properties.Langs { } } + /// + /// 查找类似 文本对话框 的本地化字符串。 + /// + public static string TextDialog { + get { + return ResourceManager.GetString("TextDialog", resourceCulture); + } + } + /// /// 查找类似 时间条 的本地化字符串。 /// diff --git a/HandyControlDemo/Properties/Langs/Lang.en.resx b/HandyControlDemo/Properties/Langs/Lang.en.resx index 5147ebc0..5a368f22 100644 --- a/HandyControlDemo/Properties/Langs/Lang.en.resx +++ b/HandyControlDemo/Properties/Langs/Lang.en.resx @@ -516,4 +516,10 @@ Dialog + + TextDialog + + + Please wait... + \ No newline at end of file diff --git a/HandyControlDemo/Properties/Langs/Lang.resx b/HandyControlDemo/Properties/Langs/Lang.resx index b3d34753..05c82167 100644 --- a/HandyControlDemo/Properties/Langs/Lang.resx +++ b/HandyControlDemo/Properties/Langs/Lang.resx @@ -516,4 +516,10 @@ 对话框 + + 文本对话框 + + + 请稍后... + \ No newline at end of file diff --git a/HandyControlDemo/UserControl/Basic/TextDialog.xaml b/HandyControlDemo/UserControl/Basic/TextDialog.xaml new file mode 100644 index 00000000..eb470cc8 --- /dev/null +++ b/HandyControlDemo/UserControl/Basic/TextDialog.xaml @@ -0,0 +1,15 @@ + + + +