├── .gitignore
├── README.md
├── Util.Controls.V1.0
├── System.Utility
│ ├── Cache
│ │ ├── CacheManager.cs
│ │ ├── CacheTime.cs
│ │ ├── ICache.cs
│ │ └── Impl
│ │ │ ├── BaseCache.cs
│ │ │ └── NetCache.cs
│ ├── Common
│ │ ├── Constants.cs
│ │ ├── Enums.cs
│ │ └── Guard.cs
│ ├── Data
│ │ ├── BaseQuery.cs
│ │ ├── DBTypeFactory.cs
│ │ ├── Nhibernate
│ │ │ ├── HttpSessionManager.cs
│ │ │ ├── ISessionManager.cs
│ │ │ ├── SessionManagerFactoryBase.cs
│ │ │ └── ThreadSessionManager.cs
│ │ ├── PersistableServiceBase.cs
│ │ ├── ServiceBase.cs
│ │ ├── Sqlite
│ │ │ ├── SQLiteString.cs
│ │ │ ├── SqlParameter.cs
│ │ │ └── SqliteContext.cs
│ │ ├── SqliteRecovery
│ │ │ ├── SqliteCoreDll.cs
│ │ │ ├── SqliteRecoveryHelper.cs
│ │ │ └── SqliteReturn.cs
│ │ └── Validation
│ │ │ ├── Attributes
│ │ │ ├── LengthValidatorAttribute.cs
│ │ │ ├── NumericValidatorAttribute.cs
│ │ │ ├── RequireValidatorAttribute.cs
│ │ │ └── ValidatorAttribute.cs
│ │ │ ├── IValidateable.cs
│ │ │ ├── ValidateableBase.cs
│ │ │ ├── ValidationManager.cs
│ │ │ └── Validators
│ │ │ ├── LengthValidator.cs
│ │ │ ├── NumericValidator.cs
│ │ │ ├── RequireValidator
│ │ │ ├── DatetimeRequireValidator.cs
│ │ │ ├── RequireValidator.cs
│ │ │ ├── RequireValidatorFactory.cs
│ │ │ └── StringRequireValidator.cs
│ │ │ └── Validator.cs
│ ├── Dynamic
│ │ ├── DynamicConvert.cs
│ │ ├── DynamicX.cs
│ │ ├── GetPropertyBinder.cs
│ │ ├── IDynamicEnable.cs
│ │ └── SetPropertyBinder.cs
│ ├── Emit
│ │ └── EmitHelper.cs
│ ├── Extension
│ │ ├── SerializableDictionary.cs
│ │ ├── TypeExtension.Boolean.cs
│ │ ├── TypeExtension.Data.cs
│ │ ├── TypeExtension.DateTime.cs
│ │ ├── TypeExtension.Decimal.cs
│ │ ├── TypeExtension.Dictionary.cs
│ │ ├── TypeExtension.Enum.cs
│ │ ├── TypeExtension.Exception.cs
│ │ ├── TypeExtension.IEnumerable.cs
│ │ ├── TypeExtension.IQueryable.cs
│ │ ├── TypeExtension.Int.cs
│ │ ├── TypeExtension.Intptr.cs
│ │ ├── TypeExtension.Object.cs
│ │ ├── TypeExtension.Reflection.cs
│ │ ├── TypeExtension.Stream.cs
│ │ ├── TypeExtension.String.cs
│ │ ├── TypeExtension.StringBuilder.cs
│ │ ├── TypeExtension.Version.cs
│ │ ├── TypeExtension.Xml.cs
│ │ ├── TypeExtension.byte.cs
│ │ ├── TypeExtension.cs
│ │ └── TypeExtension.sth.cs
│ ├── Helper
│ │ ├── Color.cs
│ │ ├── Config.cs
│ │ ├── Cryptography.cs
│ │ ├── DataVisualAnalysis.cs
│ │ ├── File.cs
│ │ ├── Format.cs
│ │ ├── HttpUtils.cs
│ │ ├── Image.cs
│ │ ├── LongPathFileOperator.cs
│ │ ├── QuotedPrintableHelper.cs
│ │ ├── Random.cs
│ │ ├── Reflection.cs
│ │ ├── RegistryHelper.cs
│ │ ├── Serialize.cs
│ │ ├── Sys.cs
│ │ ├── Test.cs
│ │ └── TimeOut.cs
│ ├── Ioc
│ │ ├── IContainer.cs
│ │ ├── Ioc.cs
│ │ └── SpringContainer.cs
│ ├── Logger
│ │ ├── LogHelper.cs
│ │ └── SimpleLogger
│ │ │ └── SimpleLogger.cs
│ ├── Misc
│ │ ├── AbstractAsyncResult.cs
│ │ ├── ConsoleAsyncResult.cs
│ │ ├── ConsoleWriter.cs
│ │ ├── DefaultAsyncResult.cs
│ │ ├── Executer.cs
│ │ ├── IAsyncResult.cs
│ │ ├── IgnoreCaseStringComparer.cs
│ │ └── SingleThread.cs
│ ├── Patterns
│ │ ├── FlyweightBase.cs
│ │ ├── ISimpleFactory.cs
│ │ ├── Obsever.cs
│ │ └── Singleton.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── Resources
│ │ ├── DefaultErrorMessages.resx
│ │ └── DefaultErrorMessages1.Designer.cs
│ ├── Security
│ │ ├── Identity.cs
│ │ ├── Principal.cs
│ │ ├── UserInfo.cs
│ │ ├── WebSecurityService.cs
│ │ └── WinSecurityService.cs
│ ├── System.Utility.csproj
│ ├── System.Utility.csproj.vspscc
│ └── Win32
│ │ ├── Enums.cs
│ │ ├── IniConfig.cs
│ │ ├── Struct.cs
│ │ ├── WMI.cs
│ │ └── Win32.cs
├── Util.Controls.WPFTest
│ ├── App.xaml
│ ├── App.xaml.cs
│ ├── Images
│ │ ├── logom.png
│ │ ├── qq.png
│ │ ├── qq1.png
│ │ └── qq2.png
│ ├── MainWindow.xaml
│ ├── MainWindow.xaml.cs
│ ├── Page
│ │ ├── Page_Button.xaml
│ │ ├── Page_Button.xaml.cs
│ │ ├── Page_ComboBox_Date.xaml
│ │ ├── Page_ComboBox_Date.xaml.cs
│ │ ├── Page_DataGrid.xaml
│ │ ├── Page_DataGrid.xaml.cs
│ │ ├── Page_Image.xaml
│ │ ├── Page_Image.xaml.cs
│ │ ├── Page_ImageViewer.xaml
│ │ ├── Page_ImageViewer.xaml.cs
│ │ ├── Page_ListBox_MultiCom.xaml
│ │ ├── Page_ListBox_MultiCom.xaml.cs
│ │ ├── Page_ListView.xaml
│ │ ├── Page_ListView.xaml.cs
│ │ ├── Page_MVVM.xaml
│ │ ├── Page_MVVM.xaml.cs
│ │ ├── Page_MultCase.xaml
│ │ ├── Page_MultCase.xaml.cs
│ │ ├── Page_TabControl.xaml
│ │ ├── Page_TabControl.xaml.cs
│ │ ├── Page_Test.xaml
│ │ ├── Page_Test.xaml.cs
│ │ ├── Page_TextBox.xaml
│ │ ├── Page_TextBox.xaml.cs
│ │ ├── Page_TreeView.xaml
│ │ ├── Page_TreeView.xaml.cs
│ │ ├── Page_Waiting.xaml
│ │ ├── Page_Waiting.xaml.cs
│ │ ├── Page_Webbrowser.xaml
│ │ └── Page_Webbrowser.xaml.cs
│ ├── Properties
│ │ ├── AssemblyInfo.cs
│ │ ├── Resources.Designer.cs
│ │ ├── Resources.resx
│ │ ├── Settings.Designer.cs
│ │ └── Settings.settings
│ ├── Style
│ │ ├── Colors.xaml
│ │ └── Default.xaml
│ ├── Util.Controls.WPFTest.csproj
│ ├── XLY.Framework.WPFTest.csproj.vspscc
│ ├── app.config
│ ├── bin
│ │ └── Debug
│ │ │ ├── Images
│ │ │ ├── logom.png
│ │ │ ├── qq.png
│ │ │ ├── qq1.png
│ │ │ └── qq2.png
│ │ │ ├── Microsoft.Expression.Drawing.dll
│ │ │ ├── Microsoft.Expression.Drawing.xml
│ │ │ ├── Microsoft.Expression.Effects.dll
│ │ │ ├── Microsoft.Expression.Effects.xml
│ │ │ ├── Microsoft.Expression.Interactions.dll
│ │ │ ├── Microsoft.Windows.Shell.dll
│ │ │ ├── System.Utility.dll
│ │ │ ├── System.Windows.Interactivity.dll
│ │ │ ├── Util.Controls.WPFTest.exe
│ │ │ ├── Util.Controls.WPFTest.exe.config
│ │ │ ├── Util.Controls.WPFTest.pdb
│ │ │ ├── Util.Controls.WPFTest.vshost.exe
│ │ │ ├── Util.Controls.WPFTest.vshost.exe.config
│ │ │ ├── Util.Controls.dll
│ │ │ └── Util.Controls.pdb
│ ├── doc
│ │ ├── Remark.txt
│ │ ├── demo.css
│ │ ├── demo.html
│ │ ├── iconfont.css
│ │ └── iconfont.ttf
│ ├── obj
│ │ └── x86
│ │ │ ├── Debug
│ │ │ ├── App.baml
│ │ │ ├── App.g.cs
│ │ │ ├── App.g.i.cs
│ │ │ ├── DesignTimeResolveAssemblyReferencesInput.cache
│ │ │ ├── GeneratedInternalTypeHelper.g.cs
│ │ │ ├── GeneratedInternalTypeHelper.g.i.cs
│ │ │ ├── MainWindow.baml
│ │ │ ├── MainWindow.g.cs
│ │ │ ├── MainWindow.g.i.cs
│ │ │ ├── Page
│ │ │ │ ├── Page_Button.baml
│ │ │ │ ├── Page_Button.g.cs
│ │ │ │ ├── Page_Button.g.i.cs
│ │ │ │ ├── Page_ComboBox_Date.baml
│ │ │ │ ├── Page_ComboBox_Date.g.cs
│ │ │ │ ├── Page_ComboBox_Date.g.i.cs
│ │ │ │ ├── Page_DataGrid.baml
│ │ │ │ ├── Page_DataGrid.g.cs
│ │ │ │ ├── Page_DataGrid.g.i.cs
│ │ │ │ ├── Page_Image.baml
│ │ │ │ ├── Page_Image.g.cs
│ │ │ │ ├── Page_Image.g.i.cs
│ │ │ │ ├── Page_ImageViewer.baml
│ │ │ │ ├── Page_ImageViewer.g.cs
│ │ │ │ ├── Page_ImageViewer.g.i.cs
│ │ │ │ ├── Page_ListBox_MultiCom.baml
│ │ │ │ ├── Page_ListBox_MultiCom.g.cs
│ │ │ │ ├── Page_ListBox_MultiCom.g.i.cs
│ │ │ │ ├── Page_ListView.baml
│ │ │ │ ├── Page_ListView.g.cs
│ │ │ │ ├── Page_ListView.g.i.cs
│ │ │ │ ├── Page_MVVM.baml
│ │ │ │ ├── Page_MVVM.g.cs
│ │ │ │ ├── Page_MVVM.g.i.cs
│ │ │ │ ├── Page_MultCase.baml
│ │ │ │ ├── Page_MultCase.g.cs
│ │ │ │ ├── Page_MultCase.g.i.cs
│ │ │ │ ├── Page_TabControl.baml
│ │ │ │ ├── Page_TabControl.g.cs
│ │ │ │ ├── Page_TabControl.g.i.cs
│ │ │ │ ├── Page_Test.baml
│ │ │ │ ├── Page_Test.g.cs
│ │ │ │ ├── Page_Test.g.i.cs
│ │ │ │ ├── Page_TextBox.baml
│ │ │ │ ├── Page_TextBox.g.cs
│ │ │ │ ├── Page_TextBox.g.i.cs
│ │ │ │ ├── Page_TreeView.baml
│ │ │ │ ├── Page_TreeView.g.cs
│ │ │ │ ├── Page_TreeView.g.i.cs
│ │ │ │ ├── Page_Waiting.baml
│ │ │ │ ├── Page_Waiting.g.cs
│ │ │ │ ├── Page_Waiting.g.i.cs
│ │ │ │ ├── Page_Webbrowser.baml
│ │ │ │ ├── Page_Webbrowser.g.cs
│ │ │ │ └── Page_Webbrowser.g.i.cs
│ │ │ ├── Style
│ │ │ │ ├── Colors.baml
│ │ │ │ └── Default.baml
│ │ │ ├── TempPE
│ │ │ │ └── Properties.Resources.Designer.cs.dll
│ │ │ ├── Util.Controls.WPFTest.Properties.Resources.resources
│ │ │ ├── Util.Controls.WPFTest.csproj.FileListAbsolute.txt
│ │ │ ├── Util.Controls.WPFTest.csproj.GenerateResource.Cache
│ │ │ ├── Util.Controls.WPFTest.csprojResolveAssemblyReference.cache
│ │ │ ├── Util.Controls.WPFTest.exe
│ │ │ ├── Util.Controls.WPFTest.g.resources
│ │ │ ├── Util.Controls.WPFTest.pdb
│ │ │ ├── Util.Controls.WPFTest_Content.g.cs
│ │ │ ├── Util.Controls.WPFTest_Content.g.i.cs
│ │ │ ├── Util.Controls.WPFTest_MarkupCompile.cache
│ │ │ ├── Util.Controls.WPFTest_MarkupCompile.i.cache
│ │ │ ├── Util.Controls.WPFTest_MarkupCompile.i.lref
│ │ │ ├── Util.Controls.WPFTest_MarkupCompile.lref
│ │ │ ├── XLY.Framework.WPFTest.Properties.Resources.resources
│ │ │ ├── XLY.Framework.WPFTest.csproj.FileListAbsolute.txt
│ │ │ ├── XLY.Framework.WPFTest.csproj.GenerateResource.Cache
│ │ │ ├── XLY.Framework.WPFTest.csprojResolveAssemblyReference.cache
│ │ │ ├── XLY.Framework.WPFTest.exe
│ │ │ ├── XLY.Framework.WPFTest.g.resources
│ │ │ ├── XLY.Framework.WPFTest.pdb
│ │ │ ├── XLY.Framework.WPFTest_Content.g.cs
│ │ │ ├── XLY.Framework.WPFTest_Content.g.i.cs
│ │ │ ├── XLY.Framework.WPFTest_MarkupCompile.cache
│ │ │ ├── XLY.Framework.WPFTest_MarkupCompile.i.cache
│ │ │ ├── XLY.Framework.WPFTest_MarkupCompile.lref
│ │ │ ├── control
│ │ │ │ └── MultCaseTabControl.g.i.cs
│ │ │ └── old
│ │ │ │ ├── LocalImageViewer.baml
│ │ │ │ ├── LocalImageViewer.g.cs
│ │ │ │ ├── LocalImageViewer.g.i.cs
│ │ │ │ ├── WebImageViewer.baml
│ │ │ │ ├── WebImageViewer.g.cs
│ │ │ │ └── WebImageViewer.g.i.cs
│ │ │ └── Release
│ │ │ ├── App.baml
│ │ │ ├── App.g.cs
│ │ │ ├── App.g.i.cs
│ │ │ ├── DesignTimeResolveAssemblyReferencesInput.cache
│ │ │ ├── GeneratedInternalTypeHelper.g.cs
│ │ │ ├── GeneratedInternalTypeHelper.g.i.cs
│ │ │ ├── MainWindow.baml
│ │ │ ├── MainWindow.g.cs
│ │ │ ├── MainWindow.g.i.cs
│ │ │ ├── Page
│ │ │ ├── Page_Button.baml
│ │ │ ├── Page_Button.g.cs
│ │ │ ├── Page_Button.g.i.cs
│ │ │ ├── Page_ComboBox_Date.baml
│ │ │ ├── Page_ComboBox_Date.g.cs
│ │ │ ├── Page_ComboBox_Date.g.i.cs
│ │ │ ├── Page_DataGrid.baml
│ │ │ ├── Page_DataGrid.g.cs
│ │ │ ├── Page_DataGrid.g.i.cs
│ │ │ ├── Page_Image.baml
│ │ │ ├── Page_Image.g.cs
│ │ │ ├── Page_Image.g.i.cs
│ │ │ ├── Page_ImageViewer.baml
│ │ │ ├── Page_ImageViewer.g.cs
│ │ │ ├── Page_ImageViewer.g.i.cs
│ │ │ ├── Page_ListBox_MultiCom.baml
│ │ │ ├── Page_ListBox_MultiCom.g.cs
│ │ │ ├── Page_ListBox_MultiCom.g.i.cs
│ │ │ ├── Page_ListView.baml
│ │ │ ├── Page_ListView.g.cs
│ │ │ ├── Page_ListView.g.i.cs
│ │ │ ├── Page_MVVM.baml
│ │ │ ├── Page_MVVM.g.cs
│ │ │ ├── Page_MVVM.g.i.cs
│ │ │ ├── Page_MultCase.baml
│ │ │ ├── Page_MultCase.g.cs
│ │ │ ├── Page_MultCase.g.i.cs
│ │ │ ├── Page_TabControl.baml
│ │ │ ├── Page_TabControl.g.cs
│ │ │ ├── Page_TabControl.g.i.cs
│ │ │ ├── Page_Test.baml
│ │ │ ├── Page_Test.g.cs
│ │ │ ├── Page_Test.g.i.cs
│ │ │ ├── Page_TextBox.baml
│ │ │ ├── Page_TextBox.g.cs
│ │ │ ├── Page_TextBox.g.i.cs
│ │ │ ├── Page_TreeView.baml
│ │ │ ├── Page_TreeView.g.cs
│ │ │ ├── Page_TreeView.g.i.cs
│ │ │ ├── Page_Waiting.baml
│ │ │ ├── Page_Waiting.g.cs
│ │ │ ├── Page_Waiting.g.i.cs
│ │ │ ├── Page_Webbrowser.baml
│ │ │ ├── Page_Webbrowser.g.cs
│ │ │ └── Page_Webbrowser.g.i.cs
│ │ │ ├── Style
│ │ │ ├── Colors.baml
│ │ │ └── Default.baml
│ │ │ ├── TempPE
│ │ │ └── Properties.Resources.Designer.cs.dll
│ │ │ ├── XLY.Framework.WPFTest.Properties.Resources.resources
│ │ │ ├── XLY.Framework.WPFTest.csproj.FileListAbsolute.txt
│ │ │ ├── XLY.Framework.WPFTest.csproj.GenerateResource.Cache
│ │ │ ├── XLY.Framework.WPFTest.csprojResolveAssemblyReference.cache
│ │ │ ├── XLY.Framework.WPFTest.exe
│ │ │ ├── XLY.Framework.WPFTest.g.resources
│ │ │ ├── XLY.Framework.WPFTest.pdb
│ │ │ ├── XLY.Framework.WPFTest_Content.g.cs
│ │ │ ├── XLY.Framework.WPFTest_Content.g.i.cs
│ │ │ ├── XLY.Framework.WPFTest_MarkupCompile.cache
│ │ │ ├── XLY.Framework.WPFTest_MarkupCompile.i.cache
│ │ │ ├── XLY.Framework.WPFTest_MarkupCompile.i.lref
│ │ │ ├── XLY.Framework.WPFTest_MarkupCompile.lref
│ │ │ ├── control
│ │ │ ├── MultCaseTabControl.baml
│ │ │ ├── MultCaseTabControl.g.cs
│ │ │ └── MultCaseTabControl.g.i.cs
│ │ │ └── old
│ │ │ ├── LocalImageViewer.baml
│ │ │ ├── LocalImageViewer.g.cs
│ │ │ ├── LocalImageViewer.g.i.cs
│ │ │ ├── WebImageViewer.baml
│ │ │ ├── WebImageViewer.g.cs
│ │ │ └── WebImageViewer.g.i.cs
│ └── old
│ │ ├── LocalImageViewer.xaml
│ │ ├── LocalImageViewer.xaml.cs
│ │ ├── WebImageViewer.xaml
│ │ └── WebImageViewer.xaml.cs
├── Util.Controls.sln
├── Util.Controls.v12.suo
├── Util.Controls
│ ├── Control
│ │ ├── AnimatedGIF.cs
│ │ ├── BulletCheckBox.xaml
│ │ ├── BulletCheckBox.xaml.cs
│ │ ├── BusyBox.xaml
│ │ ├── BusyBox.xaml.cs
│ │ ├── FButton.xaml
│ │ ├── FButton.xaml.cs
│ │ ├── FImage.xaml
│ │ ├── FImage.xaml.cs
│ │ ├── HighTextBlock.xaml
│ │ ├── HighTextBlock.xaml.cs
│ │ ├── MessageBoxX.xaml
│ │ ├── MessageBoxX.xaml.cs
│ │ ├── MultiComboBox.xaml
│ │ ├── MultiComboBox.xaml.cs
│ │ ├── ProgressRing.cs
│ │ ├── ProgressRing.xaml
│ │ ├── ThumbnailImage
│ │ │ ├── EnumThumbnail.cs
│ │ │ ├── IThumbnailProvider.cs
│ │ │ ├── ImageThumbnailProvider.cs
│ │ │ ├── ThumbnailImage.cs
│ │ │ ├── ThumbnailProviderFactory.cs
│ │ │ ├── VedioThumbnailProvider.cs
│ │ │ └── WebImageThumbnailProvider.cs
│ │ ├── VirtualizingWrapPanel.cs
│ │ ├── WaitingBox.xaml
│ │ ├── WaitingBox.xaml.cs
│ │ ├── WindowBase.xaml
│ │ └── WindowBase.xaml.cs
│ ├── Converter
│ │ ├── BackgroundToForegroundConverter.cs
│ │ ├── Converters.cs
│ │ ├── PercentToAngleConverter.cs
│ │ ├── ThicknessToDoubleConverter.cs
│ │ ├── TreeViewMarginConverter.cs
│ │ └── TrueToFalseConverter.cs
│ ├── Properties
│ │ ├── AssemblyInfo.cs
│ │ ├── Resources.Designer.cs
│ │ ├── Resources.resx
│ │ ├── Settings.Designer.cs
│ │ └── Settings.settings
│ ├── Resources
│ │ ├── iconfont.ttf
│ │ ├── logo.ico
│ │ └── logo.png
│ ├── Style
│ │ ├── Colors.xaml
│ │ ├── Global.xaml
│ │ ├── Style.xaml
│ │ └── Themes
│ │ │ ├── Calendar.xaml
│ │ │ ├── CheckBox.xaml
│ │ │ ├── ComboBox.xaml
│ │ │ ├── DataGrid.xaml
│ │ │ ├── DatePicker.xaml
│ │ │ ├── FIcon.xaml
│ │ │ ├── ListBox.xaml
│ │ │ ├── ListView.xaml
│ │ │ ├── LoopProcessBar.xaml
│ │ │ ├── Menu.xaml
│ │ │ ├── PasswordBox.xaml
│ │ │ ├── ProgressBar.xaml
│ │ │ ├── RadioButton.xaml
│ │ │ ├── ScrollViewer.xaml
│ │ │ ├── Separator.xaml
│ │ │ ├── Share.xaml
│ │ │ ├── TabControl.xaml
│ │ │ ├── TextBox.xaml
│ │ │ ├── ToggleButton.xaml
│ │ │ └── TreeView.xaml
│ ├── Themes
│ │ └── Generic.xaml
│ ├── Util.Controls.csproj
│ ├── Util.Controls.v12.suo
│ ├── Win32
│ │ ├── ChangeWindowSize.cs
│ │ ├── HitTest.cs
│ │ └── NativeMethods.cs
│ ├── XLY.Framework.Controls.csproj.vspscc
│ ├── usister.txt
│ └── {Core}
│ │ ├── Common
│ │ ├── BaseNotifyPropertyChanged.cs
│ │ ├── ConsoleAsynNotify.cs
│ │ ├── DefaultAsynNotify.cs
│ │ ├── Exceptions.cs
│ │ ├── FileAsynNotify.cs
│ │ └── IAsynNotify.cs
│ │ ├── ControlAttachProperty.cs
│ │ ├── ControlExtession.cs
│ │ ├── Messenger.cs
│ │ └── RelayCommand.cs
└── lib
│ ├── Microsoft.Expression.Controls.dll
│ ├── Microsoft.Expression.Drawing.dll
│ ├── Microsoft.Expression.Effects.dll
│ ├── Microsoft.Expression.Interactions.dll
│ ├── Microsoft.Expression.Prototyping.Interactivity.dll
│ ├── Microsoft.Windows.Shell.dll
│ ├── System.Utility.dll
│ └── System.Windows.Interactivity.dll
└── Util.Controls.V2.0
├── .vs
└── Util.Controls
│ └── v15
│ ├── .suo
│ └── sqlite3
│ └── storage.ide
├── README.md
├── TestDemo
├── App.config
├── App.xaml
├── App.xaml.cs
├── MainWindow.xaml
├── MainWindow.xaml.cs
├── Properties
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ ├── Resources.resx
│ ├── Settings.Designer.cs
│ └── Settings.settings
└── TestDemo.csproj
├── Util.Controls.sln
├── Util.Controls
├── Behavior
│ ├── DoubleClickCommandBehavior.cs
│ └── RotateAnimationBehavior.cs
├── Control
│ ├── AnimatedGIF.cs
│ ├── BusyBox.xaml
│ ├── BusyBox.xaml.cs
│ ├── CustomVirtualizingStackPanel.cs
│ ├── FImage.xaml
│ ├── FImage.xaml.cs
│ ├── HighTextBlock.xaml
│ ├── HighTextBlock.xaml.cs
│ ├── MessageBox.xaml
│ ├── MessageBox.xaml.cs
│ ├── MultiComboBox.xaml
│ ├── MultiComboBox.xaml.cs
│ ├── Panel
│ │ └── FillWrapPanel.cs
│ ├── PopMessageBox.xaml
│ ├── PopMessageBox.xaml.cs
│ ├── ProgressForValue.xaml
│ ├── ProgressForValue.xaml.cs
│ ├── ProgressRing.cs
│ ├── ProgressRing.xaml
│ ├── QuestionBox.xaml
│ ├── QuestionBox.xaml.cs
│ ├── RangeSlider.cs
│ ├── TreeComboBox.xaml
│ ├── TreeComboBox.xaml.cs
│ ├── VerticalTextBlock.xaml
│ ├── VerticalTextBlock.xaml.cs
│ ├── VirtualizingWrapPanel.cs
│ ├── WaitingBox.xaml
│ ├── WaitingBox.xaml.cs
│ ├── WindowBase.xaml
│ └── WindowBase.xaml.cs
├── Converter
│ ├── BackgroundToForegroundConverter.cs
│ ├── BitmapImageSourceConverter.cs
│ ├── BoolToTextConverter.cs
│ ├── BoolToVisibilityConverter.cs
│ ├── BrushToColorConverter.cs
│ ├── BytesToImageSourceConverter.cs
│ ├── CharacterWrapConverter.cs
│ ├── ColorToBrushConverter.cs
│ ├── ColorToStringConverter.cs
│ ├── CountOrNullToCollapsedConverter.cs
│ ├── CountOrNullToEnableConverter.cs
│ ├── CountOrNullToVisibilityConverter.cs
│ ├── DoubleToThicknessConverter.cs
│ ├── EnabledToVisibilityConverter.cs
│ ├── EnumDescriptionConverter.cs
│ ├── EnumTypeToItemSourceConverter.cs
│ ├── EnumsToItemSourceConverter.cs
│ ├── NullAndVisibilityToCollapsedConverter.cs
│ ├── NullToEnableConverter.cs
│ ├── NullToVisibilityConverter.cs
│ ├── ObjectTypeConverter.cs
│ ├── PercentToAngleConverter.cs
│ ├── PointConverter.cs
│ ├── SizeConverter.cs
│ ├── StringFormatConverter.cs
│ ├── StringLengthToBoolConverter.cs
│ ├── StringLengthToVisibilityConverter.cs
│ ├── ThicknessToDoubleConverter.cs
│ ├── TreeViewMarginConverter.cs
│ ├── TrueToFalseConverter.cs
│ ├── VisibilityToCollapsedConverter.cs
│ ├── VisibilityToStarGridLengthConverter.cs
│ └── XConverter.cs
├── CustomControl1.cs
├── Extension
│ ├── ControlExtesion.cs
│ ├── EnumBindingExtension.cs
│ └── TreeViewExtension.cs
├── Global.xaml
├── Helper
│ ├── ColorHelper.cs
│ ├── ControlHelper.cs
│ ├── FileHelper.cs
│ ├── GUIThreadHelper.cs
│ ├── ImageHelper.cs
│ ├── ResourceHelper.cs
│ └── Win32Helper.cs
├── Mvvm
│ ├── BaseNotifyPropertyChanged.cs
│ ├── Messenger.cs
│ └── RelayCommand.cs
├── Properties
│ ├── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ ├── Resources.resx
│ ├── Settings.Designer.cs
│ └── Settings.settings
├── Style.xaml
├── Style
│ ├── Button.xaml
│ ├── Calendar.xaml
│ ├── CheckBox.xaml
│ ├── ComboBox.xaml
│ ├── DataGrid.xaml
│ ├── DatePicker.xaml
│ ├── FIcon.xaml
│ ├── ListBox.xaml
│ ├── ListView.xaml
│ ├── Menu.xaml
│ ├── PasswordBox.xaml
│ ├── ProgressBar.xaml
│ ├── RadioButton.xaml
│ ├── RangeSlider.xaml
│ ├── ScrollViewer.xaml
│ ├── Separator.xaml
│ ├── Share.xaml
│ ├── Slider.xaml
│ ├── TabControl.xaml
│ ├── TextBox.xaml
│ ├── ToggleButton.xaml
│ └── TreeView.xaml
├── Themes
│ ├── Color.xaml
│ ├── Generic.xaml
│ └── iconfont.ttf
├── Util.Controls.csproj
├── readme.md
└── {Core}
│ ├── AsyncObservableCollection.cs
│ ├── Cache
│ ├── CacheManager.cs
│ ├── CacheTime.cs
│ ├── DefaultCache.cs
│ └── ICache.cs
│ ├── Constants.cs
│ ├── Executer.cs
│ ├── Guard.cs
│ ├── IgnoreCaseStringComparer.cs
│ ├── Singleton.cs
│ ├── TypeExtension.Enum.cs
│ ├── TypeExtension.Exception.cs
│ ├── TypeExtension.IEnumerable.cs
│ ├── TypeExtension.Int.cs
│ ├── TypeExtension.Reflection.cs
│ ├── TypeExtension.String.cs
│ ├── TypeExtension.cs
│ └── UtilProperty.cs
└── plan.txt
/.gitignore:
--------------------------------------------------------------------------------
1 | /Util.Controls.V1.0/Util.Controls/bin
2 | /Util.Controls.V1.0/Util.Controls/obj
3 | build
4 | obj
5 | bin
6 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | > 本人在学习中和开发WPF中,学习、借鉴了很多网友的文章和开源的项目的知识。发现提供实际项目开发需要的基础控件、样式的文章大都比较散,不成系列。因此基于现在项目中使用开发这一套基础UI库,写了这个系列,希望对有需要的人有所帮助。
2 |
3 | ## 第一个版本:Util.Controls.V1.0
4 |
5 | > 这一个版本有一个系列文章,文章目录:http://www.cnblogs.com/anding/p/5018363.html
6 |
7 | ## 第二个版本还在开发完善中,在时机成熟的时候,也会开源。
8 |
9 | ### 第一版的效果图
10 | 
11 | 
12 | 
13 | 
14 |
15 | 
16 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/System.Utility/Cache/CacheTime.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace System.Data
7 | {
8 | ///
9 | /// 缓存时间
10 | ///
11 | public class CacheTime
12 | {
13 | ///
14 | /// 缓存1分钟
15 | ///
16 | public const int Time_60s = 60;
17 |
18 | ///
19 | /// 缓存100秒
20 | ///
21 | public const int Time_100s = 100;
22 |
23 | ///
24 | /// 缓存300秒/5min
25 | ///
26 | public const int Time_300s = 300;
27 |
28 | ///
29 | /// 缓存600秒/10min
30 | ///
31 | public const int Time_600s = 600;
32 |
33 | ///
34 | /// 缓存20分钟
35 | ///
36 | public const int Time_20min = 1200;
37 |
38 | ///
39 | /// 缓存30分钟
40 | ///
41 | public const int Time_30min = 1800;
42 |
43 | ///
44 | /// 缓存60分钟
45 | ///
46 | public const int Time_60min = 3600;
47 |
48 | ///
49 | /// 缓存2小时
50 | ///
51 | public const int Time_2hour = 7200;
52 |
53 | ///
54 | /// 缓存5小时
55 | ///
56 | public const int Time_5hour = 18000;
57 |
58 | ///
59 | /// 缓存10小时
60 | ///
61 | public const int Time_10hour = 36000;
62 |
63 | ///
64 | /// 缓存1天
65 | ///
66 | public const int Time_1days = 86400;
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/System.Utility/Common/Constants.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace System
7 | {
8 | ///
9 | /// 公共常量定义
10 | ///
11 | public static class Constants
12 | {
13 | public static readonly object[] EmptyObjectArray = new object[0];
14 | public static readonly string[] EmptyStringArrray = new string[0];
15 |
16 | public static readonly Type VoidType = typeof(void);
17 | public static readonly Type ObjectType = typeof(object);
18 | public static readonly Type StringType = typeof(string);
19 | public static readonly Type DoubleType = typeof(double);
20 | public static readonly Type DateTimeType = typeof(DateTime);
21 | public static readonly Type NullableDateTimeType = typeof(DateTime?);
22 | public static readonly Type NullGenericListType = typeof(List<>);
23 | public static readonly Type NullableType = typeof(Nullable<>);
24 | public static readonly Type EnumType = typeof(Enum);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/System.Utility/Common/Guard.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Utility.Resources;
6 |
7 | namespace System
8 | {
9 | ///
10 | /// (n. 守卫)提供全局通用验证
11 | ///
12 | public static class Guard
13 | {
14 | #region ArgumentNotNull:验证参数是否为NULL
15 | ///
16 | /// 验证参数是否为NULL
17 | ///
18 | public static void ArgumentNotNull(object value, string argumentName)
19 | {
20 | if (value == null)
21 | {
22 | throw new ArgumentNullException(argumentName,
23 | string.Format(DefaultErrorMessages.ArgumentNotNull, argumentName));
24 | }
25 | }
26 | #endregion
27 |
28 | #region ArgumentNotNullOrEmpty:验证参数是否为NULL或空字符串
29 | ///
30 | /// 验证参数是否为NULL或空字符串
31 | ///
32 | public static void ArgumentNotNullOrEmpty(string value, string argumentName)
33 | {
34 | if (value.IsNullOrEmptyOrWhiteSpace())
35 | {
36 | throw new ArgumentNullException(argumentName,
37 | string.Format(DefaultErrorMessages.ArgumentNotNullOrEmpty, argumentName));
38 | }
39 | }
40 | #endregion
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/System.Utility/Data/Nhibernate/HttpSessionManager.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using NHibernate;
6 | using System.Web;
7 |
8 | namespace System.Data
9 | {
10 | ///
11 | /// Http请求的Isession管理
12 | ///
13 | public class HttpSessionManager : ISessionManager
14 | {
15 | private const string KeyName = "NHSession";
16 |
17 | #region ISessionManager 成员
18 |
19 | ///
20 | /// 获取ISession
21 | ///
22 | public NHibernate.ISession Get()
23 | {
24 | return (ISession)HttpContext.Current.Items[KeyName];
25 | }
26 |
27 | ///
28 | /// 设置ISession
29 | ///
30 | public void Set(NHibernate.ISession value)
31 | {
32 | if (value != null)
33 | {
34 | HttpContext.Current.Items.Add(KeyName, value);
35 | }
36 | else
37 | {
38 | HttpContext.Current.Items.Remove(KeyName);
39 | }
40 | }
41 |
42 | #endregion
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/System.Utility/Data/Nhibernate/ISessionManager.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using NHibernate;
6 |
7 | namespace System.Data
8 | {
9 | ///
10 | /// ISession管理接口
11 | ///
12 | public interface ISessionManager
13 | {
14 | ///
15 | ///获得ISession
16 | ///
17 | ///
18 | ISession Get();
19 |
20 | ///
21 | /// 保存ISession
22 | ///
23 | ///
24 | void Set(ISession value);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/System.Utility/Data/Nhibernate/SessionManagerFactoryBase.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using NHibernate;
6 | using System.Web;
7 |
8 | namespace System.Data
9 | {
10 | ///
11 | /// 创建ISession的工厂基类
12 | /// 子类须实现ISessionManager和ISessionFactory
13 | ///
14 | public abstract class SessionManagerFactoryBase
15 | {
16 | ///
17 | /// NHibernate配置文件路径
18 | ///
19 | protected string ConfigFile { set; get; }
20 |
21 | protected ISessionManager SessionManager { set; get; }
22 |
23 | protected abstract ISessionFactory SessionFactory { get; }
24 |
25 | ///
26 | /// 建立ISessionFactory的实例
27 | ///
28 | public virtual ISession CreateSession()
29 | {
30 | var session = SessionManager.Get();
31 | if (session == null)
32 | {
33 | session = this.SessionFactory.OpenSession();
34 | SessionManager.Set(session);
35 | }
36 | if (!session.IsConnected)
37 | {
38 | session.Reconnect();
39 | }
40 | return session;
41 | }
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/System.Utility/Data/Nhibernate/ThreadSessionManager.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using NHibernate;
6 |
7 | namespace System.Data
8 | {
9 | ///
10 | /// 线程ISession管理
11 | ///
12 | public class ThreadSessionManager : ISessionManager
13 | {
14 | [ThreadStatic]
15 | private static ISession _Session;
16 |
17 | #region ISessionManager 成员
18 |
19 | ///
20 | /// 获取ISession
21 | ///
22 | public NHibernate.ISession Get()
23 | {
24 | if (_Session != null)
25 | {
26 | if (!_Session.IsConnected)
27 | {
28 | _Session.Reconnect();
29 | }
30 | }
31 | return _Session;
32 | }
33 |
34 | ///
35 | /// 设置ISession
36 | ///
37 | public void Set(NHibernate.ISession value)
38 | {
39 | if (value.IsConnected)
40 | {
41 | value.Disconnect();
42 | }
43 | _Session = value;
44 | }
45 |
46 | #endregion
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/System.Utility/Data/Sqlite/SQLiteString.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Data.SQLite;
6 |
7 | namespace System.Data
8 | {
9 | ///
10 | /// 执行SQLitel的Sql命令定义
11 | ///
12 | public class SQLiteString
13 | {
14 | public string SqlText { get; set; }
15 | public IList Parameters;
16 |
17 | public SQLiteString()
18 | {
19 | this.Parameters = new List();
20 | }
21 |
22 | public SQLiteString(string sqlText)
23 | : this()
24 | {
25 | this.SqlText = sqlText;
26 | }
27 |
28 | public void SetCommand(SQLiteCommand com)
29 | {
30 | Guard.ArgumentNotNull(com, "SQLiteCommand");
31 | com.CommandText = this.SqlText;
32 | if (this.Parameters != null && this.Parameters.Count > 0)
33 | {
34 | this.Parameters.ForEach(s =>
35 | {
36 | com.Parameters.Add(s.ToSQLiteParameter());
37 | });
38 | }
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/System.Utility/Data/Sqlite/SqlParameter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Data.SQLite;
6 |
7 | namespace System.Data
8 | {
9 | #region SQLite参数
10 | ///
11 | /// SQLite参数,注意参数使用方法,sql中不带引号,@符号代表参数
12 | /// Example:select * from numberinfo where number =@number ; sql.Parameters.Add(new SqlParameter("@number", number));
13 | /// select longitude,latitude from location where province like @province;sql.Parameters.Add(new SqlParameter("@province", province+"%"));
14 | ///
15 | public class SqlParameter
16 | {
17 | public string Name { get; set; }
18 | public object Value { get; set; }
19 | public SqlParameter(string name, object value)
20 | {
21 | this.Name = name;
22 | this.Value = value;
23 | }
24 |
25 | ///
26 | /// 隐士转换为SQLiteParameter的重载扩展
27 | ///
28 | public SQLiteParameter ToSQLiteParameter()
29 | {
30 | SQLiteParameter para = new SQLiteParameter();
31 | para.Value = this.Value;
32 | para.ParameterName = this.Name;
33 | para.DbType = DBTypeFactory.GetDataType(this.Value.GetType());
34 | return para;
35 | }
36 | }
37 | #endregion
38 | }
39 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/System.Utility/Data/SqliteRecovery/SqliteReturn.cs:
--------------------------------------------------------------------------------
1 | namespace System.Data
2 | {
3 | ///
4 | /// Sqlite执行返回实体。
5 | ///
6 | public class SqliteReturn
7 | {
8 | ///
9 | /// 是否处理成功。
10 | ///
11 | public bool IsSucess { get; set; }
12 |
13 | ///
14 | /// 栈信息。
15 | /// 当正常处理时,可能为空。
16 | ///
17 | public string StackMsg { get; set; }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/System.Utility/Data/Validation/Attributes/RequireValidatorAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Reflection;
6 |
7 | namespace System.Utility.Data.Validation
8 | {
9 | ///
10 | /// 必填属性抽象类
11 | ///
12 | public class RequireValidatorAttribute : ValidatorAttribute
13 | {
14 | ///
15 | /// 获取验证器
16 | ///
17 | public override Validator GetValidator(PropertyInfo propertyInfo)
18 | {
19 | return RequireValidatorFactory.CreateValidator(this.ErrorMsg, this.Text, propertyInfo);
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/System.Utility/Data/Validation/Attributes/ValidatorAttribute.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Reflection;
6 |
7 | namespace System.Utility.Data.Validation
8 | {
9 | ///
10 | /// 验证属性抽象类
11 | ///
12 | [AttributeUsage(AttributeTargets.Property), Serializable]
13 | public abstract class ValidatorAttribute : Attribute
14 | {
15 | ///
16 | /// 错误提示消息
17 | ///
18 | public string ErrorMsg { get; set; }
19 |
20 | ///
21 | /// 属性文本名称
22 | ///
23 | public string Text { get; set; }
24 |
25 | ///
26 | /// 获取验证器
27 | ///
28 | public abstract Validator GetValidator(PropertyInfo propertyInfo);
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/System.Utility/Data/Validation/IValidateable.cs:
--------------------------------------------------------------------------------
1 | namespace System.Utility.Data.Validation
2 | {
3 | ///
4 | /// 可支持验证的验证接口
5 | ///
6 | public interface IValidateable
7 | {
8 | ///
9 | /// 验证数据合法性
10 | /// 验证通过返回true;验证失败返回false
11 | ///
12 | ///
13 | bool IsValid();
14 |
15 | ///
16 | /// 错误信息
17 | ///
18 | string ErrorMsg { get; }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/System.Utility/Data/Validation/ValidateableBase.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Reflection;
6 |
7 | namespace System.Utility.Data.Validation
8 | {
9 | ///
10 | /// 验证处理基类
11 | /// 提供基本属性验证方法
12 | ///
13 | public class ValidateableBase : IValidateable
14 | {
15 | ///
16 | /// 验证管理中心
17 | ///
18 | private ValidationManager _Manager;
19 |
20 | ///
21 | /// 验证基类
22 | ///
23 | public ValidateableBase()
24 | {
25 | this._Manager = new ValidationManager(this);
26 | }
27 |
28 | ///
29 | /// 验证数据合法性
30 | /// 验证通过返回true;验证失败返回false
31 | ///
32 | public virtual bool IsValid()
33 | {
34 | return this._Manager.DoIsValid();
35 | }
36 |
37 | ///
38 | /// 错误信息
39 | ///
40 | public virtual string ErrorMsg
41 | {
42 | get { return this._Manager.ErrorMsg; }
43 | }
44 |
45 | ///
46 | /// 自定义错误信息
47 | /// (add: wangxi 2015-04-23 17:22:07)
48 | ///
49 | public virtual string CustomError { get; set; }
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/System.Utility/Data/Validation/Validators/RequireValidator/DatetimeRequireValidator.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Reflection;
6 |
7 | namespace System.Utility.Data.Validation
8 | {
9 | ///
10 | /// 必填验证器
11 | ///
12 | public class DatetimeRequireValidator : RequireValidator
13 | {
14 | #region DatetimeRequireValidator:构造函数
15 | ///
16 | /// 必填验证器
17 | ///
18 | public DatetimeRequireValidator(string errorMsg, string text, PropertyInfo propertyInfo)
19 | : base(errorMsg, text, propertyInfo)
20 | {
21 | if (string.IsNullOrEmpty(errorMsg))
22 | {
23 | this.ErrorMsg = string.Format(System.Utility.Resources.DefaultErrorMessages.DateTimeRequired,
24 | text);
25 | }
26 | }
27 | #endregion
28 |
29 | ///
30 | /// 执行验证
31 | /// 验证通过返回true;验证失败返回false
32 | ///
33 | protected override bool Validation(object value)
34 | {
35 | var res = base.Validation(value);
36 | if (!res)
37 | {
38 | return res;
39 | }
40 | var target = Convert.ToDateTime(value);
41 | return target.IsValid();
42 | }
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/System.Utility/Data/Validation/Validators/RequireValidator/RequireValidator.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Reflection;
6 |
7 | namespace System.Utility.Data.Validation
8 | {
9 | ///
10 | /// 必填验证器
11 | ///
12 | public class RequireValidator : Validator
13 | {
14 | #region RequireValidator:构造函数
15 | ///
16 | /// 必填验证器
17 | ///
18 | public RequireValidator(string errorMsg, string text, PropertyInfo propertyInfo)
19 | : base(errorMsg, text, propertyInfo)
20 | {
21 | if (string.IsNullOrEmpty(errorMsg))
22 | {
23 | this.ErrorMsg = string.Format(System.Utility.Resources.DefaultErrorMessages.Required,
24 | text);
25 | }
26 | }
27 | #endregion
28 |
29 | ///
30 | /// 执行验证
31 | /// 验证通过返回true;验证失败返回false
32 | ///
33 | protected override bool Validation(object value)
34 | {
35 | return value != null;
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/System.Utility/Data/Validation/Validators/RequireValidator/RequireValidatorFactory.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Reflection;
6 |
7 | namespace System.Utility.Data.Validation
8 | {
9 | ///
10 | /// 必填验证器简单工厂
11 | ///
12 | public class RequireValidatorFactory
13 | {
14 | ///
15 | /// 创建必填验证器(根据数据类型)
16 | ///
17 | public static RequireValidator CreateValidator(string errorMsg, string text, PropertyInfo propertyInfo)
18 | {
19 | var type = propertyInfo.PropertyType;
20 | if (type.Equals(typeof(string)))
21 | {
22 | return new StringRequireValidator(errorMsg, text, propertyInfo);
23 | }
24 | if (type.Equals(typeof(DateTime)))
25 | {
26 | return new DatetimeRequireValidator(errorMsg, text, propertyInfo);
27 | }
28 | return new RequireValidator(errorMsg, text, propertyInfo);
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/System.Utility/Data/Validation/Validators/RequireValidator/StringRequireValidator.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Reflection;
6 |
7 | namespace System.Utility.Data.Validation
8 | {
9 | ///
10 | /// 字符必填验证器
11 | ///
12 | public class StringRequireValidator : RequireValidator
13 | {
14 | #region StringRequireValidator:构造函数
15 | ///
16 | /// 字符必填验证器
17 | ///
18 | public StringRequireValidator(string errorMsg, string text, PropertyInfo propertyInfo)
19 | : base(errorMsg, text, propertyInfo)
20 | {
21 | if (string.IsNullOrEmpty(errorMsg))
22 | {
23 | this.ErrorMsg = string.Format(System.Utility.Resources.DefaultErrorMessages.StringRequired,
24 | text);
25 | }
26 | }
27 | #endregion
28 |
29 | ///
30 | /// 执行验证
31 | /// 验证通过返回true;验证失败返回false
32 | ///
33 | protected override bool Validation(object value)
34 | {
35 | var res = base.Validation(value);
36 | if (!res)
37 | {
38 | return res;
39 | }
40 | string target = value as string;
41 | return !target.IsNullOrEmpty();
42 | }
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/System.Utility/Dynamic/GetPropertyBinder.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Dynamic;
6 |
7 | namespace System
8 | {
9 | ///
10 | /// 获取属性
11 | ///
12 | internal class GetPropertyBinder : GetMemberBinder
13 | {
14 | public GetPropertyBinder(string propertyName)
15 | : base(propertyName, false)
16 | {
17 | }
18 |
19 | public override DynamicMetaObject FallbackGetMember(DynamicMetaObject target, DynamicMetaObject errorSuggestion)
20 | {
21 | return new DynamicMetaObject(
22 | System.Linq.Expressions.Expression.Throw(
23 | System.Linq.Expressions.Expression.New(
24 | typeof(InvalidOperationException).GetConstructor(new Type[] { typeof(string) }),
25 | new System.Linq.Expressions.Expression[] { System.Linq.Expressions.Expression.Constant("Error") }),
26 | this.ReturnType), BindingRestrictions.Empty);
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/System.Utility/Dynamic/IDynamicEnable.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace System
7 | {
8 | ///
9 | /// 动态类型扩展提供接口
10 | ///
11 | public interface IDynamicEnable
12 | {
13 | ///
14 | /// 动态类型扩展
15 | ///
16 | DynamicX Dynamic { get; set; }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/System.Utility/Dynamic/SetPropertyBinder.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Dynamic;
6 |
7 | namespace System
8 | {
9 | ///
10 | /// 设置属性
11 | ///
12 | internal class SetPropertyBinder : SetMemberBinder
13 | {
14 | public SetPropertyBinder(string propertyName)
15 | : base(propertyName, false)
16 | {
17 | }
18 |
19 | public override DynamicMetaObject FallbackSetMember(DynamicMetaObject target, DynamicMetaObject value, DynamicMetaObject errorSuggestion)
20 | {
21 | return new DynamicMetaObject(
22 | System.Linq.Expressions.Expression.Throw(
23 | System.Linq.Expressions.Expression.New(
24 | typeof(InvalidOperationException).GetConstructor(new Type[] { typeof(string) }),
25 | new System.Linq.Expressions.Expression[] { System.Linq.Expressions.Expression.Constant("Error") }),
26 | this.ReturnType), BindingRestrictions.Empty);
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/System.Utility/Extension/TypeExtension.IQueryable.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Linq.Expressions;
5 | using System.Text;
6 |
7 | namespace System
8 | {
9 | ///
10 | /// IQueryable的操作扩展
11 | ///
12 | public static partial class TypeExtension
13 | {
14 | ///
15 | /// 如果条件condition为ture时执行查询谓词predicate
16 | /// predicate 查询谓词['predɪkət]
17 | ///
18 | public static IQueryable WhereIf(this IQueryable @this, Expression> predicate, bool condition)
19 | {
20 | return condition ? @this.Where(predicate) : @this;
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/System.Utility/Extension/TypeExtension.Stream.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Text;
6 |
7 | namespace System
8 | {
9 | ///
10 | /// Steam 扩展方法
11 | ///
12 | static partial class TypeExtension
13 | {
14 | #region 扩展流运用
15 |
16 | ///
17 | /// 扩展流运用.
18 | /// 注意:Stream使用者要注意资源的释放。
19 | ///
20 | ///
21 | ///
22 | public static void Append(this Stream stream, Stream descSream)
23 | {
24 | byte[] descbyte = new byte[descSream.Length];
25 | descSream.Read(descbyte, 0, descbyte.Length);
26 | descSream.Seek(0, SeekOrigin.Begin);
27 | stream.Write(descbyte, 0, descbyte.Length);
28 | }
29 |
30 | #endregion
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/System.Utility/Extension/TypeExtension.Xml.cs:
--------------------------------------------------------------------------------
1 |
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Xml;
7 |
8 | namespace System
9 | {
10 | ///
11 | /// xml操作扩展
12 | ///
13 | public static partial class TypeExtension
14 | {
15 | ///
16 | /// 安全的获取节点属性值
17 | ///
18 | public static string GetSafeAttributeValue(this XmlNode node, string attribute)
19 | {
20 | if (node == null)
21 | {
22 | return string.Empty;
23 | }
24 | if (node.Attributes != null)
25 | {
26 | var att = node.Attributes[attribute];
27 | if (att == null)
28 | {
29 | return string.Empty;
30 | }
31 | return att.Value.Trim();
32 | }
33 | return string.Empty;
34 | }
35 |
36 | ///
37 | /// 获取XML枚举属性值,枚举支持位域
38 | ///
39 | public static TEnum GetSafeAttributeEnum(this XmlNode node, string attribute, TEnum defaultValue)
40 | {
41 | try
42 | {
43 | var value = node.GetSafeAttributeValue(attribute);
44 | if (value.IsValid()) return value.Replace(",", ",").ToEnum();
45 | }
46 | catch
47 | {
48 | // ignored
49 | }
50 | return defaultValue;
51 | }
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/System.Utility/Extension/TypeExtension.sth.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace System
7 | {
8 | ///
9 | /// 扩展方法
10 | ///
11 | public static partial class TypeExtension
12 | {
13 |
14 |
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/System.Utility/Helper/Config.cs:
--------------------------------------------------------------------------------
1 | #region 命名空间引用
2 |
3 | using System.Configuration;
4 |
5 | #endregion
6 |
7 | namespace System.Utility.Helper
8 | {
9 | ///
10 | /// 配置公共操作类
11 | ///
12 | public class Config
13 | {
14 | #region ContainsAppSettings
15 | ///
16 | /// 检测Web.config(App.config)的appSettings配置节是否包含指定键,包含返回true
17 | ///
18 | /// 键名
19 | public static bool ContainsAppSettings(string key)
20 | {
21 | try
22 | {
23 | return GetAppSettings(key).Length > 0;
24 | }
25 | catch
26 | {
27 | return false;
28 | }
29 | }
30 | #endregion
31 |
32 | #region GetAppSettings
33 | ///
34 | /// 读取Web.config(App.config)的appSettings配置节的值
35 | ///
36 | /// 键名
37 | public static string GetAppSettings(string key)
38 | {
39 | //有效性验证
40 | if (string.IsNullOrEmpty(key))
41 | {
42 | return string.Empty;
43 | }
44 |
45 | //获取配置值
46 | string value = ConfigurationManager.AppSettings[key];
47 |
48 | //返回值
49 | return string.IsNullOrEmpty(value) ? string.Empty : value.Trim();
50 | }
51 | #endregion
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/System.Utility/Helper/Format.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace System.Utility.Helper
7 | {
8 | public static class Format
9 | {
10 | #region FormatSecond
11 | ///
12 | /// 把秒格式成{0}时{0}分{1}秒
13 | ///
14 | public static string FormatSecond(int second)
15 | {
16 | if (second < 60)
17 | {
18 | return string.Format("{0}秒", second);
19 | }
20 | if (second < 3600)
21 | {
22 | return string.Format("{0}分{1}秒", second / 60, second % 60);
23 | }
24 | else
25 | {
26 | var h = second / 3600;
27 | var m = (second % 3600) / 60;
28 | var s = (second % 3600) % 60;
29 | return string.Format("{0}时{1}分{2}秒", h, m, s);
30 | }
31 | }
32 | #endregion
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/System.Utility/Helper/TimeOut.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading;
6 |
7 | namespace System.Utility.Helper
8 | {
9 | ///
10 | /// 超时辅助类;
11 | /// By: WangXi 2014-11-21 10:22:12
12 | /// 用途:确定某些方法在一定时间内是否超时执行;
13 | ///
14 | public class TimeOut
15 | {
16 | private readonly ManualResetEvent _mTimeOut = new ManualResetEvent(true);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/System.Utility/Ioc/IContainer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace System.Utility.Ioc
7 | {
8 | ///
9 | /// Ioc容器接口
10 | ///
11 | internal interface IContainer
12 | {
13 | ///
14 | /// 加载实例
15 | ///
16 | /// 实例类型
17 | T Load();
18 |
19 | ///
20 | /// 加载实例
21 | ///
22 | /// 实例类型
23 | /// 实例的命名
24 | T Load(string name);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/System.Utility/Ioc/Ioc.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace System.Utility.Ioc
7 | {
8 | ///
9 | /// 依赖注入容器
10 | /// Denpendency Injection(DI)
11 | ///
12 | public static class Ioc
13 | {
14 | ///
15 | /// 创建对象
16 | ///
17 | public static T Create(string name = "")
18 | {
19 | IContainer container = Singleton.GetInstance();
20 | if (name.IsValid())
21 | {
22 | return container.Load(name);
23 | }
24 | return container.Load();
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/System.Utility/Ioc/SpringContainer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace System.Utility.Ioc
7 | {
8 | ///
9 | /// Spring容器
10 | ///
11 | internal class SpringContainer : IContainer
12 | {
13 | #region 字段
14 | ///
15 | /// 容器上下文
16 | ///
17 | private Spring.Context.IApplicationContext _context;
18 | #endregion
19 |
20 | #region 构造函数
21 | ///
22 | /// 初始化
23 | ///
24 | public SpringContainer()
25 | {
26 | _context = Spring.Context.Support.ContextRegistry.GetContext();
27 | }
28 | #endregion
29 |
30 | #region 加载实例
31 |
32 | #region 重载1
33 | ///
34 | /// 加载实例
35 | ///
36 | /// 实例类型
37 | public T Load()
38 | {
39 | return _context.GetObject();
40 | }
41 | #endregion
42 |
43 | #region 重载2
44 | ///
45 | /// 加载实例
46 | ///
47 | /// 实例的命名
48 | /// 实例类型
49 | public T Load(string name)
50 | {
51 |
52 | return _context.GetObject(name);
53 | }
54 | #endregion
55 |
56 | #endregion
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/System.Utility/Misc/ConsoleAsyncResult.cs:
--------------------------------------------------------------------------------
1 | namespace System.Utility
2 | {
3 | ///
4 | /// 控制台输出异步通知实现
5 | ///
6 | public class ConsoleAsyncResult : AbstractSyncResult
7 | {
8 | #region Start
9 | ///
10 | /// 开始
11 | ///
12 | public override void Start(double total)
13 | {
14 | base.Start(total);
15 | Console.WriteLine(string.Format("Start ,Total:{0}", total));
16 | }
17 | #endregion
18 |
19 | #region Advance
20 | ///
21 | /// 执行进度
22 | ///
23 | public override void Advance(double work, string message = "", object sender = null)
24 | {
25 | base.Advance(work, message, sender);
26 | Console.WriteLine("Total:{0};Completed:{1}.Message:{2}", this.Total, this.Completed, message);
27 | }
28 | #endregion
29 |
30 | #region Stop
31 | ///
32 | /// 完成或停止
33 | ///
34 | public override void Stop()
35 | {
36 | base.Stop();
37 | Console.WriteLine("Stop");
38 | }
39 | #endregion
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/System.Utility/Misc/DefaultAsyncResult.cs:
--------------------------------------------------------------------------------
1 | namespace System.Utility
2 | {
3 | ///
4 | /// 默认异步通知实现
5 | ///
6 | public class DefaultSyncResult : AbstractSyncResult
7 | {
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/System.Utility/Misc/IgnoreCaseStringComparer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace System
5 | {
6 | ///
7 | /// 不区分大小写的字符串比较器
8 | ///
9 | public class IgnoreCaseStringComparer : IEqualityComparer
10 | {
11 | public bool Equals(string x, string y)
12 | {
13 | return string.Compare(x, y, true) == 0;
14 | }
15 |
16 | public int GetHashCode(string obj)
17 | {
18 | return obj.GetHashCode();
19 | }
20 | }
21 | }
--------------------------------------------------------------------------------
/Util.Controls.V1.0/System.Utility/Patterns/FlyweightBase.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace System.Utility.Patterns
7 | {
8 | ///
9 | /// 享元模式的实现基类
10 | /// 共享大量细粒度的对象,复用内存对象,降低内存消耗
11 | ///
12 | public abstract class FlyweightBase where TValue : class
13 | {
14 | private static object _obj = new object();
15 |
16 | ///
17 | /// 享元工厂
18 | ///
19 | protected static Dictionary Cache = new Dictionary();
20 |
21 | ///
22 | /// 对象初始化
23 | ///
24 | ///
25 | protected abstract void DoInitalize(Tkey key);
26 |
27 | ///
28 | /// 获取享元对象实例
29 | ///
30 | public virtual TValue GetInstance(Tkey key)
31 | {
32 | Guard.ArgumentNotNull(key, "Tkey");
33 | lock (_obj)
34 | {
35 | if (!Cache.ContainsKey(key))
36 | {
37 | this.DoInitalize(key);
38 | }
39 | }
40 |
41 | return Cache[key];
42 | }
43 |
44 | ///
45 | /// 获取享元对象实例
46 | ///
47 | public TValue this[Tkey key]
48 | {
49 | get
50 | {
51 | return this.GetInstance(key);
52 | }
53 | }
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/System.Utility/Patterns/ISimpleFactory.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace System.Utility.Patterns
7 | {
8 | ///
9 | /// 简单工厂的抽象接口
10 | ///
11 | /// key键值类型
12 | /// 工厂实例类型
13 | public interface ISimpleFactory
14 | {
15 | ///
16 | /// 根据key获取实例
17 | ///
18 | TValue GetInstance(TKey key);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/System.Utility/Patterns/Obsever.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace System.Utility.Patterns
7 | {
8 | #region AbstractObseverable:观察者模式-主体抽象基类
9 | ///
10 | /// 观察者模式-主体抽象基类
11 | ///
12 | ///
13 | public abstract class AbstractObseverable
14 | {
15 | ///
16 | /// 观察者列表
17 | ///
18 | protected List ObSevers = new List();
19 |
20 | ///
21 | /// 注册观察者
22 | ///
23 | ///
24 | public void Register(IObsever obsever)
25 | {
26 | this.ObSevers.Add(obsever);
27 | }
28 |
29 | ///
30 | /// 注销观察者的注册
31 | ///
32 | ///
33 | public void UnRegister(IObsever obsever)
34 | {
35 | this.ObSevers.Remove(obsever);
36 | }
37 | }
38 | #endregion
39 |
40 | #region IObsever: 观察者模式-观察者抽象接口
41 | ///
42 | /// 观察者模式-观察者抽象接口
43 | ///
44 | public interface IObsever
45 | {
46 | ///
47 | /// 响应观察者主体的事件
48 | ///
49 | void Response();
50 | }
51 | #endregion
52 | }
53 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/System.Utility/Patterns/Singleton.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace System
7 | {
8 | ///
9 | /// 单例模式。
10 | /// 注意:如果对象创建比较昂贵或需要特殊的销毁处理,请谨慎使用此单例实现,原因参考Interlocked提供的原子操作原理。
11 | ///
12 | public static class Singleton where TItem : class,new()
13 | {
14 | private static TItem _Instance = null;
15 |
16 | ///
17 | /// 获取单例对象的实例
18 | ///
19 | ///
20 | public static TItem GetInstance()
21 | {
22 | if (_Instance == null)
23 | {
24 | //提供线程互斥的原子操作
25 | System.Threading.Interlocked.CompareExchange(ref _Instance, Activator.CreateInstance(), null);
26 | }
27 |
28 | return _Instance;
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/System.Utility/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // 有关程序集的常规信息通过下列属性集
6 | // 控制。更改这些属性值可修改
7 | // 与程序集关联的信息。
8 | [assembly: AssemblyTitle("System.Utility")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("Salvation Data Technology Ryan kuang")]
12 | [assembly: AssemblyProduct("System.Utility")]
13 | [assembly: AssemblyCopyright("Copyright 2015")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // 将 ComVisible 设置为 false 使此程序集中的类型
18 | // 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型,
19 | // 则将该类型上的 ComVisible 属性设置为 true。
20 | [assembly: ComVisible(false)]
21 |
22 | // 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
23 | [assembly: Guid("ec2ff0d9-4d03-44d3-8ad2-cf9190565672")]
24 |
25 | // 程序集的版本信息由下面四个值组成:
26 | //
27 | // 主版本
28 | // 次版本
29 | // 内部版本号
30 | // 修订号
31 | //
32 | // 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值,
33 | // 方法是按如下所示使用“*”:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("3.0.0.1")]
36 | [assembly: AssemblyFileVersion("3.0.0.1")]
37 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/System.Utility/Security/Identity.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Security.Principal;
6 |
7 | namespace System.Utility.Security
8 | {
9 | ///
10 | /// 身份标识基类
11 | ///
12 | public class Identity : IIdentity
13 | {
14 | public Identity()
15 | {
16 | this.IsAuthenticated = false;
17 | this.Name = string.Empty;
18 | }
19 |
20 | ///
21 | /// 认证类型
22 | ///
23 | public string AuthenticationType
24 | {
25 | get { return string.Empty; }
26 | }
27 |
28 | ///
29 | /// 是否通过身份认证
30 | ///
31 | public bool IsAuthenticated { get; set; }
32 |
33 | ///
34 | /// 用户名
35 | ///
36 | public string Name { get; set; }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/System.Utility/Security/Principal.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Security.Principal;
6 |
7 | namespace System.Utility.Security
8 | {
9 | ///
10 | /// 安全主题
11 | ///
12 | public class Principal : IPrincipal
13 | {
14 | public Principal(IIdentity identity)
15 | {
16 | this.Identity = identity;
17 | }
18 |
19 | public Principal()
20 | : this(new Identity())
21 | { }
22 |
23 | ///
24 | /// 身份标识
25 | ///
26 | public IIdentity Identity { get; set; }
27 |
28 | public bool IsInRole(string role)
29 | {
30 | throw new NotImplementedException();
31 | }
32 |
33 | ///
34 | /// 用户信息
35 | ///
36 | public UserInfo UserInfo { get; set; }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/System.Utility/System.Utility.csproj.vspscc:
--------------------------------------------------------------------------------
1 | ""
2 | {
3 | "FILE_VERSION" = "9237"
4 | "ENLISTMENT_CHOICE" = "NEVER"
5 | "PROJECT_FILE_RELATIVE_PATH" = ""
6 | "NUMBER_OF_EXCLUDED_FILES" = "0"
7 | "ORIGINAL_PROJECT_FILE_PATH" = ""
8 | "NUMBER_OF_NESTED_PROJECTS" = "0"
9 | "SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER"
10 | }
11 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/System.Utility/Win32/Enums.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.ComponentModel;
6 |
7 | namespace System.Utility.Win32
8 | {
9 | #region EnumDirverType
10 | ///
11 | /// 磁盘类型
12 | ///
13 | public enum EnumDirverType
14 | {
15 | ///
16 | /// 未知设备
17 | ///
18 | [Description("未知设备")]
19 | None = 0,
20 |
21 | ///
22 | /// 未分区
23 | ///
24 | [Description("未分区")]
25 | NoPartition = 1,
26 |
27 | ///
28 | /// 可移动磁盘
29 | ///
30 | [Description("可移动磁盘")]
31 | MobileDisk = 2,
32 |
33 | ///
34 | /// "硬盘
35 | ///
36 | [Description("硬盘")]
37 | HardDisk = 3,
38 |
39 | ///
40 | /// 网络驱动器
41 | ///
42 | [Description("网络驱动器")]
43 | NetworkDisk = 4,
44 |
45 | ///
46 | /// 光驱
47 | ///
48 | [Description("光驱")]
49 | CD = 5,
50 |
51 | ///
52 | /// 内存磁盘
53 | ///
54 | [Description("内存磁盘")]
55 | MemoryDisk = 6,
56 |
57 | ///
58 | /// 未知类型
59 | ///
60 | [Description("未知类型")]
61 | Unknow = 10,
62 | }
63 | #endregion
64 | }
65 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/Images/logom.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/Images/logom.png
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/Images/qq.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/Images/qq.png
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/Images/qq1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/Images/qq1.png
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/Images/qq2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/Images/qq2.png
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/MainWindow.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Windows;
3 | using System.Windows.Controls;
4 | using System.Windows.Input;
5 |
6 | namespace Util.Controls.WPFTest
7 | {
8 | ///
9 | /// MainWindow.xaml 的交互逻辑
10 | ///
11 | public partial class MainWindow : Window
12 | {
13 | public static readonly DependencyProperty OpenCommandProperty =
14 | DependencyProperty.Register("OpenCommand", typeof(RoutedCommand), typeof(MainWindow), new PropertyMetadata(null));
15 |
16 | public RoutedCommand OpenCommand
17 | {
18 | get { return (RoutedCommand)GetValue(OpenCommandProperty); }
19 | set { SetValue(OpenCommandProperty, value); }
20 | }
21 |
22 | public MainWindow()
23 | {
24 | InitializeComponent();
25 | //bind command
26 | this.OpenCommand = new RoutedCommand();
27 | var bin = new CommandBinding(this.OpenCommand);
28 | bin.Executed += bin_Executed;
29 | this.CommandBindings.Add(bin);
30 | }
31 |
32 | void bin_Executed(object sender, ExecutedRoutedEventArgs e)
33 | {
34 | var btn = e.Source as Button;
35 | this.PageContext.Source = new Uri(btn.Tag.ToString(), UriKind.Relative);
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/Page/Page_ComboBox_Date.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Windows;
6 | using System.Windows.Controls;
7 | using System.Windows.Data;
8 | using System.Windows.Documents;
9 | using System.Windows.Input;
10 | using System.Windows.Media;
11 | using System.Windows.Media.Imaging;
12 | using System.Windows.Navigation;
13 | using System.Windows.Shapes;
14 |
15 | namespace Util.Controls.WPFTest
16 | {
17 | ///
18 | /// Page_ComboBox_Date.xaml 的交互逻辑
19 | ///
20 | public partial class Page_ComboBox_Date : Page
21 | {
22 | public Page_ComboBox_Date()
23 | {
24 | InitializeComponent();
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/Page/Page_Image.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Windows;
6 | using System.Windows.Controls;
7 | using System.Windows.Data;
8 | using System.Windows.Documents;
9 | using System.Windows.Input;
10 | using System.Windows.Media;
11 | using System.Windows.Media.Imaging;
12 | using System.Windows.Navigation;
13 | using System.Windows.Shapes;
14 |
15 | namespace Util.Controls.WPFTest
16 | {
17 | ///
18 | /// Page_Image.xaml 的交互逻辑
19 | ///
20 | public partial class Page_Image : Page
21 | {
22 | public Page_Image()
23 | {
24 | InitializeComponent();
25 | }
26 |
27 | private void FButton_Click(object sender, RoutedEventArgs e)
28 | {
29 | this.ImageCache.ThumbnailSource =
30 | "http://www.wallsave.com/wallpapers/1920x1080/beautiful-girl/733941/beautiful-girl-girls-hd-733941.jpg";
31 | }
32 |
33 | private void FButton_BindClick(object sender, RoutedEventArgs e)
34 | {
35 | this.Gif.GIFSource = this.gifSource.Text.Trim();
36 | }
37 | private void FButton_StartClick(object sender, RoutedEventArgs e)
38 | {
39 | this.Gif.StartAnimate();
40 | }
41 |
42 | private void FButton_EndClick(object sender, RoutedEventArgs e)
43 | {
44 | this.Gif.StopAnimate();
45 | }
46 |
47 | private void FButton_ChangeSizeClick(object sender, RoutedEventArgs e)
48 | {
49 |
50 | }
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/Page/Page_ImageViewer.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Windows;
7 | using System.Windows.Controls;
8 | using System.Windows.Data;
9 | using System.Windows.Documents;
10 | using System.Windows.Input;
11 | using System.Windows.Media;
12 | using System.Windows.Media.Imaging;
13 | using System.Windows.Navigation;
14 | using System.Windows.Shapes;
15 |
16 | namespace Util.Controls.WPFTest
17 | {
18 | ///
19 | /// Page_ImageViewer.xaml 的交互逻辑
20 | ///
21 | public partial class Page_ImageViewer : Page
22 | {
23 | public Page_ImageViewer()
24 | {
25 | InitializeComponent();
26 | }
27 |
28 | private void FButton_Click(object sender, RoutedEventArgs e)
29 | {
30 | var str = this.txtFolder.Text.Trim();
31 | if (str.IsInvalid()) return;
32 |
33 | var fs1 = System.IO.Directory.GetFiles(str, "*.jpg", SearchOption.AllDirectories);
34 | var fs2 = System.IO.Directory.GetFiles(str, "*.png", SearchOption.AllDirectories);
35 | List fs = new List();
36 | fs.AddRange(fs1);
37 | fs.AddRange(fs2);
38 | List users = new List();
39 | foreach (var f in fs)
40 | {
41 | users.Add(new FFile { File = f, Name = System.IO.Path.GetFileName(f) });
42 | }
43 |
44 | this.timgViewer.ItemsSource = users;
45 | }
46 |
47 | internal class FFile
48 | {
49 | public string File { get; set; }
50 | public string Name { get; set; }
51 | }
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/Page/Page_ListBox_MultiCom.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Windows;
6 | using System.Windows.Controls;
7 | using System.Windows.Data;
8 | using System.Windows.Documents;
9 | using System.Windows.Input;
10 | using System.Windows.Media;
11 | using System.Windows.Media.Imaging;
12 | using System.Windows.Navigation;
13 | using System.Windows.Shapes;
14 |
15 | namespace Util.Controls.WPFTest
16 | {
17 | ///
18 | /// Page_ListBox.xaml 的交互逻辑
19 | ///
20 | public partial class Page_ListBox : Page
21 | {
22 | public Page_ListBox()
23 | {
24 | InitializeComponent();
25 | }
26 |
27 | private void ButtonBase_OnClick(object sender, RoutedEventArgs e)
28 | {
29 | this.mcom.UnselectAll();
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/Page/Page_ListView.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Windows;
6 | using System.Windows.Controls;
7 | using System.Windows.Data;
8 | using System.Windows.Documents;
9 | using System.Windows.Input;
10 | using System.Windows.Media;
11 | using System.Windows.Media.Imaging;
12 | using System.Windows.Navigation;
13 | using System.Windows.Shapes;
14 |
15 | namespace Util.Controls.WPFTest
16 | {
17 | ///
18 | /// Page_ListView.xaml 的交互逻辑
19 | ///
20 | public partial class Page_ListView : Page
21 | {
22 | public Page_ListView()
23 | {
24 | InitializeComponent();
25 |
26 | }
27 |
28 | private void btnBind_Click(object sender, RoutedEventArgs e)
29 | {
30 | var len = this.txtNumber.Text.ToSafeInt();
31 | List ds = new List();
32 | for (int i = 0; i < len; i++)
33 | {
34 | var d1 = new Device()
35 | {
36 | Name = "MX33333333333333333333333331_" + i,
37 | Manufacturer = "Meizu--" + i,
38 | Mode = "M303",
39 | OSType = EnumOSType.Android,
40 | State = EnumDeviceState.Online,
41 | Version = "4,2,1",
42 | SerialNumber = "0123456789",
43 | IsRoot = true,
44 | };
45 | ds.Add(d1);
46 | }
47 | this.gridList.ItemsSource = ds;
48 | this.gridList0.ItemsSource = ds;
49 | this.gridList2.ItemsSource = ds;
50 | }
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/Page/Page_MVVM.xaml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/Page/Page_MVVM.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Windows;
6 | using System.Windows.Controls;
7 | using System.Windows.Data;
8 | using System.Windows.Documents;
9 | using System.Windows.Input;
10 | using System.Windows.Media;
11 | using System.Windows.Media.Imaging;
12 | using System.Windows.Navigation;
13 | using System.Windows.Shapes;
14 |
15 | namespace Util.Controls.WPFTest
16 | {
17 | ///
18 | /// Page_MVVM.xaml 的交互逻辑
19 | ///
20 | public partial class Page_MVVM : Page
21 | {
22 | public Page_MVVM()
23 | {
24 | InitializeComponent();
25 | this.DataContext = new TestUserModel();
26 | }
27 | }
28 |
29 | public class TestUserModel : BaseNotifyPropertyChanged
30 | {
31 | private string _Name;
32 | public string Name
33 | {
34 | get { return this._Name; }
35 | set { this._Name = value; base.OnPropertyChanged(() => Name); }
36 | }
37 |
38 | public RelayCommand SetUserName { get; private set; }
39 |
40 | public TestUserModel()
41 | {
42 | this.SetUserName = new RelayCommand(DoSetUserName);
43 | }
44 |
45 | private void DoSetUserName(string name)
46 | {
47 | if (MessageBoxX.Question(string.Format("Set Name is {0}?", name)))
48 | {
49 | this.Name = name;
50 | }
51 | }
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/Page/Page_MultCase.xaml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/Page/Page_MultCase.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Windows;
6 | using System.Windows.Controls;
7 | using System.Windows.Data;
8 | using System.Windows.Documents;
9 | using System.Windows.Input;
10 | using System.Windows.Media;
11 | using System.Windows.Media.Imaging;
12 | using System.Windows.Navigation;
13 | using System.Windows.Shapes;
14 |
15 | namespace Util.Controls.WPFTest
16 | {
17 | ///
18 | /// Page_MultCase.xaml 的交互逻辑
19 | ///
20 | public partial class Page_MultCase : Page
21 | {
22 | public Page_MultCase()
23 | {
24 | InitializeComponent();
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/Page/Page_TabControl.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Windows;
6 | using System.Windows.Controls;
7 | using System.Windows.Data;
8 | using System.Windows.Documents;
9 | using System.Windows.Input;
10 | using System.Windows.Media;
11 | using System.Windows.Media.Imaging;
12 | using System.Windows.Navigation;
13 | using System.Windows.Shapes;
14 |
15 | namespace Util.Controls.WPFTest
16 | {
17 | ///
18 | /// Page_TabControl.xaml 的交互逻辑
19 | ///
20 | public partial class Page_TabControl : Page
21 | {
22 | public Page_TabControl()
23 | {
24 | InitializeComponent();
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/Page/Page_Test.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Windows;
6 | using System.Windows.Controls;
7 | using System.Windows.Data;
8 | using System.Windows.Documents;
9 | using System.Windows.Input;
10 | using System.Windows.Media;
11 | using System.Windows.Media.Animation;
12 | using System.Windows.Media.Imaging;
13 | using System.Windows.Media.Media3D;
14 | using System.Windows.Navigation;
15 | using System.Windows.Shapes;
16 |
17 | namespace Util.Controls.WPFTest
18 | {
19 | ///
20 | /// Page_Test.xaml 的交互逻辑
21 | ///
22 | public partial class Page_Test : Page
23 | {
24 | public Page_Test()
25 | {
26 | InitializeComponent();
27 | }
28 |
29 | private void Grid_MouseDown(object sender, MouseButtonEventArgs e)
30 | {
31 | DoubleAnimation da = new DoubleAnimation();
32 | da.Duration = new Duration(TimeSpan.FromSeconds(1));
33 | if (e.ClickCount == 2)
34 | da.To = 0d;
35 | else
36 | da.To = 180d;
37 | AxisAngleRotation3D aar =this.FindName("aar") as AxisAngleRotation3D;
38 | aar.BeginAnimation(AxisAngleRotation3D.AngleProperty, da);
39 | }
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/Page/Page_TextBox.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Windows;
6 | using System.Windows.Controls;
7 | using System.Windows.Data;
8 | using System.Windows.Documents;
9 | using System.Windows.Input;
10 | using System.Windows.Media;
11 | using System.Windows.Media.Imaging;
12 | using System.Windows.Navigation;
13 | using System.Windows.Shapes;
14 |
15 | namespace Util.Controls.WPFTest
16 | {
17 | ///
18 | /// Page_TextBox.xaml 的交互逻辑
19 | ///
20 | public partial class Page_TextBox : Page
21 | {
22 | public Page_TextBox()
23 | {
24 | InitializeComponent();
25 | PasswordBox pb = new PasswordBox();
26 | pb.Password = "123";
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/Page/Page_Webbrowser.xaml:
--------------------------------------------------------------------------------
1 |
11 |
12 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/Page/Page_Webbrowser.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Windows;
6 | using System.Windows.Controls;
7 | using System.Windows.Data;
8 | using System.Windows.Documents;
9 | using System.Windows.Input;
10 | using System.Windows.Media;
11 | using System.Windows.Media.Imaging;
12 | using System.Windows.Navigation;
13 | using System.Windows.Shapes;
14 | using Util.Controls;
15 |
16 | namespace Util.Controls.WPFTest
17 | {
18 | ///
19 | /// Page_Button.xaml 的交互逻辑
20 | ///
21 | public partial class Page_Webbrowser : Page
22 | {
23 | public Page_Webbrowser()
24 | {
25 | InitializeComponent();
26 | }
27 |
28 |
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Resources;
3 | using System.Runtime.CompilerServices;
4 | using System.Runtime.InteropServices;
5 | using System.Windows;
6 |
7 | // 有关程序集的常规信息通过以下
8 | // 特性集控制。更改这些特性值可修改
9 | // 与程序集关联的信息。
10 | [assembly: AssemblyTitle("Util.Controls.WPFTest")]
11 | [assembly: AssemblyDescription("")]
12 | [assembly: AssemblyConfiguration("")]
13 | [assembly: AssemblyCompany("")]
14 | [assembly: AssemblyProduct("Util.Controls.WPFTest")]
15 | [assembly: AssemblyCopyright("Copyright © 2014")]
16 | [assembly: AssemblyTrademark("")]
17 | [assembly: AssemblyCulture("")]
18 |
19 | // 将 ComVisible 设置为 false 使此程序集中的类型
20 | // 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型,
21 | // 则将该类型上的 ComVisible 特性设置为 true。
22 | [assembly: ComVisible(false)]
23 |
24 | //若要开始生成可本地化的应用程序,请在
25 | // 中的 .csproj 文件中
26 | //设置 CultureYouAreCodingWith。例如,如果您在源文件中
27 | //使用的是美国英语,请将 设置为 en-US。然后取消
28 | //对以下 NeutralResourceLanguage 特性的注释。更新
29 | //以下行中的“en-US”以匹配项目文件中的 UICulture 设置。
30 |
31 | //[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
32 |
33 |
34 | [assembly: ThemeInfo(
35 | ResourceDictionaryLocation.None, //主题特定资源词典所处位置
36 | //(在页面或应用程序资源词典中
37 | // 未找到某个资源的情况下使用)
38 | ResourceDictionaryLocation.SourceAssembly //常规资源词典所处位置
39 | //(在页面、应用程序或任何主题特定资源词典中
40 | // 未找到某个资源的情况下使用)
41 | )]
42 |
43 |
44 | // 程序集的版本信息由下面四个值组成:
45 | //
46 | // 主版本
47 | // 次版本
48 | // 内部版本号
49 | // 修订号
50 | //
51 | // 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值,
52 | // 方法是按如下所示使用“*”:
53 | // [assembly: AssemblyVersion("1.0.*")]
54 | [assembly: AssemblyVersion("1.0.0.0")]
55 | [assembly: AssemblyFileVersion("1.0.0.0")]
56 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本:4.0.30319.42000
5 | //
6 | // 对此文件的更改可能会导致不正确的行为,并且如果
7 | // 重新生成代码,这些更改将会丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace Util.Controls.WPFTest.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/Style/Default.xaml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/XLY.Framework.WPFTest.csproj.vspscc:
--------------------------------------------------------------------------------
1 | ""
2 | {
3 | "FILE_VERSION" = "9237"
4 | "ENLISTMENT_CHOICE" = "NEVER"
5 | "PROJECT_FILE_RELATIVE_PATH" = ""
6 | "NUMBER_OF_EXCLUDED_FILES" = "0"
7 | "ORIGINAL_PROJECT_FILE_PATH" = ""
8 | "NUMBER_OF_NESTED_PROJECTS" = "0"
9 | "SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER"
10 | }
11 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/bin/Debug/Images/logom.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/bin/Debug/Images/logom.png
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/bin/Debug/Images/qq.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/bin/Debug/Images/qq.png
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/bin/Debug/Images/qq1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/bin/Debug/Images/qq1.png
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/bin/Debug/Images/qq2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/bin/Debug/Images/qq2.png
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/bin/Debug/Microsoft.Expression.Drawing.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/bin/Debug/Microsoft.Expression.Drawing.dll
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/bin/Debug/Microsoft.Expression.Effects.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/bin/Debug/Microsoft.Expression.Effects.dll
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/bin/Debug/Microsoft.Expression.Interactions.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/bin/Debug/Microsoft.Expression.Interactions.dll
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/bin/Debug/Microsoft.Windows.Shell.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/bin/Debug/Microsoft.Windows.Shell.dll
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/bin/Debug/System.Utility.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/bin/Debug/System.Utility.dll
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/bin/Debug/System.Windows.Interactivity.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/bin/Debug/System.Windows.Interactivity.dll
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/bin/Debug/Util.Controls.WPFTest.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/bin/Debug/Util.Controls.WPFTest.exe
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/bin/Debug/Util.Controls.WPFTest.exe.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/bin/Debug/Util.Controls.WPFTest.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/bin/Debug/Util.Controls.WPFTest.pdb
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/bin/Debug/Util.Controls.WPFTest.vshost.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/bin/Debug/Util.Controls.WPFTest.vshost.exe
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/bin/Debug/Util.Controls.WPFTest.vshost.exe.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/bin/Debug/Util.Controls.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/bin/Debug/Util.Controls.dll
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/bin/Debug/Util.Controls.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/bin/Debug/Util.Controls.pdb
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/doc/Remark.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/doc/Remark.txt
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/doc/iconfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/doc/iconfont.ttf
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/App.baml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/App.baml
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/GeneratedInternalTypeHelper.g.cs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/MainWindow.baml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/MainWindow.baml
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/Page/Page_Button.baml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/Page/Page_Button.baml
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/Page/Page_ComboBox_Date.baml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/Page/Page_ComboBox_Date.baml
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/Page/Page_DataGrid.baml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/Page/Page_DataGrid.baml
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/Page/Page_Image.baml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/Page/Page_Image.baml
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/Page/Page_ImageViewer.baml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/Page/Page_ImageViewer.baml
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/Page/Page_ListBox_MultiCom.baml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/Page/Page_ListBox_MultiCom.baml
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/Page/Page_ListView.baml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/Page/Page_ListView.baml
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/Page/Page_MVVM.baml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/Page/Page_MVVM.baml
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/Page/Page_MultCase.baml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/Page/Page_MultCase.baml
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/Page/Page_TabControl.baml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/Page/Page_TabControl.baml
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/Page/Page_Test.baml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/Page/Page_Test.baml
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/Page/Page_TextBox.baml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/Page/Page_TextBox.baml
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/Page/Page_TreeView.baml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/Page/Page_TreeView.baml
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/Page/Page_Waiting.baml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/Page/Page_Waiting.baml
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/Page/Page_Webbrowser.baml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/Page/Page_Webbrowser.baml
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/Style/Colors.baml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/Style/Colors.baml
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/Style/Default.baml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/Style/Default.baml
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/TempPE/Properties.Resources.Designer.cs.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/TempPE/Properties.Resources.Designer.cs.dll
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/Util.Controls.WPFTest.Properties.Resources.resources:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/Util.Controls.WPFTest.Properties.Resources.resources
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/Util.Controls.WPFTest.csproj.GenerateResource.Cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/Util.Controls.WPFTest.csproj.GenerateResource.Cache
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/Util.Controls.WPFTest.csprojResolveAssemblyReference.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/Util.Controls.WPFTest.csprojResolveAssemblyReference.cache
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/Util.Controls.WPFTest.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/Util.Controls.WPFTest.exe
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/Util.Controls.WPFTest.g.resources:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/Util.Controls.WPFTest.g.resources
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/Util.Controls.WPFTest.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/Util.Controls.WPFTest.pdb
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/Util.Controls.WPFTest_Content.g.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本:4.0.30319.42000
5 | //
6 | // 对此文件的更改可能会导致不正确的行为,并且如果
7 | // 重新生成代码,这些更改将会丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | [assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("doc/demo.css")]
12 | [assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("doc/demo.html")]
13 | [assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("doc/iconfont.css")]
14 |
15 |
16 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/Util.Controls.WPFTest_Content.g.i.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本:4.0.30319.42000
5 | //
6 | // 对此文件的更改可能会导致不正确的行为,并且如果
7 | // 重新生成代码,这些更改将会丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | [assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("doc/demo.css")]
12 | [assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("doc/demo.html")]
13 | [assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("doc/iconfont.css")]
14 |
15 |
16 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/Util.Controls.WPFTest_MarkupCompile.cache:
--------------------------------------------------------------------------------
1 | Util.Controls.WPFTest
2 |
3 |
4 | winexe
5 | C#
6 | .cs
7 | D:\Project Files\XFProject\control\Util.Controls.WPFTest\obj\x86\Debug\
8 | Util.Controls.WPFTest
9 | none
10 | false
11 | DEBUG;TRACE
12 | D:\Project Files\XFProject\control\Util.Controls.WPFTest\App.xaml
13 | 20-2044530621
14 | 3-1475504317
15 | 22-837756264
16 | 21-516295191
17 | MainWindow.xaml;old\WebImageViewer.xaml;old\LocalImageViewer.xaml;Page\Page_MultCase.xaml;Page\Page_MVVM.xaml;Page\Page_Webbrowser.xaml;Page\Page_Button.xaml;Page\Page_ComboBox_Date.xaml;Page\Page_DataGrid.xaml;Page\Page_Image.xaml;Page\Page_ImageViewer.xaml;Page\Page_ListBox_MultiCom.xaml;Page\Page_ListView.xaml;Page\Page_TabControl.xaml;Page\Page_Test.xaml;Page\Page_TextBox.xaml;Page\Page_TreeView.xaml;Page\Page_Waiting.xaml;Style\Colors.xaml;Style\Default.xaml;
18 |
19 | False
20 |
21 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/Util.Controls.WPFTest_MarkupCompile.i.cache:
--------------------------------------------------------------------------------
1 | Util.Controls.WPFTest
2 |
3 |
4 | winexe
5 | C#
6 | .cs
7 | D:\Project Files\XFProject\control\Util.Controls.WPFTest\obj\x86\Debug\
8 | Util.Controls.WPFTest
9 | none
10 | false
11 | DEBUG;TRACE
12 | D:\Project Files\XFProject\control\Util.Controls.WPFTest\App.xaml
13 | 20-2044530621
14 | 3-1475504317
15 | 23-252334374
16 | 21-516295191
17 | MainWindow.xaml;old\WebImageViewer.xaml;old\LocalImageViewer.xaml;Page\Page_MultCase.xaml;Page\Page_MVVM.xaml;Page\Page_Webbrowser.xaml;Page\Page_Button.xaml;Page\Page_ComboBox_Date.xaml;Page\Page_DataGrid.xaml;Page\Page_Image.xaml;Page\Page_ImageViewer.xaml;Page\Page_ListBox_MultiCom.xaml;Page\Page_ListView.xaml;Page\Page_TabControl.xaml;Page\Page_Test.xaml;Page\Page_TextBox.xaml;Page\Page_TreeView.xaml;Page\Page_Waiting.xaml;Style\Colors.xaml;Style\Default.xaml;
18 |
19 | True
20 |
21 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/Util.Controls.WPFTest_MarkupCompile.i.lref:
--------------------------------------------------------------------------------
1 | D:\Project Files\XFProject\control\Util.Controls.WPFTest\obj\x86\Debug\GeneratedInternalTypeHelper.g.i.cs
2 |
3 | FD:\Project Files\XFProject\control\Util.Controls.WPFTest\Page\Page_MultCase.xaml;;
4 | FD:\Project Files\XFProject\control\Util.Controls.WPFTest\Page\Page_TreeView.xaml;;
5 |
6 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/Util.Controls.WPFTest_MarkupCompile.lref:
--------------------------------------------------------------------------------
1 | D:\Project Files\XFProject\control\Util.Controls.WPFTest\obj\x86\Debug\GeneratedInternalTypeHelper.g.cs
2 |
3 | FD:\Project Files\XFProject\control\Util.Controls.WPFTest\Page\Page_MultCase.xaml;;
4 | FD:\Project Files\XFProject\control\Util.Controls.WPFTest\Page\Page_TreeView.xaml;;
5 |
6 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/XLY.Framework.WPFTest.Properties.Resources.resources:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/XLY.Framework.WPFTest.Properties.Resources.resources
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/XLY.Framework.WPFTest.csproj.GenerateResource.Cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/XLY.Framework.WPFTest.csproj.GenerateResource.Cache
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/XLY.Framework.WPFTest.csprojResolveAssemblyReference.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/XLY.Framework.WPFTest.csprojResolveAssemblyReference.cache
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/XLY.Framework.WPFTest.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/XLY.Framework.WPFTest.exe
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/XLY.Framework.WPFTest.g.resources:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/XLY.Framework.WPFTest.g.resources
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/XLY.Framework.WPFTest.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/XLY.Framework.WPFTest.pdb
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/XLY.Framework.WPFTest_Content.g.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本:4.0.30319.42000
5 | //
6 | // 对此文件的更改可能会导致不正确的行为,并且如果
7 | // 重新生成代码,这些更改将会丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | [assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("doc/demo.css")]
12 | [assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("doc/demo.html")]
13 | [assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("doc/iconfont.css")]
14 |
15 |
16 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/XLY.Framework.WPFTest_Content.g.i.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本:4.0.30319.42000
5 | //
6 | // 对此文件的更改可能会导致不正确的行为,并且如果
7 | // 重新生成代码,这些更改将会丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | [assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("doc/demo.css")]
12 | [assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("doc/demo.html")]
13 | [assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("doc/iconfont.css")]
14 |
15 |
16 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/XLY.Framework.WPFTest_MarkupCompile.cache:
--------------------------------------------------------------------------------
1 | XLY.Framework.WPFTest
2 |
3 |
4 | winexe
5 | C#
6 | .cs
7 | D:\XLYCodes\Platformframework\Framework\XLY.Framework.WPFTest\obj\x86\Debug\
8 | XLY.Framework.WPFTest
9 | none
10 | false
11 | DEBUG;TRACE
12 | D:\XLYCodes\Platformframework\Framework\XLY.Framework.WPFTest\App.xaml
13 | 21-370621436
14 | 3-1475504317
15 | 23-588644379
16 | 211786864678
17 | control\MultCaseTabControl.xaml;MainWindow.xaml;old\WebImageViewer.xaml;old\LocalImageViewer.xaml;Page\Page_MultCase.xaml;Page\Page_MVVM.xaml;Page\Page_Webbrowser.xaml;Page\Page_Button.xaml;Page\Page_ComboBox_Date.xaml;Page\Page_DataGrid.xaml;Page\Page_Image.xaml;Page\Page_ImageViewer.xaml;Page\Page_ListBox_MultiCom.xaml;Page\Page_ListView.xaml;Page\Page_TabControl.xaml;Page\Page_Test.xaml;Page\Page_TextBox.xaml;Page\Page_TreeView.xaml;Page\Page_Waiting.xaml;Style\Colors.xaml;Style\Default.xaml;
18 |
19 | False
20 |
21 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/XLY.Framework.WPFTest_MarkupCompile.i.cache:
--------------------------------------------------------------------------------
1 | XLY.Framework.WPFTest
2 |
3 |
4 | winexe
5 | C#
6 | .cs
7 | D:\Project Files\XFProject\control\XLY.Framework.WPFTest\obj\x86\Debug\
8 | XLY.Framework.WPFTest
9 | none
10 | false
11 | DEBUG;TRACE
12 | D:\Project Files\XFProject\control\XLY.Framework.WPFTest\App.xaml
13 | 21-370621436
14 | 3-1475504317
15 | 24-3222489
16 | 202096726643
17 | control\MultCaseTabControl.xaml;MainWindow.xaml;old\WebImageViewer.xaml;old\LocalImageViewer.xaml;Page\Page_MultCase.xaml;Page\Page_MVVM.xaml;Page\Page_Webbrowser.xaml;Page\Page_Button.xaml;Page\Page_ComboBox_Date.xaml;Page\Page_DataGrid.xaml;Page\Page_Image.xaml;Page\Page_ImageViewer.xaml;Page\Page_ListBox_MultiCom.xaml;Page\Page_ListView.xaml;Page\Page_TabControl.xaml;Page\Page_Test.xaml;Page\Page_TextBox.xaml;Page\Page_TreeView.xaml;Page\Page_Waiting.xaml;Style\Colors.xaml;Style\Default.xaml;
18 |
19 | False
20 |
21 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/XLY.Framework.WPFTest_MarkupCompile.lref:
--------------------------------------------------------------------------------
1 | D:\XLYCodes\Platformframework\Framework\XLY.Framework.WPFTest\obj\x86\Debug\GeneratedInternalTypeHelper.g.cs
2 |
3 | FD:\XLYCodes\Platformframework\Framework\XLY.Framework.WPFTest\Page\Page_MultCase.xaml;;
4 | FD:\XLYCodes\Platformframework\Framework\XLY.Framework.WPFTest\Page\Page_TreeView.xaml;;
5 |
6 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/old/LocalImageViewer.baml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/old/LocalImageViewer.baml
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/old/WebImageViewer.baml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Debug/old/WebImageViewer.baml
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/App.baml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/App.baml
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/DesignTimeResolveAssemblyReferencesInput.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/DesignTimeResolveAssemblyReferencesInput.cache
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/GeneratedInternalTypeHelper.g.cs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/MainWindow.baml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/MainWindow.baml
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/Page/Page_Button.baml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/Page/Page_Button.baml
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/Page/Page_ComboBox_Date.baml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/Page/Page_ComboBox_Date.baml
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/Page/Page_DataGrid.baml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/Page/Page_DataGrid.baml
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/Page/Page_Image.baml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/Page/Page_Image.baml
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/Page/Page_ImageViewer.baml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/Page/Page_ImageViewer.baml
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/Page/Page_ListBox_MultiCom.baml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/Page/Page_ListBox_MultiCom.baml
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/Page/Page_ListView.baml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/Page/Page_ListView.baml
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/Page/Page_MVVM.baml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/Page/Page_MVVM.baml
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/Page/Page_MultCase.baml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/Page/Page_MultCase.baml
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/Page/Page_TabControl.baml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/Page/Page_TabControl.baml
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/Page/Page_Test.baml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/Page/Page_Test.baml
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/Page/Page_TextBox.baml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/Page/Page_TextBox.baml
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/Page/Page_TreeView.baml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/Page/Page_TreeView.baml
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/Page/Page_Waiting.baml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/Page/Page_Waiting.baml
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/Page/Page_Webbrowser.baml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/Page/Page_Webbrowser.baml
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/Style/Colors.baml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/Style/Colors.baml
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/Style/Default.baml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/Style/Default.baml
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/TempPE/Properties.Resources.Designer.cs.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/TempPE/Properties.Resources.Designer.cs.dll
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/XLY.Framework.WPFTest.Properties.Resources.resources:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/XLY.Framework.WPFTest.Properties.Resources.resources
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/XLY.Framework.WPFTest.csproj.GenerateResource.Cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/XLY.Framework.WPFTest.csproj.GenerateResource.Cache
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/XLY.Framework.WPFTest.csprojResolveAssemblyReference.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/XLY.Framework.WPFTest.csprojResolveAssemblyReference.cache
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/XLY.Framework.WPFTest.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/XLY.Framework.WPFTest.exe
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/XLY.Framework.WPFTest.g.resources:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/XLY.Framework.WPFTest.g.resources
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/XLY.Framework.WPFTest.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/XLY.Framework.WPFTest.pdb
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/XLY.Framework.WPFTest_Content.g.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本:4.0.30319.42000
5 | //
6 | // 对此文件的更改可能会导致不正确的行为,并且如果
7 | // 重新生成代码,这些更改将会丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | [assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("doc/demo.css")]
12 | [assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("doc/demo.html")]
13 | [assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("doc/iconfont.css")]
14 |
15 |
16 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/XLY.Framework.WPFTest_Content.g.i.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本:4.0.30319.42000
5 | //
6 | // 对此文件的更改可能会导致不正确的行为,并且如果
7 | // 重新生成代码,这些更改将会丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | [assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("doc/demo.css")]
12 | [assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("doc/demo.html")]
13 | [assembly: System.Windows.Resources.AssemblyAssociatedContentFileAttribute("doc/iconfont.css")]
14 |
15 |
16 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/XLY.Framework.WPFTest_MarkupCompile.cache:
--------------------------------------------------------------------------------
1 | XLY.Framework.WPFTest
2 |
3 |
4 | winexe
5 | C#
6 | .cs
7 | D:\XLYCodes\Platformframework\Framework\XLY.Framework.WPFTest\obj\x86\Release\
8 | XLY.Framework.WPFTest
9 | none
10 | false
11 | TRACE
12 | D:\XLYCodes\Platformframework\Framework\XLY.Framework.WPFTest\App.xaml
13 | 21-370621436
14 | 3-1475504317
15 | 23-588644379
16 | 21599581981
17 | control\MultCaseTabControl.xaml;MainWindow.xaml;old\WebImageViewer.xaml;old\LocalImageViewer.xaml;Page\Page_MultCase.xaml;Page\Page_MVVM.xaml;Page\Page_Webbrowser.xaml;Page\Page_Button.xaml;Page\Page_ComboBox_Date.xaml;Page\Page_DataGrid.xaml;Page\Page_Image.xaml;Page\Page_ImageViewer.xaml;Page\Page_ListBox_MultiCom.xaml;Page\Page_ListView.xaml;Page\Page_TabControl.xaml;Page\Page_Test.xaml;Page\Page_TextBox.xaml;Page\Page_TreeView.xaml;Page\Page_Waiting.xaml;Style\Colors.xaml;Style\Default.xaml;
18 |
19 | False
20 |
21 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/XLY.Framework.WPFTest_MarkupCompile.i.cache:
--------------------------------------------------------------------------------
1 | XLY.Framework.WPFTest
2 |
3 |
4 | winexe
5 | C#
6 | .cs
7 | D:\XLYCodes\Platformframework\Framework\XLY.Framework.WPFTest\obj\x86\Release\
8 | XLY.Framework.WPFTest
9 | none
10 | false
11 | TRACE
12 | D:\XLYCodes\Platformframework\Framework\XLY.Framework.WPFTest\App.xaml
13 | 21-370621436
14 | 3-1475504317
15 | 24-1979554801
16 | 21599581981
17 | control\MultCaseTabControl.xaml;MainWindow.xaml;old\WebImageViewer.xaml;old\LocalImageViewer.xaml;Page\Page_MultCase.xaml;Page\Page_MVVM.xaml;Page\Page_Webbrowser.xaml;Page\Page_Button.xaml;Page\Page_ComboBox_Date.xaml;Page\Page_DataGrid.xaml;Page\Page_Image.xaml;Page\Page_ImageViewer.xaml;Page\Page_ListBox_MultiCom.xaml;Page\Page_ListView.xaml;Page\Page_TabControl.xaml;Page\Page_Test.xaml;Page\Page_TextBox.xaml;Page\Page_TreeView.xaml;Page\Page_Waiting.xaml;Style\Colors.xaml;Style\Default.xaml;
18 |
19 | True
20 |
21 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/XLY.Framework.WPFTest_MarkupCompile.i.lref:
--------------------------------------------------------------------------------
1 | D:\XLYCodes\Platformframework\Framework\XLY.Framework.WPFTest\obj\x86\Release\GeneratedInternalTypeHelper.g.i.cs
2 |
3 | FD:\XLYCodes\Platformframework\Framework\XLY.Framework.WPFTest\Page\Page_MultCase.xaml;;
4 | FD:\XLYCodes\Platformframework\Framework\XLY.Framework.WPFTest\Page\Page_TreeView.xaml;;
5 |
6 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/XLY.Framework.WPFTest_MarkupCompile.lref:
--------------------------------------------------------------------------------
1 | D:\XLYCodes\Platformframework\Framework\XLY.Framework.WPFTest\obj\x86\Release\GeneratedInternalTypeHelper.g.cs
2 |
3 | FD:\XLYCodes\Platformframework\Framework\XLY.Framework.WPFTest\Page\Page_MultCase.xaml;;
4 | FD:\XLYCodes\Platformframework\Framework\XLY.Framework.WPFTest\Page\Page_TreeView.xaml;;
5 |
6 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/control/MultCaseTabControl.baml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/control/MultCaseTabControl.baml
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/old/LocalImageViewer.baml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/old/LocalImageViewer.baml
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/old/WebImageViewer.baml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.WPFTest/obj/x86/Release/old/WebImageViewer.baml
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/old/LocalImageViewer.xaml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.WPFTest/old/WebImageViewer.xaml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls.v12.suo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls.v12.suo
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls/Control/BusyBox.xaml.cs:
--------------------------------------------------------------------------------
1 | using System.Windows;
2 | using System.Windows.Controls;
3 |
4 | namespace Util.Controls
5 | {
6 | ///
7 | /// BusyBox.xaml 的交互逻辑
8 | ///
9 | public partial class BusyBox : UserControl
10 | {
11 | public static readonly DependencyProperty IsActiveProperty = DependencyProperty.Register("IsActive", typeof(bool), typeof(BusyBox), new PropertyMetadata(false));
12 | ///
13 | /// 是否启用
14 | ///
15 | public bool IsActive
16 | {
17 | get { return (bool)GetValue(IsActiveProperty); }
18 | set { SetValue(IsActiveProperty, value); }
19 | }
20 |
21 | static BusyBox()
22 | {
23 | DefaultStyleKeyProperty.OverrideMetadata(typeof(BusyBox), new FrameworkPropertyMetadata(typeof(BusyBox)));
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls/Control/FImage.xaml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
14 |
15 |
16 |
17 |
19 |
20 |
21 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls/Control/HighTextBlock.xaml:
--------------------------------------------------------------------------------
1 |
4 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls/Control/ThumbnailImage/EnumThumbnail.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Util.Controls
4 | {
5 | ///
6 | /// 缩略图数据源源类型
7 | ///
8 | public enum EnumThumbnail
9 | {
10 | Image,
11 | Vedio,
12 | WebImage,
13 | Auto,
14 | FileX,
15 | }
16 | }
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls/Control/ThumbnailImage/IThumbnailProvider.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Windows.Media;
3 |
4 | namespace Util.Controls
5 | {
6 | ///
7 | /// 缩略图创建服务接口
8 | ///
9 | public interface IThumbnailProvider
10 | {
11 | ///
12 | /// 创建缩略图。fileName:文件路径;width:图片宽度;height:高度
13 | ///
14 | ImageSource GenereateThumbnail(object fileSource, double width, double height);
15 | }
16 | }
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls/Control/ThumbnailImage/ImageThumbnailProvider.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Windows.Media;
3 |
4 | namespace Util.Controls
5 | {
6 | ///
7 | /// 本地图片缩略图创建服务
8 | ///
9 | internal class ImageThumbnailProvider : IThumbnailProvider
10 | {
11 | ///
12 | /// 创建缩略图。fileName:文件路径;width:图片宽度;height:高度
13 | ///
14 | public ImageSource GenereateThumbnail(object fileName, double width, double height)
15 | {
16 | try
17 | {
18 | var path = fileName.ToSafeString();
19 | if (path.IsInvalid()) return null;
20 | return System.Utility.Helper.Images.CreateImageSourceThumbnia(path, width, height);
21 | }
22 | catch
23 | {
24 | return null;
25 | }
26 | }
27 | }
28 | }
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls/Control/ThumbnailImage/ThumbnailProviderFactory.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Util.Controls
4 | {
5 | ///
6 | /// 缩略图创建服务简单工厂
7 | ///
8 | public class ThumbnailProviderFactory : System.Utility.Patterns.ISimpleFactory
9 | {
10 | ///
11 | /// 根据key获取实例
12 | ///
13 | public virtual IThumbnailProvider GetInstance(EnumThumbnail key)
14 | {
15 | switch (key)
16 | {
17 | case EnumThumbnail.Image:
18 | return Singleton.GetInstance();
19 | case EnumThumbnail.Vedio:
20 | return Singleton.GetInstance();
21 | case EnumThumbnail.WebImage:
22 | return Singleton.GetInstance();
23 | }
24 | return null;
25 | }
26 | }
27 | }
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls/Control/ThumbnailImage/VedioThumbnailProvider.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Windows.Media;
3 |
4 | namespace Util.Controls
5 | {
6 | ///
7 | /// 本地视频缩略图创建服务
8 | /// 使用工具ffmpeg提取帧图片
9 | ///
10 | internal class VedioThumbnailProvider : IThumbnailProvider
11 | {
12 | private readonly string _ToolPath;
13 | private readonly string _Frame = "00:00:01";
14 |
15 | #region VedioThumbnailProvider-构造函数(初始化)
16 |
17 | ///
18 | /// VedioThumbnailProvider-构造函数(初始化)
19 | ///
20 | public VedioThumbnailProvider()
21 | {
22 | this._ToolPath = System.Utility.Helper.File.GetPhysicalPath(@"toolkit/Ffmpeg/ffmpeg");
23 | }
24 |
25 | #endregion
26 |
27 | ///
28 | /// 创建缩略图。fileName:文件路径;width:图片宽度;height:高度
29 | ///
30 | public ImageSource GenereateThumbnail(object fileName, double width, double height)
31 | {
32 | try
33 | {
34 | return null;
35 | }
36 | catch
37 | {
38 | return null;
39 | }
40 | }
41 | }
42 | }
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls/Control/ThumbnailImage/WebImageThumbnailProvider.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Net;
3 | using System.Windows.Media;
4 |
5 | namespace Util.Controls
6 | {
7 | ///
8 | /// 网络图片缩略图创建服务
9 | ///
10 | internal class WebImageThumbnailProvider : IThumbnailProvider
11 | {
12 | ///
13 | /// 创建缩略图。fileName:文件路径;width:图片宽度;height:高度
14 | ///
15 | public ImageSource GenereateThumbnail(object fileName, double width, double height)
16 | {
17 | try
18 | {
19 | var path = fileName.ToSafeString();
20 | if (path.IsInvalid()) return null;
21 | var request = WebRequest.Create(path);
22 | request.Timeout = 20000;
23 | var stream = request.GetResponse().GetResponseStream();
24 | var img = System.Drawing.Image.FromStream(stream);
25 | return System.Utility.Helper.Images.CreateImageSourceThumbnia(img, width, height);
26 | }
27 | catch
28 | {
29 | return null;
30 | }
31 | }
32 | }
33 | }
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls/Converter/BackgroundToForegroundConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Globalization;
3 | using System.Windows;
4 | using System.Windows.Data;
5 | using System.Windows.Media;
6 |
7 | namespace Util.Controls
8 | {
9 | ///
10 | /// 根据背景色获取前景色。当然也可反着用
11 | ///
12 | public class BackgroundToForegroundConverter : IValueConverter
13 | {
14 | private Color IdealTextColor(Color bg)
15 | {
16 | const int nThreshold = 105;
17 | var bgDelta = System.Convert.ToInt32((bg.R * 0.299) + (bg.G * 0.587) + (bg.B * 0.114));
18 | var foreColor = (255 - bgDelta < nThreshold) ? Colors.Black : Colors.White;
19 | return foreColor;
20 | }
21 |
22 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
23 | {
24 | if (value is SolidColorBrush)
25 | {
26 | var idealForegroundColor = this.IdealTextColor(((SolidColorBrush)value).Color);
27 | var foreGroundBrush = new SolidColorBrush(idealForegroundColor);
28 | foreGroundBrush.Freeze();
29 | return foreGroundBrush;
30 | }
31 | return Brushes.White;
32 | }
33 |
34 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
35 | {
36 | return DependencyProperty.UnsetValue;
37 | }
38 | }
39 | }
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls/Converter/Converters.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Windows.Controls;
3 |
4 | namespace Util.Controls
5 | {
6 | ///
7 | /// 常用转换器的静态引用
8 | /// 使用实例:Converter={x:Static local:XConverter.TrueToFalseConverter}
9 | ///
10 | public sealed class XConverter
11 | {
12 | public static BooleanToVisibilityConverter BooleanToVisibilityConverter
13 | {
14 | get { return Singleton.GetInstance(); }
15 | }
16 |
17 | public static TrueToFalseConverter TrueToFalseConverter
18 | {
19 | get { return Singleton.GetInstance(); }
20 | }
21 |
22 | public static ThicknessToDoubleConverter ThicknessToDoubleConverter
23 | {
24 | get { return Singleton.GetInstance(); }
25 | }
26 | public static BackgroundToForegroundConverter BackgroundToForegroundConverter
27 | {
28 | get { return Singleton.GetInstance(); }
29 | }
30 | public static TreeViewMarginConverter TreeViewMarginConverter
31 | {
32 | get { return Singleton.GetInstance(); }
33 | }
34 |
35 | public static PercentToAngleConverter PercentToAngleConverter
36 | {
37 | get { return Singleton.GetInstance(); }
38 | }
39 | }
40 | }
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls/Converter/PercentToAngleConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Globalization;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Windows.Data;
7 |
8 | namespace Util.Controls
9 | {
10 | ///
11 | /// 百分比转换为角度值
12 | ///
13 | public class PercentToAngleConverter : IValueConverter
14 | {
15 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
16 | {
17 | var percent = value.ToSafeString().ToDouble();
18 | if (percent >= 1) return 360.0D;
19 | return percent * 360;
20 | }
21 |
22 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
23 | {
24 | throw new NotImplementedException();
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls/Converter/ThicknessToDoubleConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Globalization;
3 | using System.Windows;
4 | using System.Windows.Data;
5 |
6 | namespace Util.Controls
7 | {
8 | ///
9 | /// 获取Thickness固定值double
10 | ///
11 | public class ThicknessToDoubleConverter : IValueConverter
12 | {
13 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
14 | {
15 | var thickness = (Thickness)value;
16 | return thickness.Left;
17 | }
18 |
19 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
20 | {
21 | return DependencyProperty.UnsetValue;
22 | }
23 | }
24 | }
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls/Converter/TreeViewMarginConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Globalization;
3 | using System.Windows;
4 | using System.Windows.Controls;
5 | using System.Windows.Data;
6 | using System.Windows.Media;
7 |
8 | namespace Util.Controls
9 | {
10 | ///
11 | /// 计算树节点的左缩进位置
12 | ///
13 | public class TreeViewMarginConverter : IValueConverter
14 | {
15 | public double Length { get; set; }
16 |
17 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
18 | {
19 | var item = value as TreeViewItem;
20 | if (item == null)
21 | return new Thickness(0);
22 | int dep = this.GetDepth(item);
23 | return new Thickness(Length * dep, 0, 0, 0);
24 | }
25 |
26 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
27 | {
28 | return DependencyProperty.UnsetValue;
29 | }
30 |
31 | public int GetDepth(TreeViewItem item)
32 | {
33 | TreeViewItem parent;
34 | while ((parent = GetParent(item)) != null)
35 | {
36 | return GetDepth(parent) + 1;
37 | }
38 | return 0;
39 | }
40 |
41 | private TreeViewItem GetParent(TreeViewItem item)
42 | {
43 | var parent = item != null ? VisualTreeHelper.GetParent(item) : null;
44 | while (parent != null && !(parent is TreeViewItem || parent is TreeView))
45 | {
46 | parent = VisualTreeHelper.GetParent(parent);
47 | }
48 | return parent as TreeViewItem;
49 | }
50 | }
51 | }
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls/Converter/TrueToFalseConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Globalization;
3 | using System.Windows.Data;
4 |
5 | namespace Util.Controls
6 | {
7 | ///
8 | /// 这是一个颠倒黑白的世界
9 | ///
10 | public sealed class TrueToFalseConverter : IValueConverter
11 | {
12 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
13 | {
14 | var v = (bool)value;
15 | return !v;
16 | }
17 |
18 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
19 | {
20 | throw new NotImplementedException();
21 | }
22 | }
23 | }
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // 此代码由工具生成。
4 | // 运行时版本:4.0.30319.42000
5 | //
6 | // 对此文件的更改可能会导致不正确的行为,并且如果
7 | // 重新生成代码,这些更改将会丢失。
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace Util.Controls.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls/Resources/iconfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls/Resources/iconfont.ttf
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls/Resources/logo.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls/Resources/logo.ico
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls/Resources/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls/Resources/logo.png
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls/Style/Global.xaml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
10 |
11 |
12 |
29 |
30 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls/Style/Themes/FIcon.xaml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
12 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls/Themes/Generic.xaml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls/Util.Controls.v12.suo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/Util.Controls/Util.Controls.v12.suo
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls/XLY.Framework.Controls.csproj.vspscc:
--------------------------------------------------------------------------------
1 | ""
2 | {
3 | "FILE_VERSION" = "9237"
4 | "ENLISTMENT_CHOICE" = "NEVER"
5 | "PROJECT_FILE_RELATIVE_PATH" = ""
6 | "NUMBER_OF_EXCLUDED_FILES" = "0"
7 | "ORIGINAL_PROJECT_FILE_PATH" = ""
8 | "NUMBER_OF_NESTED_PROJECTS" = "0"
9 | "SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER"
10 | }
11 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls/usister.txt:
--------------------------------------------------------------------------------
1 |
2 | 启用动画:xly:ControlAttachProperty.AllowsAnimation="{Binding IsMouseOver,RelativeSource={RelativeSource Self}}"
3 | 静态引用:Converter={x:Static xly:XConverter.TrueToFalseConverter}
4 | 自定义标题交互:shell:WindowChrome.IsHitTestVisibleInChrome="True"
5 |
6 | FButton:
7 | FButton_Transparency:
8 | FButton_LinkButton
9 |
10 | TextBox:
11 | LabelTextBox, LabelClearButtonTextBox, ClearButtonTextBox, LabelOpenFileTextBox, LabelOpenFolderTextBox, LabelSaveFileTextBox
12 | LabelTextBoxStyle:只读可复制的文本样式
13 |
14 | ToggleButton
15 | DefaultToggleButton, FIconToggleButton
16 |
17 | Separator
18 | VerticalSeparatorStyle, HorizontalSeparatorStyle
19 |
20 | ProgressBar
21 | SimpleProgressBar
22 |
23 | Menu
24 | TextBoxContextMenu 文本右键菜单
25 | TransparentHeaderMenuItem 第一级菜单样式
26 |
27 | DatePicker
28 | DefaultDatePicker,ClearButtonDatePicker,LabelDatePicker,LabelClearButtonDatePicker
29 |
30 | ComboBox
31 | DefaultComboBox,ClearButtonComboBox,LabelComboBox,LabelClearButtonComboBox
32 |
33 | MultiComboBox
34 | DefaultMultiComboBox,ClearButtonMultiComboBox,LabelMultiComboBox,LabelClearButtonMultiComboBox
35 |
36 | PasswordBox
37 | ClearButtonPasswordBox,LabelPasswordBox,LabelClearButtonPasswordBox
38 |
39 | FIcon:Style="{StaticResource FIcon}"
40 |
41 | xmlns:xly="clr-namespace:Util.Controls;assembly=Util.Controls"
42 |
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls/{Core}/Common/BaseNotifyPropertyChanged.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.ComponentModel;
3 | using System.Linq.Expressions;
4 | using System.Reflection;
5 |
6 | namespace System
7 | {
8 | ///
9 | /// 实现了属性更改通知的基类
10 | ///
11 | public class BaseNotifyPropertyChanged : System.ComponentModel.INotifyPropertyChanged
12 | {
13 | ///
14 | /// 属性值变化时发生
15 | ///
16 | ///
17 | protected virtual void OnPropertyChanged(string propertyName)
18 | {
19 | if (this.PropertyChanged != null)
20 | this.PropertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
21 | }
22 |
23 | ///
24 | /// 属性值变化时发生
25 | ///
26 | ///
27 | protected virtual void OnPropertyChanged(Expression> propertyExpression)
28 | {
29 | var propertyName = (propertyExpression.Body as MemberExpression).Member.Name;
30 | this.OnPropertyChanged(propertyName);
31 | }
32 |
33 | public virtual event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
34 | }
35 | }
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls/{Core}/Common/ConsoleAsynNotify.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace System
4 | {
5 | ///
6 | /// console数据message消息的异步通知实现。
7 | /// 若需要输出更多(如进度、时间等)再扩展即可
8 | ///
9 | public class ConsoleAsynNotify : DefaultAsynNotify
10 | {
11 | #region ConsoleAsynNotify-构造函数(初始化)
12 |
13 | ///
14 | /// ConsoleAsynNotify-构造函数(初始化)
15 | ///
16 | public ConsoleAsynNotify()
17 | {
18 | this.TimerEnable = false;
19 | }
20 |
21 | #endregion
22 |
23 | public override void Advance(double work, string message = "")
24 | {
25 | Console.WriteLine(message);
26 | }
27 | }
28 | }
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls/{Core}/Common/Exceptions.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace System
4 | {
5 | ///
6 | /// 取消操作异常消息.
7 | /// 可用于对ThreadAbortException异常的友好包装
8 | ///
9 | public class CanceledException : ApplicationException
10 | {
11 | public CanceledException(string message = "用户取消了当前操作!", Exception ex = null)
12 | : base(message, ex)
13 | {
14 |
15 | }
16 |
17 | public CanceledException(Exception ex)
18 | : base("用户取消了当前操作!", ex)
19 | {
20 |
21 | }
22 | }
23 | }
--------------------------------------------------------------------------------
/Util.Controls.V1.0/Util.Controls/{Core}/Common/FileAsynNotify.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace System
4 | {
5 | ///
6 | /// 文件数据操作异步消息,增加了数据处理速度消息处理
7 | ///
8 | public class FileAsynNotify : DefaultAsynNotify
9 | {
10 | ///
11 | /// 消息格式
12 | ///
13 | public string MessageFormat = "总大小{0},已完成{1},平均速度{2}/s";
14 |
15 | private string _TotalDesc;
16 |
17 | private double _Total;
18 | ///
19 | /// 总任务刻度
20 | ///
21 | public override double Total
22 | {
23 | get { return this._Total; }
24 | protected set
25 | {
26 | this._Total = value;
27 | this._TotalDesc = System.Utility.Helper.File.GetFileSize((long)value);
28 | base.OnPropertyChanged("Total");
29 | }
30 | }
31 |
32 | protected override void SetMessage(string mes)
33 | {
34 | var time = this.UsedSecond;
35 | var comsize = System.Utility.Helper.File.GetFileSize((long)this.Completed,"F4");
36 | string speed = "0KB";
37 | if (time > 0)
38 | {
39 | speed = System.Utility.Helper.File.GetFileSize((long)(this.Completed / time));
40 | }
41 | this.Message = string.Format(this.MessageFormat, this._TotalDesc, comsize, speed);
42 | }
43 | }
44 | }
--------------------------------------------------------------------------------
/Util.Controls.V1.0/lib/Microsoft.Expression.Controls.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/lib/Microsoft.Expression.Controls.dll
--------------------------------------------------------------------------------
/Util.Controls.V1.0/lib/Microsoft.Expression.Drawing.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/lib/Microsoft.Expression.Drawing.dll
--------------------------------------------------------------------------------
/Util.Controls.V1.0/lib/Microsoft.Expression.Effects.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/lib/Microsoft.Expression.Effects.dll
--------------------------------------------------------------------------------
/Util.Controls.V1.0/lib/Microsoft.Expression.Interactions.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/lib/Microsoft.Expression.Interactions.dll
--------------------------------------------------------------------------------
/Util.Controls.V1.0/lib/Microsoft.Expression.Prototyping.Interactivity.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/lib/Microsoft.Expression.Prototyping.Interactivity.dll
--------------------------------------------------------------------------------
/Util.Controls.V1.0/lib/Microsoft.Windows.Shell.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/lib/Microsoft.Windows.Shell.dll
--------------------------------------------------------------------------------
/Util.Controls.V1.0/lib/System.Utility.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/lib/System.Utility.dll
--------------------------------------------------------------------------------
/Util.Controls.V1.0/lib/System.Windows.Interactivity.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V1.0/lib/System.Windows.Interactivity.dll
--------------------------------------------------------------------------------
/Util.Controls.V2.0/.vs/Util.Controls/v15/.suo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V2.0/.vs/Util.Controls/v15/.suo
--------------------------------------------------------------------------------
/Util.Controls.V2.0/.vs/Util.Controls/v15/sqlite3/storage.ide:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V2.0/.vs/Util.Controls/v15/sqlite3/storage.ide
--------------------------------------------------------------------------------
/Util.Controls.V2.0/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V2.0/README.md
--------------------------------------------------------------------------------
/Util.Controls.V2.0/TestDemo/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Util.Controls.V2.0/TestDemo/App.xaml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/Util.Controls.V2.0/TestDemo/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Configuration;
4 | using System.Data;
5 | using System.Linq;
6 | using System.Threading.Tasks;
7 | using System.Windows;
8 |
9 | namespace TestDemo
10 | {
11 | ///
12 | /// App.xaml 的交互逻辑
13 | ///
14 | public partial class App : Application
15 | {
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Util.Controls.V2.0/TestDemo/MainWindow.xaml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/Util.Controls.V2.0/TestDemo/MainWindow.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Windows;
7 | using System.Windows.Controls;
8 | using System.Windows.Data;
9 | using System.Windows.Documents;
10 | using System.Windows.Input;
11 | using System.Windows.Media;
12 | using System.Windows.Media.Imaging;
13 | using System.Windows.Navigation;
14 | using System.Windows.Shapes;
15 |
16 | namespace TestDemo
17 | {
18 | ///
19 | /// MainWindow.xaml 的交互逻辑
20 | ///
21 | public partial class MainWindow : Window
22 | {
23 | public MainWindow()
24 | {
25 | InitializeComponent();
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/Util.Controls.V2.0/TestDemo/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace TestDemo.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/Util.Controls.V2.0/TestDemo/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Util.Controls.V2.0/Util.Controls/Behavior/DoubleClickCommandBehavior.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V2.0/Util.Controls/Behavior/DoubleClickCommandBehavior.cs
--------------------------------------------------------------------------------
/Util.Controls.V2.0/Util.Controls/Control/BusyBox.xaml.cs:
--------------------------------------------------------------------------------
1 | using System.Windows;
2 | using System.Windows.Controls;
3 |
4 | namespace Util.Controls
5 | {
6 | ///
7 | /// BusyBox.xaml 的交互逻辑
8 | ///
9 | public partial class BusyBox : UserControl
10 | {
11 | public static readonly DependencyProperty IsActiveProperty = DependencyProperty.Register("IsActive", typeof(bool), typeof(BusyBox), new PropertyMetadata(false));
12 | ///
13 | /// 是否启用
14 | ///
15 | public bool IsActive
16 | {
17 | get { return (bool)GetValue(IsActiveProperty); }
18 | set { SetValue(IsActiveProperty, value); }
19 | }
20 |
21 | static BusyBox()
22 | {
23 | DefaultStyleKeyProperty.OverrideMetadata(typeof(BusyBox), new FrameworkPropertyMetadata(typeof(BusyBox)));
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Util.Controls.V2.0/Util.Controls/Control/CustomVirtualizingStackPanel.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Windows.Controls;
7 |
8 | namespace Util.Controls
9 | {
10 | public class CustomVirtualizingStackPanel: VirtualizingStackPanel
11 | {
12 | public void BringIntoView(int index)
13 | {
14 | this.BringIndexIntoView(index);
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Util.Controls.V2.0/Util.Controls/Control/FImage.xaml:
--------------------------------------------------------------------------------
1 |
8 |
9 |
14 |
15 |
16 |
18 |
19 |
--------------------------------------------------------------------------------
/Util.Controls.V2.0/Util.Controls/Control/HighTextBlock.xaml:
--------------------------------------------------------------------------------
1 |
4 |
11 |
--------------------------------------------------------------------------------
/Util.Controls.V2.0/Util.Controls/Control/ProgressForValue.xaml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
9 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Util.Controls.V2.0/Util.Controls/Control/VerticalTextBlock.xaml:
--------------------------------------------------------------------------------
1 |
4 |
8 |
--------------------------------------------------------------------------------
/Util.Controls.V2.0/Util.Controls/Control/VerticalTextBlock.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 | using System.Windows;
4 | using System.Windows.Controls;
5 | using System.Windows.Data;
6 | using System.Windows.Documents;
7 | using System.Windows.Media;
8 | using System.Windows.Threading;
9 |
10 | namespace Util.Controls
11 | {
12 | ///
13 | /// 文本垂直TextBlock
14 | ///
15 | public partial class VerticalTextBlock : TextBlock
16 | {
17 | static VerticalTextBlock()
18 | {
19 | DefaultStyleKeyProperty.OverrideMetadata(typeof(VerticalTextBlock),new FrameworkPropertyMetadata(typeof(VerticalTextBlock)));
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/Util.Controls.V2.0/Util.Controls/Converter/BitmapImageSourceConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Globalization;
3 | using System.Windows.Data;
4 |
5 | namespace Util.Controls
6 | {
7 | ///
8 | /// 位图图像源值转换器。
9 | ///
10 | /// 支持从文件流、图片文件转换;支持设置图片解码宽度,以减少内存消耗。
11 | ///
12 | ///
13 | public class BitmapImageSourceConverter : IValueConverter
14 | {
15 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
16 | {
17 | if (value == null)
18 | {
19 | return null;
20 | }
21 |
22 | var width = parameter.ToSafeDouble();
23 | switch (value)
24 | {
25 | case byte[] buffer:
26 | return ImageHelper.CreateImageSourceFromByte(buffer, (int)width);
27 | case string fileName:
28 | return ImageHelper.CreateImageSourceFromFile(fileName, (int)width);
29 | default:
30 | return null;
31 | }
32 | }
33 |
34 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
35 | {
36 | throw new NotImplementedException();
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/Util.Controls.V2.0/Util.Controls/Converter/BoolToTextConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Globalization;
3 | using System.Windows.Data;
4 |
5 | namespace Util.Controls
6 | {
7 | ///
8 | /// bool转换为文本描述,根据parameter转发,parameter格式如:是;否,开启;未开启
9 | ///
10 | public sealed class BoolToTextConverter : IValueConverter
11 | {
12 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
13 | {
14 | var arr = parameter.ToSafeString().Split(';');
15 | if (arr.Length < 2) return Binding.DoNothing;
16 | var b = value.ToSafeString().ToBoolean();
17 | return b ? arr[0] : arr[1];
18 | }
19 |
20 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
21 | {
22 | throw new NotImplementedException();
23 | }
24 | }
25 | }
--------------------------------------------------------------------------------
/Util.Controls.V2.0/Util.Controls/Converter/BoolToVisibilityConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Globalization;
3 | using System.Windows;
4 | using System.Windows.Data;
5 |
6 | namespace Util.Controls
7 | {
8 | public class BoolToVisibilityHiddenConverter : IValueConverter
9 | {
10 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
11 | {
12 | if (value == null)
13 | {
14 | return Visibility.Hidden;
15 | }
16 | if ((bool) value)
17 | {
18 | return Visibility.Visible;
19 | }
20 | return Visibility.Hidden;
21 | }
22 |
23 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
24 | {
25 | if (value == null)
26 | {
27 | return false;
28 | }
29 | if ((Visibility) value == Visibility.Visible)
30 | {
31 | return true;
32 | }
33 | return false;
34 | }
35 | }
36 | }
--------------------------------------------------------------------------------
/Util.Controls.V2.0/Util.Controls/Converter/BrushToColorConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Globalization;
3 | using System.Windows.Data;
4 | using System.Windows.Media;
5 |
6 | namespace Util.Controls
7 | {
8 | public sealed class BrushToColorConverter : IValueConverter
9 | {
10 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
11 | {
12 | var c = (SolidColorBrush) value;
13 | return c?.Color;
14 | }
15 |
16 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
17 | {
18 | if (value == null) return null;
19 | var c = (Color) value;
20 | return new SolidColorBrush(c);
21 | }
22 | }
23 | }
--------------------------------------------------------------------------------
/Util.Controls.V2.0/Util.Controls/Converter/BytesToImageSourceConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Globalization;
3 | using System.Windows.Data;
4 |
5 | namespace Util.Controls
6 | {
7 | ///
8 | /// 数据流转化为ImageSource的转换器
9 | ///
10 | public class BytesToImageSourceConverter : IValueConverter
11 | {
12 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
13 | {
14 | var buf = value as byte[];
15 | if (buf == null) return null;
16 |
17 | var width = parameter.ToSafeDouble();
18 | return ImageHelper.CreateImageSourceFromByte(buf, (int)width);
19 | }
20 |
21 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
22 | {
23 | throw new NotImplementedException();
24 | }
25 | }
26 | }
--------------------------------------------------------------------------------
/Util.Controls.V2.0/Util.Controls/Converter/CharacterWrapConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Globalization;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 | using System.Windows.Data;
8 |
9 | namespace Util.Controls
10 | {
11 | public class CharacterWrapConverter : IValueConverter
12 | {
13 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
14 | {
15 | var str = (string)value;
16 | str = string.Join("\u200B", str.ToCharArray());//处理中英文混合断行问题
17 | str = str.Replace("\u200B\r\n\u200B", "");
18 | str = str.Replace("\u200B\r\u200B", "");
19 | return str;
20 | }
21 |
22 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
23 | {
24 | var str = (string)value;
25 | return str.Replace("\u200B", "");
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/Util.Controls.V2.0/Util.Controls/Converter/ColorToBrushConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Globalization;
3 | using System.Windows.Data;
4 |
5 | namespace Util.Controls
6 | {
7 | ///
8 | /// System.Windows.Media.Color 转到SolidColorBrush
9 | ///
10 | public sealed class ColorToBrushConverter : IValueConverter
11 | {
12 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
13 | {
14 | if (value == null) return null;
15 | var c = (System.Windows.Media.Color)value;
16 | return new System.Windows.Media.SolidColorBrush(c);
17 | }
18 |
19 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
20 | {
21 | if (value == null) return null;
22 | var c = (System.Windows.Media.SolidColorBrush)value;
23 | return c.Color;
24 | }
25 | }
26 | }
--------------------------------------------------------------------------------
/Util.Controls.V2.0/Util.Controls/Converter/ColorToStringConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Globalization;
3 | using System.Windows.Data;
4 | using System.Windows.Media;
5 |
6 | namespace Util.Controls
7 | {
8 | ///
9 | /// System.Windows.Media.Color 转到String
10 | ///
11 | public sealed class ColorToStringConverter : IValueConverter
12 | {
13 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
14 | {
15 | if (value == null) return null;
16 | var c = (System.Windows.Media.Color) value;
17 | return c.ToSafeString();
18 | }
19 |
20 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
21 | {
22 | if (value == null) return null;
23 | var str = value.ToSafeString();
24 | if (!str.Contains("#"))
25 | {
26 | str = str.Insert(0, "#");
27 | }
28 | else
29 | {
30 | var index = str.LastIndexOf("#", StringComparison.Ordinal);
31 | if (index != 0)
32 | {
33 | var newStr = str.Replace("#", "");
34 | newStr = newStr.Trim();
35 | str = newStr.Insert(0, "#");
36 | }
37 | }
38 | try
39 | {
40 | var c = ColorConverter.ConvertFromString(str);
41 | return c;
42 | }
43 | catch (Exception)
44 | {
45 | return null;
46 | }
47 | }
48 | }
49 | }
--------------------------------------------------------------------------------
/Util.Controls.V2.0/Util.Controls/Converter/CountOrNullToCollapsedConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Globalization;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 | using System.Windows;
8 | using System.Windows.Data;
9 |
10 | namespace Util.Controls
11 | {
12 | public class CountOrNullToCollapsedConverter: IValueConverter
13 | {
14 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
15 | {
16 | var result =
17 | (Visibility) XConverter.CountOrNullToVisibilityConverter.Convert(value, targetType, parameter, culture);
18 | return result == Visibility.Visible ? Visibility.Collapsed : Visibility.Visible;
19 | }
20 |
21 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
22 | {
23 | throw new NotImplementedException();
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/Util.Controls.V2.0/Util.Controls/Converter/CountOrNullToEnableConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections;
3 | using System.Collections.Generic;
4 | using System.Globalization;
5 | using System.Linq;
6 | using System.Text;
7 | using System.Threading.Tasks;
8 | using System.Windows.Data;
9 |
10 | namespace Util.Controls
11 | {
12 | public class CountOrNullToEnableConverter:IValueConverter
13 | {
14 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
15 | {
16 | var result = value as IList;
17 | return result != null && result.Count != 0;
18 | }
19 |
20 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
21 | {
22 | throw new NotImplementedException();
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Util.Controls.V2.0/Util.Controls/Converter/CountOrNullToVisibilityConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections;
3 | using System.Collections.Generic;
4 | using System.Globalization;
5 | using System.Linq;
6 | using System.Text;
7 | using System.Threading.Tasks;
8 | using System.Windows;
9 | using System.Windows.Data;
10 |
11 | namespace Util.Controls
12 | {
13 | public class CountOrNullToVisibilityConverter:IValueConverter
14 | {
15 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
16 | {
17 | if (value == null) return Visibility.Collapsed;
18 | if (!(value is IEnumerable)) return Visibility.Collapsed;
19 | var source = value as IEnumerable;
20 | if (source.IsInvalid()) return Visibility.Collapsed;
21 | return Visibility.Visible;
22 | }
23 |
24 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
25 | {
26 | throw new NotImplementedException();
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/Util.Controls.V2.0/Util.Controls/Converter/DoubleToThicknessConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Globalization;
3 | using System.Windows;
4 | using System.Windows.Data;
5 |
6 | namespace Util.Controls
7 | {
8 | ///
9 | /// 获取Thickness固定值double
10 | ///
11 | public class DoubleToThicknessConverter : IValueConverter
12 | {
13 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
14 | {
15 | String thickness = value.ToString();
16 |
17 | Thickness borderThickness = new Thickness(System.Convert.ToDouble(thickness, System.Globalization.CultureInfo.InvariantCulture),
18 | System.Convert.ToDouble(thickness, System.Globalization.CultureInfo.InvariantCulture),
19 | System.Convert.ToDouble(thickness, System.Globalization.CultureInfo.InvariantCulture),
20 | System.Convert.ToDouble(thickness, System.Globalization.CultureInfo.InvariantCulture));
21 |
22 | return borderThickness;
23 | }
24 |
25 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
26 | {
27 | return DependencyProperty.UnsetValue;
28 | }
29 | }
30 | }
--------------------------------------------------------------------------------
/Util.Controls.V2.0/Util.Controls/Converter/EnabledToVisibilityConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Globalization;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 | using System.Windows;
8 | using System.Windows.Data;
9 |
10 | namespace Util.Controls
11 | {
12 | public class EnabledToVisibilityConverter:IValueConverter
13 | {
14 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
15 | {
16 | bool flag = false;
17 | if (value is bool)
18 | flag = (bool)value;
19 | else if (value is bool?)
20 | {
21 | bool? nullable = (bool?)value;
22 | flag = nullable.HasValue && nullable.Value;
23 | }
24 | return (object)(Visibility)(flag ? 2 : 0);
25 | }
26 |
27 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
28 | {
29 | throw new NotImplementedException();
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/Util.Controls.V2.0/Util.Controls/Converter/EnumDescriptionConverter.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V2.0/Util.Controls/Converter/EnumDescriptionConverter.cs
--------------------------------------------------------------------------------
/Util.Controls.V2.0/Util.Controls/Converter/EnumTypeToItemSourceConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections;
3 | using System.Collections.Generic;
4 | using System.Globalization;
5 | using System.Linq;
6 | using System.Text;
7 | using System.Windows.Data;
8 |
9 | namespace Util.Controls
10 | {
11 | ///
12 | /// 转换枚举值为数据源集合;
13 | /// 使用参数传入枚举类型,例如:ItemsSource="{Binding Converter={x:Static utc:XConverter.EnumToItemsSourceConverter}, ConverterParameter={x:Type utc:EnumThumbnail}}"
14 | /// 同时必须注意设置SelectedValuePath="Value",然后直接使用SelectedValue设置、获取枚举对象即可
15 | ///
16 | public class EnumTypeToItemSourceConverter : IValueConverter
17 | {
18 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
19 | {
20 | var type = parameter as Type;
21 | var vs = Enum.GetValues(type);
22 | EnumItem[] items = new EnumItem[vs.Length];
23 | for (int i = 0; i < vs.Length; i++)
24 |
25 | {
26 | items[i].Value = vs.GetValue(i);
27 | items[i].Display = (items[i].Value as Enum).GetDescription();
28 | }
29 | return items;
30 | }
31 |
32 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
33 | {
34 | throw new NotImplementedException();
35 | }
36 | }
37 |
38 | public struct EnumItem
39 | {
40 | public string Display { get; set; }
41 | public object Value { get; set; }
42 | public override string ToString()
43 | {
44 | return this.Display;
45 | }
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/Util.Controls.V2.0/Util.Controls/Converter/EnumsToItemSourceConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections;
3 | using System.Collections.Generic;
4 | using System.Globalization;
5 | using System.Linq;
6 | using System.Text;
7 | using System.Threading.Tasks;
8 | using System.Windows.Data;
9 |
10 | namespace Util.Controls
11 | {
12 | ///
13 | /// 根据一个枚举数组返回一个可绑定的EnumItem(包括枚举对象、枚举描述)集合列表
14 | ///
15 | public class EnumsToItemSourceConverter: IValueConverter
16 | {
17 | public object Convert(object value, Type targetType = null, object parameter = null, CultureInfo culture = null)
18 | {
19 | if (value == null)
20 | {
21 | EnumTypeToItemSourceConverter converter = new EnumTypeToItemSourceConverter();
22 | return converter.Convert(value, targetType, parameter, culture);
23 | }
24 | var vs = (IList) value;
25 | var items = new EnumItem[vs.Count];
26 | for (int i = 0; i < vs.Count; i++)
27 | {
28 | items[i].Value = vs[i];
29 | items[i].Display = (items[i].Value as Enum).GetDescription();
30 | }
31 | return items;
32 | }
33 |
34 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
35 | {
36 | throw new NotImplementedException();
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/Util.Controls.V2.0/Util.Controls/Converter/NullAndVisibilityToCollapsedConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Globalization;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 | using System.Windows;
8 | using System.Windows.Data;
9 |
10 | namespace Util.Controls
11 | {
12 | public class NullAndVisibilityToCollapsedConverter : IValueConverter
13 | {
14 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
15 | {
16 | if (value == null) return Visibility.Collapsed;
17 | try
18 | {
19 | return (Visibility) value == Visibility.Visible ? Visibility.Collapsed : Visibility.Visible;
20 | }
21 | catch
22 | {
23 | return Visibility.Collapsed;
24 | }
25 | }
26 |
27 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
28 | {
29 | throw new NotImplementedException();
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/Util.Controls.V2.0/Util.Controls/Converter/NullToEnableConverter.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V2.0/Util.Controls/Converter/NullToEnableConverter.cs
--------------------------------------------------------------------------------
/Util.Controls.V2.0/Util.Controls/Converter/NullToVisibilityConverter.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V2.0/Util.Controls/Converter/NullToVisibilityConverter.cs
--------------------------------------------------------------------------------
/Util.Controls.V2.0/Util.Controls/Converter/ObjectTypeConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Globalization;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 | using System.Windows.Data;
8 |
9 | namespace Util.Controls
10 | {
11 |
12 | ///
13 | /// 获取对象的的类型
14 | ///
15 | public sealed class ObjectTypeConverter : IValueConverter
16 | {
17 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
18 | {
19 | if (value == null) return null;
20 | return value.GetType();
21 | }
22 |
23 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
24 | {
25 | throw new NotImplementedException();
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/Util.Controls.V2.0/Util.Controls/Converter/PercentToAngleConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Globalization;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Windows.Data;
7 |
8 | namespace Util.Controls
9 | {
10 | ///
11 | /// 百分比转换为角度值
12 | ///
13 | public class PercentToAngleConverter : IValueConverter
14 | {
15 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
16 | {
17 | var percent = value.ToSafeString().ToDouble();
18 | if (percent >= 1) return 360.0D;
19 | return percent * 360;
20 | }
21 |
22 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
23 | {
24 | throw new NotImplementedException();
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/Util.Controls.V2.0/Util.Controls/Converter/PointConverter.cs:
--------------------------------------------------------------------------------
1 | using System.Windows;
2 | using System.Windows.Data;
3 |
4 | namespace Util.Controls
5 | {
6 | public class PointConverter : IMultiValueConverter
7 | {
8 | public object Convert(object[] values, System.Type targetType, object parameter, System.Globalization.CultureInfo culture)
9 | {
10 | if (values == null || values.Length != 2)
11 | return default(Point);
12 | var x = (double)values[0];
13 | var y = (double)values[1];
14 | return new Point(x, y);
15 | }
16 |
17 | public object[] ConvertBack(object value, System.Type[] targetTypes, object parameter, System.Globalization.CultureInfo culture)
18 | {
19 | if (value == null || !(value is Point))
20 | return new object[] { 0d, 0d };
21 | var position = (Point)value;
22 | return new object[] { position.X, position.Y };
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Util.Controls.V2.0/Util.Controls/Converter/SizeConverter.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.Linq;
3 | using System.Text;
4 | using System.Threading.Tasks;
5 | using System.Windows;
6 | using System.Windows.Data;
7 |
8 | namespace Util.Controls
9 | {
10 | public class SizeConverter : IMultiValueConverter
11 | {
12 | public object Convert(object[] values, System.Type targetType, object parameter, System.Globalization.CultureInfo culture)
13 | {
14 | if (values == null || values.Length != 2)
15 | return default(Size);
16 | var w = (double)values[0];
17 | var h = (double)values[1];
18 | return new Size(w, h);
19 | }
20 |
21 | public object[] ConvertBack(object value, System.Type[] targetTypes, object parameter, System.Globalization.CultureInfo culture)
22 | {
23 | if (value == null || !(value is Size))
24 | return new object[] { 0d, 0d };
25 | var size = (Size)value;
26 | return new object[] { size.Width, size.Height };
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/Util.Controls.V2.0/Util.Controls/Converter/StringFormatConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Globalization;
3 | using System.Windows.Data;
4 |
5 | namespace Util.Controls
6 | {
7 | ///
8 | /// 字符串格式化转换器。字符格式 由 parameter传递
9 | /// 例如:{0:F2}
10 | ///
11 | public sealed class StringFormatConverter : IValueConverter
12 | {
13 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
14 | {
15 | if (value == null) return string.Empty;
16 | var str = string.Format(parameter.ToSafeString(), value);
17 | return str;
18 | }
19 |
20 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
21 | {
22 | throw new NotImplementedException();
23 | }
24 | }
25 | }
--------------------------------------------------------------------------------
/Util.Controls.V2.0/Util.Controls/Converter/StringLengthToBoolConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Globalization;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 | using System.Windows.Data;
8 |
9 | namespace Util.Controls
10 | {
11 | public class StringLengthToBoolConverter: IValueConverter
12 | {
13 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
14 | {
15 | return value != null && value.ToSafeString().Length != 0;
16 | }
17 |
18 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
19 | {
20 | throw new NotImplementedException();
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Util.Controls.V2.0/Util.Controls/Converter/StringLengthToVisibilityConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Globalization;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 | using System.Windows;
8 | using System.Windows.Data;
9 |
10 | namespace Util.Controls
11 | {
12 | public class StringLengthToVisibilityConverter: IValueConverter
13 | {
14 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
15 | {
16 | return value.ToSafeString().Length == 0 || string.IsNullOrWhiteSpace(value.ToSafeString()) ? Visibility.Collapsed : Visibility.Visible;
17 | }
18 |
19 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
20 | {
21 | throw new NotImplementedException();
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/Util.Controls.V2.0/Util.Controls/Converter/ThicknessToDoubleConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Globalization;
3 | using System.Windows;
4 | using System.Windows.Data;
5 |
6 | namespace Util.Controls
7 | {
8 | ///
9 | /// 获取Thickness固定值double
10 | ///
11 | public class ThicknessToDoubleConverter : IValueConverter
12 | {
13 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
14 | {
15 | var thickness = (Thickness)value;
16 | return thickness.Left;
17 | }
18 |
19 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
20 | {
21 | return DependencyProperty.UnsetValue;
22 | }
23 | }
24 | }
--------------------------------------------------------------------------------
/Util.Controls.V2.0/Util.Controls/Converter/TreeViewMarginConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Globalization;
3 | using System.Windows;
4 | using System.Windows.Controls;
5 | using System.Windows.Data;
6 | using System.Windows.Media;
7 |
8 | namespace Util.Controls
9 | {
10 | ///
11 | /// 计算树节点的左缩进位置
12 | ///
13 | public class TreeViewMarginConverter : IValueConverter
14 | {
15 | public double Length = 16;
16 |
17 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
18 | {
19 | var item = value as TreeViewItem;
20 | if (item == null)
21 | return new Thickness(0);
22 | int dep = this.GetDepth(item);
23 | return new Thickness(Length * dep, 0, 0, 0);
24 | }
25 |
26 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
27 | {
28 | return DependencyProperty.UnsetValue;
29 | }
30 |
31 | public int GetDepth(TreeViewItem item)
32 | {
33 | TreeViewItem parent;
34 | while ((parent = GetParent(item)) != null)
35 | {
36 | return GetDepth(parent) + 1;
37 | }
38 | return 0;
39 | }
40 |
41 | private TreeViewItem GetParent(TreeViewItem item)
42 | {
43 | var parent = item != null ? VisualTreeHelper.GetParent(item) : null;
44 | while (parent != null && !(parent is TreeViewItem || parent is TreeView))
45 | {
46 | parent = VisualTreeHelper.GetParent(parent);
47 | }
48 | return parent as TreeViewItem;
49 | }
50 | }
51 | }
--------------------------------------------------------------------------------
/Util.Controls.V2.0/Util.Controls/Converter/TrueToFalseConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Globalization;
3 | using System.Windows.Data;
4 |
5 | namespace Util.Controls
6 | {
7 | ///
8 | /// 这是一个颠倒黑白的世界
9 | ///
10 | public sealed class TrueToFalseConverter : IValueConverter
11 | {
12 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
13 | {
14 | var v = (bool)value;
15 | return !v;
16 | }
17 |
18 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
19 | {
20 | throw new NotImplementedException();
21 | }
22 | }
23 | }
--------------------------------------------------------------------------------
/Util.Controls.V2.0/Util.Controls/Converter/VisibilityToCollapsedConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Globalization;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 | using System.Windows;
8 | using System.Windows.Data;
9 |
10 | namespace Util.Controls
11 | {
12 | public class VisibilityToCollapsedConverter : IValueConverter
13 | {
14 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
15 | {
16 | try
17 | {
18 | return (Visibility) value == Visibility.Visible ? Visibility.Collapsed : Visibility.Visible;
19 | }
20 | catch
21 | {
22 | return Visibility.Visible;
23 | }
24 | }
25 |
26 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
27 | {
28 | throw new NotImplementedException();
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/Util.Controls.V2.0/Util.Controls/Converter/VisibilityToStarGridLengthConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Globalization;
3 | using System.Windows;
4 | using System.Windows.Data;
5 |
6 | namespace Util.Controls
7 | {
8 | ///
9 | /// 根据某一 的 切换显示Grid的行或列。
10 | ///
11 | /// 行或列按照 显示,支持从转换参数中指定 值。
12 | ///
13 | ///
14 | public class VisibilityToStarGridLengthConverter : IValueConverter
15 | {
16 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
17 | {
18 | if ((Visibility)value == Visibility.Collapsed)
19 | {
20 | return new GridLength(0, GridUnitType.Pixel);
21 | }
22 | else
23 | {
24 | if (parameter == null)
25 | {
26 | return new GridLength(1d, GridUnitType.Star);
27 | }
28 |
29 | if (!double.TryParse(parameter.ToString(), out double star))
30 | {
31 | throw new ArgumentNullException(nameof(parameter), $"请指定有效的{GridUnitType.Star}值!");
32 | }
33 |
34 | return new GridLength(star, GridUnitType.Star);
35 | }
36 | }
37 |
38 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
39 | {
40 | throw new NotImplementedException();
41 | }
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/Util.Controls.V2.0/Util.Controls/CustomControl1.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Windows;
7 | using System.Windows.Controls;
8 | using System.Windows.Data;
9 | using System.Windows.Documents;
10 | using System.Windows.Input;
11 | using System.Windows.Media;
12 | using System.Windows.Media.Imaging;
13 | using System.Windows.Navigation;
14 | using System.Windows.Shapes;
15 |
16 | namespace Util.Controls
17 | {
18 | ///
19 | /// 按照步骤 1a 或 1b 操作,然后执行步骤 2 以在 XAML 文件中使用此自定义控件。
20 | ///
21 | /// 步骤 1a) 在当前项目中存在的 XAML 文件中使用该自定义控件。
22 | /// 将此 XmlNamespace 特性添加到要使用该特性的标记文件的根
23 | /// 元素中:
24 | ///
25 | /// xmlns:MyNamespace="clr-namespace:Util.Controls"
26 | ///
27 | ///
28 | /// 步骤 1b) 在其他项目中存在的 XAML 文件中使用该自定义控件。
29 | /// 将此 XmlNamespace 特性添加到要使用该特性的标记文件的根
30 | /// 元素中:
31 | ///
32 | /// xmlns:MyNamespace="clr-namespace:Util.Controls;assembly=Util.Controls"
33 | ///
34 | /// 您还需要添加一个从 XAML 文件所在的项目到此项目的项目引用,
35 | /// 并重新生成以避免编译错误:
36 | ///
37 | /// 在解决方案资源管理器中右击目标项目,然后依次单击
38 | /// “添加引用”->“项目”->[选择此项目]
39 | ///
40 | ///
41 | /// 步骤 2)
42 | /// 继续操作并在 XAML 文件中使用控件。
43 | ///
44 | ///
45 | ///
46 | ///
47 | public class CustomControl1 : Control
48 | {
49 | static CustomControl1()
50 | {
51 | DefaultStyleKeyProperty.OverrideMetadata(typeof(CustomControl1), new FrameworkPropertyMetadata(typeof(CustomControl1)));
52 | }
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/Util.Controls.V2.0/Util.Controls/Extension/EnumBindingExtension.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections;
3 | using System.Windows.Markup;
4 |
5 | namespace Util.Controls
6 | {
7 | ///
8 | /// 枚举数据源绑定扩展。
9 | /// 使用示例:
10 | ///
11 | [MarkupExtensionReturnType(typeof(IEnumerable))]
12 | public sealed class EnumBindingExtension : MarkupExtension
13 | {
14 | [ConstructorArgument("enumType")]
15 | public Type Type { get; set; }
16 |
17 | public EnumBindingExtension()
18 | { }
19 |
20 | public EnumBindingExtension(Type enumType)
21 | {
22 | this.Type = enumType;
23 | }
24 |
25 | public override object ProvideValue(IServiceProvider serviceProvider)
26 | {
27 | if (this.Type == null || !this.Type.IsEnum)
28 | throw new ArgumentNullException("enumType", "The argument[enumType] is invalid");
29 | return Util.Cache.CacheManager.GetCache("EnumItems_Cache_" + Type.FullName, Util.Cache.CacheTime.Time_30min, () =>
30 | {
31 | var vs = Enum.GetValues(Type);
32 |
33 | EnumItem[] items = new EnumItem[vs.Length];
34 | for (int i = 0; i < vs.Length; i++)
35 | {
36 | items[i].Value = vs.GetValue(i);
37 | items[i].Display = (items[i].Value as Enum).GetDescription();
38 | }
39 | return items;
40 | });
41 | }
42 | }
43 | }
--------------------------------------------------------------------------------
/Util.Controls.V2.0/Util.Controls/Global.xaml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
10 |
11 |
12 |
29 |
30 |
--------------------------------------------------------------------------------
/Util.Controls.V2.0/Util.Controls/Helper/ControlHelper.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V2.0/Util.Controls/Helper/ControlHelper.cs
--------------------------------------------------------------------------------
/Util.Controls.V2.0/Util.Controls/Helper/ResourceHelper.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V2.0/Util.Controls/Helper/ResourceHelper.cs
--------------------------------------------------------------------------------
/Util.Controls.V2.0/Util.Controls/Helper/Win32Helper.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V2.0/Util.Controls/Helper/Win32Helper.cs
--------------------------------------------------------------------------------
/Util.Controls.V2.0/Util.Controls/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace Util.Controls.Properties
12 | {
13 |
14 |
15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
18 | {
19 |
20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
21 |
22 | public static Settings Default
23 | {
24 | get
25 | {
26 | return defaultInstance;
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/Util.Controls.V2.0/Util.Controls/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Util.Controls.V2.0/Util.Controls/Style/FIcon.xaml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
12 |
--------------------------------------------------------------------------------
/Util.Controls.V2.0/Util.Controls/Themes/Generic.xaml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Util.Controls.V2.0/Util.Controls/Themes/iconfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V2.0/Util.Controls/Themes/iconfont.ttf
--------------------------------------------------------------------------------
/Util.Controls.V2.0/Util.Controls/{Core}/Cache/CacheTime.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace Util.Cache
7 | {
8 | ///
9 | /// 缓存时间
10 | ///
11 | public class CacheTime
12 | {
13 | ///
14 | /// 缓存1分钟
15 | ///
16 | public const int Time_60s = 60;
17 |
18 | ///
19 | /// 缓存100秒
20 | ///
21 | public const int Time_100s = 100;
22 |
23 | ///
24 | /// 缓存300秒/5min
25 | ///
26 | public const int Time_300s = 300;
27 |
28 | ///
29 | /// 缓存600秒/10min
30 | ///
31 | public const int Time_600s = 600;
32 |
33 | ///
34 | /// 缓存20分钟
35 | ///
36 | public const int Time_20min = 1200;
37 |
38 | ///
39 | /// 缓存30分钟
40 | ///
41 | public const int Time_30min = 1800;
42 |
43 | ///
44 | /// 缓存60分钟
45 | ///
46 | public const int Time_60min = 3600;
47 |
48 | ///
49 | /// 缓存2小时
50 | ///
51 | public const int Time_2hour = 7200;
52 |
53 | ///
54 | /// 缓存5小时
55 | ///
56 | public const int Time_5hour = 18000;
57 |
58 | ///
59 | /// 缓存10小时
60 | ///
61 | public const int Time_10hour = 36000;
62 |
63 | ///
64 | /// 缓存1天
65 | ///
66 | public const int Time_1days = 86400;
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/Util.Controls.V2.0/Util.Controls/{Core}/Cache/DefaultCache.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Runtime.Caching;
4 |
5 | namespace Util.Cache
6 | {
7 | public sealed class DefaultCache : ICache
8 | {
9 | private MemoryCache _Cache = MemoryCache.Default;
10 | private List _Keys = new List();
11 |
12 | public bool Contains(string key)
13 | {
14 | return _Cache.Contains(key);
15 | }
16 |
17 | [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.Synchronized)]
18 | public void Add(string key, object target, int time)
19 | {
20 | _Cache.Add(key, target, new DateTimeOffset(DateTime.Now.AddSeconds(time)));
21 | _Keys.Add(key);
22 | }
23 |
24 | public T Get(string key) where T : class
25 | {
26 | return (T)_Cache.Get(key);
27 | }
28 |
29 | public void Remove(string key)
30 | {
31 | _Cache.Remove(key);
32 | _Keys.Remove(key);
33 | }
34 |
35 | public void ClearAll()
36 | {
37 | foreach (var key in _Keys)
38 | {
39 | _Cache.Remove(key);
40 | }
41 | _Keys.Clear();
42 | }
43 | }
44 | }
--------------------------------------------------------------------------------
/Util.Controls.V2.0/Util.Controls/{Core}/Cache/ICache.cs:
--------------------------------------------------------------------------------
1 | #region 引用命名空间
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 | #endregion
7 |
8 | namespace Util.Cache
9 | {
10 | ///
11 | /// 缓存接口.
12 | ///
13 | public interface ICache
14 | {
15 | #region 检测缓存是否存在
16 | ///
17 | /// 检测缓存是否存在
18 | ///
19 | /// 缓存键
20 | bool Contains( string key );
21 | #endregion
22 |
23 | #region 添加缓存对象
24 | ///
25 | /// 添加缓存对象,time为缓存有效时间(单位:秒)
26 | ///
27 | /// 缓存键
28 | /// 缓存对象
29 | void Add( string key, object target ,int time );
30 | #endregion
31 |
32 | #region 获取缓存对象
33 | ///
34 | /// 获取缓存对象
35 | ///
36 | /// 对象类型
37 | /// 缓存键
38 | T Get( string key ) where T : class;
39 | #endregion
40 |
41 | #region 移除缓存对象
42 | ///
43 | /// 移除缓存对象
44 | ///
45 | /// 缓存键
46 | void Remove( string key );
47 | #endregion
48 |
49 | #region 清空所有缓存
50 | ///
51 | /// 清空所有缓存
52 | ///
53 | void ClearAll();
54 | #endregion
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/Util.Controls.V2.0/Util.Controls/{Core}/Constants.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace Util.Controls
7 | {
8 | ///
9 | /// 公共常量定义
10 | ///
11 | public static class Constants
12 | {
13 | public static readonly object[] EmptyObjectArray = new object[0];
14 | public static readonly string[] EmptyStringArrray = new string[0];
15 |
16 | public static readonly Type VoidType = typeof(void);
17 | public static readonly Type ObjectType = typeof(object);
18 | public static readonly Type StringType = typeof(string);
19 | public static readonly Type IntType = typeof(int);
20 | public static readonly Type DoubleType = typeof(double);
21 | public static readonly Type BoolType = typeof(bool);
22 | public static readonly Type DateTimeType = typeof(DateTime);
23 | public static readonly Type NullableDateTimeType = typeof(DateTime?);
24 | public static readonly Type NullGenericListType = typeof(List<>);
25 | public static readonly Type NullableType = typeof(Nullable<>);
26 | public static readonly Type EnumType = typeof(Enum);
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/Util.Controls.V2.0/Util.Controls/{Core}/Guard.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 |
6 | namespace Util.Controls
7 | {
8 | ///
9 | /// (n. 守卫)提供全局通用验证
10 | ///
11 | public static class Guard
12 | {
13 | #region ArgumentNotNull:验证参数是否为NULL
14 |
15 | ///
16 | /// 验证参数是否为NULL
17 | ///
18 | public static void ArgumentNotNull(object value, string argumentName)
19 | {
20 | if (value == null)
21 | {
22 | throw new ArgumentNullException(argumentName, $@"The argument[{argumentName}] cannot be null");
23 | }
24 | }
25 |
26 | #endregion
27 |
28 | #region ArgumentNotNullOrEmpty:验证参数是否为NULL或空字符串
29 |
30 | ///
31 | /// 验证参数是否为NULL或空字符串
32 | ///
33 | public static void ArgumentNotNullOrEmpty(string value, string argumentName)
34 | {
35 | if (value.IsInvalid())
36 | {
37 | throw new ArgumentNullException(argumentName, $@"The argument[{argumentName}] cannot be null or empty");
38 | }
39 | }
40 |
41 | #endregion
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/Util.Controls.V2.0/Util.Controls/{Core}/IgnoreCaseStringComparer.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace Util.Controls
5 | {
6 | ///
7 | /// 不区分大小写的字符串比较器
8 | ///
9 | public sealed class IgnoreCaseStringComparer : IEqualityComparer
10 | {
11 | public static IgnoreCaseStringComparer Instance
12 | {
13 | get { return Singleton.GetInstance(); }
14 | }
15 |
16 | public bool Equals(string x, string y)
17 | {
18 | return string.Compare(x, y, true) == 0;
19 | }
20 |
21 | public int GetHashCode(string obj)
22 | {
23 | return obj.GetHashCode();
24 | }
25 | }
26 | }
--------------------------------------------------------------------------------
/Util.Controls.V2.0/Util.Controls/{Core}/Singleton.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Util.Controls
4 | {
5 | ///
6 | /// 单例模式。
7 | ///
8 | public static class Singleton where T : class, new()
9 | {
10 | private static T _Instance;
11 | private static object _lockObj = new object();
12 |
13 | ///
14 | /// 获取单例对象的实例
15 | ///
16 | public static T GetInstance()
17 | {
18 | if (_Instance != null) return _Instance;
19 | lock (_lockObj)
20 | {
21 | if (_Instance == null)
22 | {
23 | var temp = Activator.CreateInstance();
24 | System.Threading.Interlocked.Exchange(ref _Instance, temp);
25 | }
26 | }
27 | return _Instance;
28 | }
29 | }
30 |
31 | }
--------------------------------------------------------------------------------
/Util.Controls.V2.0/Util.Controls/{Core}/TypeExtension.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Diagnostics;
4 | using System.Linq;
5 | using System.Windows;
6 |
7 | namespace Util.Controls
8 | {
9 | ///
10 | /// 系统类型的扩展方法
11 | ///
12 | public static partial class TypeExtension
13 | {
14 | ///
15 | /// 转换为boolean类型
16 | ///
17 | public static bool ToBoolean(this string value)
18 | {
19 | bool result;
20 | if (Boolean.TryParse(value, out result))
21 | {
22 | return result;
23 | }
24 | throw new InvalidCastException("\"" + value + "\"不是有效的boolean,请确认。");
25 | }
26 |
27 | #region ToDouble
28 | ///
29 | /// 转换为double
30 | ///
31 | public static double ToDouble(this string value)
32 | {
33 | if (value.IsInvalid()) return 0.0;
34 | double result;
35 | if (double.TryParse(value, out result))
36 | {
37 | return result;
38 | }
39 | throw new InvalidCastException("不能将字符串\"" + value + "\"转换为double数字。");
40 | }
41 | #endregion
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/Util.Controls.V2.0/plan.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/kwonganding/wpf.controls/c16b7e7224bb26c8d627df23d2f1dc891568677c/Util.Controls.V2.0/plan.txt
--------------------------------------------------------------------------------