commit 2e5c80acf5dd9a7996e5a1c9ec563d7ac6e0f688 Author: yibo <361071264@qq.com> Date: Tue Mar 27 10:25:12 2018 +0800 Init 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 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +