From 2e5c80acf5dd9a7996e5a1c9ec563d7ac6e0f688 Mon Sep 17 00:00:00 2001 From: yibo <361071264@qq.com> Date: Tue, 27 Mar 2018 10:25:12 +0800 Subject: [PATCH] Init --- .gitignore | 6 + WinFormControl.sln | 22 ++ WinFormControl/ControlUtil.cs | 24 ++ WinFormControl/NumberPad.xaml | 63 ++++ WinFormControl/NumberPad.xaml.cs | 69 +++++ WinFormControl/Properties/AssemblyInfo.cs | 36 +++ WinFormControl/VirtualKeyPad.xaml | 355 ++++++++++++++++++++++ WinFormControl/VirtualKeyPad.xaml.cs | 104 +++++++ WinFormControl/WinFormControl.csproj | 77 +++++ 9 files changed, 756 insertions(+) create mode 100644 .gitignore create mode 100644 WinFormControl.sln create mode 100644 WinFormControl/ControlUtil.cs create mode 100644 WinFormControl/NumberPad.xaml create mode 100644 WinFormControl/NumberPad.xaml.cs create mode 100644 WinFormControl/Properties/AssemblyInfo.cs create mode 100644 WinFormControl/VirtualKeyPad.xaml create mode 100644 WinFormControl/VirtualKeyPad.xaml.cs create mode 100644 WinFormControl/WinFormControl.csproj diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..55aea87 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +*.suo +bin +obj +.vs +*.user +_ReSharper.WinFormControl diff --git a/WinFormControl.sln b/WinFormControl.sln new file mode 100644 index 0000000..8597204 --- /dev/null +++ b/WinFormControl.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.40629.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinFormControl", "WinFormControl\WinFormControl.csproj", "{45A6C56B-C815-4AEA-B0C4-68C122FD3139}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {45A6C56B-C815-4AEA-B0C4-68C122FD3139}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {45A6C56B-C815-4AEA-B0C4-68C122FD3139}.Debug|Any CPU.Build.0 = Debug|Any CPU + {45A6C56B-C815-4AEA-B0C4-68C122FD3139}.Release|Any CPU.ActiveCfg = Release|Any CPU + {45A6C56B-C815-4AEA-B0C4-68C122FD3139}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/WinFormControl/ControlUtil.cs b/WinFormControl/ControlUtil.cs new file mode 100644 index 0000000..8947573 --- /dev/null +++ b/WinFormControl/ControlUtil.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Data; + +namespace WinFormControl.Converter +{ + class BoolToVisibilityConverter : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) + { + if ((bool?)value == true) + return System.Windows.Visibility.Visible; + return System.Windows.Visibility.Collapsed; + } + + public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) + { + throw new NotImplementedException(); + } + } +} diff --git a/WinFormControl/NumberPad.xaml b/WinFormControl/NumberPad.xaml new file mode 100644 index 0000000..877371b --- /dev/null +++ b/WinFormControl/NumberPad.xaml @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +