diff --git a/README.md b/README.md index df0accf..2dc3c26 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,9 @@ [![Build status](https://ci.appveyor.com/api/projects/status/0e19uif3f40tsppi?svg=true)](https://ci.appveyor.com/project/Dirkster99/colorpickerlib) [![Release](https://img.shields.io/github/release/Dirkster99/colorpickerlib.svg)](https://github.com/Dirkster99/colorpickerlib/releases/latest) [![NuGet](https://img.shields.io/nuget/dt/Dirkster.colorpickerlib.svg)](http://nuget.org/packages/Dirkster.colorpickerlib) + +![Net4](https://badgen.net/badge/Framework/.Net 4/blue) ![NetCore3](https://badgen.net/badge/Framework/NetCore 3/blue) + # ColorPickerLib A WPF/MVVM implementation of a themeable color picker control diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000..ce381d1 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,32 @@ +version: 1.6.{build} + +branches: + only: + - master + +configuration: Release + +platform: Any CPU + +image: Visual Studio 2019 Preview + +install: + - cmd: choco install dotnetcore-sdk --pre + +before_build: +- cmd: nuget restore source/ColorPickerDemo.sln + +build: + + verbosity: minimal + +artifacts: + +- path: source\ColorPickerDemo\bin\Release + name: ColorPickerDemo + +- path: source\MLibTest\ThemedDemo\bin\Release + name: ThemedDemo + +- path: source\ColorPickerLib\bin\Release + name: ColorPickerLib diff --git a/source/ColorPickerDemo.sln b/source/ColorPickerDemo.sln index 0e30741..7297db4 100644 --- a/source/ColorPickerDemo.sln +++ b/source/ColorPickerDemo.sln @@ -1,12 +1,10 @@ - + Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.28010.0 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29209.152 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ColorPickerDemo", "ColorPickerDemo\ColorPickerDemo.csproj", "{D2AEE076-83D6-4B96-B420-B6782CAA0E44}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ColorPickerLib", "ColorPickerLib\ColorPickerLib.csproj", "{E64CE47C-10A6-490E-B1B1-84F00FD6C1D2}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MLibTest", "MLibTest", "{762EF7D1-DF7E-45C1-A5DB-A0B079A0933D}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Components", "Components", "{BBC3130A-38F7-4C77-894D-80E190235555}" @@ -21,6 +19,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ThemedDemo", "MLibTest\Them EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ColorPickerDemoLib", "ColorPickerDemoLib\ColorPickerDemoLib.csproj", "{6FB67EF1-8867-4C75-8C5D-3952A85C27DA}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ColorPickerLib", "ColorPickerLib\ColorPickerLib.csproj", "{120B4F72-0BF6-4272-B1BF-68444131570C}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -43,18 +43,6 @@ Global {D2AEE076-83D6-4B96-B420-B6782CAA0E44}.Release|x64.Build.0 = Release|Any CPU {D2AEE076-83D6-4B96-B420-B6782CAA0E44}.Release|x86.ActiveCfg = Release|Any CPU {D2AEE076-83D6-4B96-B420-B6782CAA0E44}.Release|x86.Build.0 = Release|Any CPU - {E64CE47C-10A6-490E-B1B1-84F00FD6C1D2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E64CE47C-10A6-490E-B1B1-84F00FD6C1D2}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E64CE47C-10A6-490E-B1B1-84F00FD6C1D2}.Debug|x64.ActiveCfg = Debug|Any CPU - {E64CE47C-10A6-490E-B1B1-84F00FD6C1D2}.Debug|x64.Build.0 = Debug|Any CPU - {E64CE47C-10A6-490E-B1B1-84F00FD6C1D2}.Debug|x86.ActiveCfg = Debug|Any CPU - {E64CE47C-10A6-490E-B1B1-84F00FD6C1D2}.Debug|x86.Build.0 = Debug|Any CPU - {E64CE47C-10A6-490E-B1B1-84F00FD6C1D2}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E64CE47C-10A6-490E-B1B1-84F00FD6C1D2}.Release|Any CPU.Build.0 = Release|Any CPU - {E64CE47C-10A6-490E-B1B1-84F00FD6C1D2}.Release|x64.ActiveCfg = Release|Any CPU - {E64CE47C-10A6-490E-B1B1-84F00FD6C1D2}.Release|x64.Build.0 = Release|Any CPU - {E64CE47C-10A6-490E-B1B1-84F00FD6C1D2}.Release|x86.ActiveCfg = Release|Any CPU - {E64CE47C-10A6-490E-B1B1-84F00FD6C1D2}.Release|x86.Build.0 = Release|Any CPU {252126D1-E1D9-49C3-910B-FCF2266265EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {252126D1-E1D9-49C3-910B-FCF2266265EF}.Debug|Any CPU.Build.0 = Debug|Any CPU {252126D1-E1D9-49C3-910B-FCF2266265EF}.Debug|x64.ActiveCfg = Debug|x64 @@ -115,6 +103,18 @@ Global {6FB67EF1-8867-4C75-8C5D-3952A85C27DA}.Release|x64.Build.0 = Release|Any CPU {6FB67EF1-8867-4C75-8C5D-3952A85C27DA}.Release|x86.ActiveCfg = Release|Any CPU {6FB67EF1-8867-4C75-8C5D-3952A85C27DA}.Release|x86.Build.0 = Release|Any CPU + {120B4F72-0BF6-4272-B1BF-68444131570C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {120B4F72-0BF6-4272-B1BF-68444131570C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {120B4F72-0BF6-4272-B1BF-68444131570C}.Debug|x64.ActiveCfg = Debug|Any CPU + {120B4F72-0BF6-4272-B1BF-68444131570C}.Debug|x64.Build.0 = Debug|Any CPU + {120B4F72-0BF6-4272-B1BF-68444131570C}.Debug|x86.ActiveCfg = Debug|Any CPU + {120B4F72-0BF6-4272-B1BF-68444131570C}.Debug|x86.Build.0 = Debug|Any CPU + {120B4F72-0BF6-4272-B1BF-68444131570C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {120B4F72-0BF6-4272-B1BF-68444131570C}.Release|Any CPU.Build.0 = Release|Any CPU + {120B4F72-0BF6-4272-B1BF-68444131570C}.Release|x64.ActiveCfg = Release|Any CPU + {120B4F72-0BF6-4272-B1BF-68444131570C}.Release|x64.Build.0 = Release|Any CPU + {120B4F72-0BF6-4272-B1BF-68444131570C}.Release|x86.ActiveCfg = Release|Any CPU + {120B4F72-0BF6-4272-B1BF-68444131570C}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/source/ColorPickerDemo/ColorPickerDemo.csproj b/source/ColorPickerDemo/ColorPickerDemo.csproj index 71d6146..ecad922 100644 --- a/source/ColorPickerDemo/ColorPickerDemo.csproj +++ b/source/ColorPickerDemo/ColorPickerDemo.csproj @@ -34,8 +34,8 @@ 4 - - ..\packages\Dirkster.NumericUpDownLib.2.2.2\lib\net4\NumericUpDownLib.dll + + ..\packages\Dirkster.NumericUpDownLib.2.4.0\lib\net40\NumericUpDownLib.dll @@ -105,7 +105,7 @@ ColorPickerDemoLib - {e64ce47c-10a6-490e-b1b1-84f00fd6c1d2} + {120b4f72-0bf6-4272-b1bf-68444131570c} ColorPickerLib diff --git a/source/ColorPickerDemo/packages.config b/source/ColorPickerDemo/packages.config index 61e00e3..8582d0b 100644 --- a/source/ColorPickerDemo/packages.config +++ b/source/ColorPickerDemo/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/source/ColorPickerDemoLib/ColorPickerDemoLib.csproj b/source/ColorPickerDemoLib/ColorPickerDemoLib.csproj index 52f556c..d51a002 100644 --- a/source/ColorPickerDemoLib/ColorPickerDemoLib.csproj +++ b/source/ColorPickerDemoLib/ColorPickerDemoLib.csproj @@ -85,7 +85,7 @@ - {e64ce47c-10a6-490e-b1b1-84f00fd6c1d2} + {120b4f72-0bf6-4272-b1bf-68444131570c} ColorPickerLib diff --git a/source/ColorPickerLib/AssemblyInfo.cs b/source/ColorPickerLib/AssemblyInfo.cs new file mode 100644 index 0000000..8b5504e --- /dev/null +++ b/source/ColorPickerLib/AssemblyInfo.cs @@ -0,0 +1,10 @@ +using System.Windows; + +[assembly: ThemeInfo( + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] diff --git a/source/ColorPickerLib/ColorPickerLib.csproj b/source/ColorPickerLib/ColorPickerLib.csproj index c37323b..0255bfe 100644 --- a/source/ColorPickerLib/ColorPickerLib.csproj +++ b/source/ColorPickerLib/ColorPickerLib.csproj @@ -1,277 +1,191 @@ - - - + + - Debug - AnyCPU - {E64CE47C-10A6-490E-B1B1-84F00FD6C1D2} - library - Properties - ColorPickerLib - ColorPickerLib - v4.0 - 512 - {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 4 - Client - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 + net4;netcoreapp3.0 + true + + true + 1.6.0.0 + 1.6.0.0 + 1.6.0.0 + Open Source + ColorPickerLib + 2015-2019 + Provides a .Net implementation of a WPF color picker control supporting HSV and RGB. + https://github.com/Dirkster99/ColorPickerLib + https://github.com/Dirkster99/ColorPickerLib + Dirkster.ColorPickerLib + https://github.com/Dirkster99/ColorPickerLib + MIT + colorpicker color picker wpf mvvm c# .net metro dark light themed control library + This control is now supported in NetCore 3 (with Preview 8) and .Net 4. + en + https://raw.githubusercontent.com/Dirkster99/Docu/master/ColorPickerLib/icon.png + + - - ..\packages\Dirkster.NumericUpDownLib.2.2.2\lib\net4\NumericUpDownLib.dll - - - - - - - - - - - 4.0 - - - - + + - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - Designer - MSBuild:Compile - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - - - Designer - MSBuild:Compile - - - MSBuild:Compile - Designer - - - + + Code ColorCanvas.xaml + + Code + ColorPicker.xaml - - ColorSpectrumSlider.xaml + Code + ColorSpectrumSlider.xaml - - - - - - - - - - - - + Strings.de-DE.resx - True True - - True - True - Strings.resx - - True + + Strings.resx True - Strings.es-ES.resx - - True - True - Strings.fr-FR.resx - - True + + Strings.es-ES.resx True - Strings.hi.resx - - True - True - Strings.id-ID.resx - - True + + Strings.fr-FR.resx True - Strings.it-IT.resx - - True - True - Strings.ja-JP.resx - - True + + Strings.hi.resx True - Strings.nl-NL.resx - - True - True - Strings.zh-CHS.resx - - True + + Strings.id-ID.resx True - Strings.zh-CHT.resx + True - - - - - - - - ColorPicker.xaml - Code + + Strings.it-IT.resx + True + True - - - - - - - - MSBuild:Compile - Designer - - - Designer - MSBuild:Compile - - - MSBuild:Compile - Designer - - - - - Code + + Strings.ja-JP.resx + True + True - + + Strings.nl-NL.resx + True True + + + Strings.zh-CHS.resx True - Resources.resx + True - + + Strings.zh-CHT.resx + True True - Settings.settings - True - - PublicResXFileCodeGenerator + + + + Strings.de-DE.Designer.cs - - PublicResXFileCodeGenerator - Strings.es-ES.Designer.cs - + + Strings.es-ES.Designer.cs PublicResXFileCodeGenerator - Strings.fr-FR.Designer.cs - + + Strings.fr-FR.Designer.cs PublicResXFileCodeGenerator - Strings.hi.Designer.cs - + + Strings.hi.Designer.cs PublicResXFileCodeGenerator - Strings.id-ID.Designer.cs - + + Strings.id-ID.Designer.cs PublicResXFileCodeGenerator - Strings.it-IT.Designer.cs - + + Strings.it-IT.Designer.cs PublicResXFileCodeGenerator - Strings.ja-JP.Designer.cs - + + Strings.ja-JP.Designer.cs PublicResXFileCodeGenerator - Strings.nl-NL.Designer.cs - + + Strings.nl-NL.Designer.cs PublicResXFileCodeGenerator - Strings.Designer.cs - + + Strings.Designer.cs PublicResXFileCodeGenerator - Strings.zh-CHS.Designer.cs - + + Strings.zh-CHS.Designer.cs PublicResXFileCodeGenerator - Strings.zh-CHT.Designer.cs - - ResXFileCodeGenerator - Resources.Designer.cs + + Strings.zh-CHT.Designer.cs + PublicResXFileCodeGenerator - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - - - - \ No newline at end of file + + + + Designer + + + Designer + + + Designer + + + Designer + + + Designer + + + Designer + + + Designer + + + Designer + + + Designer + MSBuild:Compile + + + Designer + + + Designer + + + Designer + + + Designer + + + + diff --git a/source/ColorPickerLib/ColorPickerLib.csproj.user b/source/ColorPickerLib/ColorPickerLib.csproj.user new file mode 100644 index 0000000..d092841 --- /dev/null +++ b/source/ColorPickerLib/ColorPickerLib.csproj.user @@ -0,0 +1,50 @@ + + + + + + Designer + + + + + Designer + + + Designer + + + Designer + + + Designer + + + Designer + + + Designer + + + Designer + + + Designer + + + Designer + + + Designer + + + Designer + + + Designer + + + Designer + + + \ No newline at end of file diff --git a/source/ColorPickerLib/Localized/Strings.Designer.cs b/source/ColorPickerLib/Localized/Strings.Designer.cs index 638d6f3..ca7cd45 100644 --- a/source/ColorPickerLib/Localized/Strings.Designer.cs +++ b/source/ColorPickerLib/Localized/Strings.Designer.cs @@ -19,7 +19,7 @@ namespace ColorPickerLib.Localized { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] public class Strings { diff --git a/source/ColorPickerLib/Properties/AssemblyInfo.cs b/source/ColorPickerLib/Properties/AssemblyInfo.cs deleted file mode 100644 index 4f62c0d..0000000 --- a/source/ColorPickerLib/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,55 +0,0 @@ -using System.Reflection; -using System.Resources; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Windows; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("ColorPickerLib")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("https://github.com/Dirkster99/ColorPickerLib")] -[assembly: AssemblyProduct("https://github.com/Dirkster99/ColorPickerLib")] -[assembly: AssemblyCopyright("Copyright © 2015-2019")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -//In order to begin building localizable applications, set -//CultureYouAreCodingWith in your .csproj file -//inside a . For example, if you are using US english -//in your source files, set the to en-US. Then uncomment -//the NeutralResourceLanguage attribute below. Update the "en-US" in -//the line below to match the UICulture setting in the project file. - -//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] - - -[assembly:ThemeInfo( - ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located - //(used if a resource is not found in the page, - // or application resource dictionaries) - ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located - //(used if a resource is not found in the page, - // app, or any theme specific resource dictionaries) -)] - - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.5.1.0")] -[assembly: AssemblyFileVersion("1.5.1.0")] diff --git a/source/ColorPickerLib/Properties/Resources.Designer.cs b/source/ColorPickerLib/Properties/Resources.Designer.cs deleted file mode 100644 index 475262c..0000000 --- a/source/ColorPickerLib/Properties/Resources.Designer.cs +++ /dev/null @@ -1,63 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace ColorPickerLib.Properties { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ColorPickerLib.Properties.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - } -} diff --git a/source/ColorPickerLib/Properties/Resources.resx b/source/ColorPickerLib/Properties/Resources.resx deleted file mode 100644 index af7dbeb..0000000 --- a/source/ColorPickerLib/Properties/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/source/ColorPickerLib/Properties/Settings.Designer.cs b/source/ColorPickerLib/Properties/Settings.Designer.cs deleted file mode 100644 index 96341bf..0000000 --- a/source/ColorPickerLib/Properties/Settings.Designer.cs +++ /dev/null @@ -1,26 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace ColorPickerLib.Properties { - - - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.8.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { - - private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default { - get { - return defaultInstance; - } - } - } -} diff --git a/source/ColorPickerLib/Properties/Settings.settings b/source/ColorPickerLib/Properties/Settings.settings deleted file mode 100644 index 033d7a5..0000000 --- a/source/ColorPickerLib/Properties/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/source/ColorPickerLib/packages.config b/source/ColorPickerLib/packages.config deleted file mode 100644 index f65920c..0000000 --- a/source/ColorPickerLib/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/source/MLibTest/Components/Settings/Settings/Settings.csproj b/source/MLibTest/Components/Settings/Settings/Settings.csproj index e90ad28..2ba05eb 100644 --- a/source/MLibTest/Components/Settings/Settings/Settings.csproj +++ b/source/MLibTest/Components/Settings/Settings/Settings.csproj @@ -75,8 +75,8 @@ ..\..\..\..\packages\log4net.2.0.8\lib\net45-full\log4net.dll - - ..\..\..\..\packages\Dirkster.MLib.1.0.10\lib\net4\MLib.dll + + ..\..\..\..\packages\Dirkster.MLib.1.2.0\lib\net4\MLib.dll diff --git a/source/MLibTest/Components/Settings/Settings/packages.config b/source/MLibTest/Components/Settings/Settings/packages.config index 837573c..5f6134f 100644 --- a/source/MLibTest/Components/Settings/Settings/packages.config +++ b/source/MLibTest/Components/Settings/Settings/packages.config @@ -1,5 +1,5 @@  - + \ No newline at end of file diff --git a/source/MLibTest/ThemedDemo/MainWindow.xaml b/source/MLibTest/ThemedDemo/MainWindow.xaml index d0bc4e8..77026ba 100644 --- a/source/MLibTest/ThemedDemo/MainWindow.xaml +++ b/source/MLibTest/ThemedDemo/MainWindow.xaml @@ -32,7 +32,7 @@ ..\..\packages\log4net.2.0.8\lib\net45-full\log4net.dll - ..\..\packages\Dirkster.MWindowLib.1.0.4.2\lib\net452\Microsoft.Expression.Interactions.dll + ..\..\packages\Dirkster.MWindowLib.1.2.1\lib\net452\Microsoft.Expression.Interactions.dll - - ..\..\packages\Dirkster.MLib.1.0.10\lib\net4\MLib.dll + + ..\..\packages\Dirkster.MLib.1.2.0\lib\net4\MLib.dll - ..\..\packages\Dirkster.MWindowLib.1.0.4.2\lib\net452\MWindowInterfacesLib.dll + ..\..\packages\Dirkster.MWindowLib.1.2.1\lib\net452\MWindowInterfacesLib.dll - - ..\..\packages\Dirkster.MWindowLib.1.0.4.2\lib\net452\MWindowLib.dll + + ..\..\packages\Dirkster.MWindowLib.1.2.1\lib\net452\MWindowLib.dll - - ..\..\packages\Dirkster.NumericUpDownLib.2.2.2\lib\net4\NumericUpDownLib.dll + + ..\..\packages\Dirkster.NumericUpDownLib.2.4.0\lib\net40\NumericUpDownLib.dll - ..\..\packages\Dirkster.MWindowLib.1.0.4.2\lib\net452\System.Windows.Interactivity.dll + ..\..\packages\Dirkster.MWindowLib.1.2.1\lib\net452\System.Windows.Interactivity.dll @@ -104,8 +104,8 @@ 4.0 - - ..\..\packages\Dirkster.UserNotifications.1.5.0\lib\net40\UserNotification.dll + + ..\..\packages\Dirkster.UserNotifications.1.5.1\lib\net40\UserNotification.dll @@ -186,7 +186,7 @@ ColorPickerDemoLib - {e64ce47c-10a6-490e-b1b1-84f00fd6c1d2} + {120b4f72-0bf6-4272-b1bf-68444131570c} ColorPickerLib diff --git a/source/MLibTest/ThemedDemo/ViewModels/AppViewModel.cs b/source/MLibTest/ThemedDemo/ViewModels/AppViewModel.cs index 1c4c9fd..ae18459 100644 --- a/source/MLibTest/ThemedDemo/ViewModels/AppViewModel.cs +++ b/source/MLibTest/ThemedDemo/ViewModels/AppViewModel.cs @@ -102,7 +102,7 @@ public ICommand ThemeSelectionChangedCommand if (theme != null) { _AppTheme.ApplyTheme(Application.Current.MainWindow, - theme.Model.Name); + theme.Model.DisplayName); } }); } diff --git a/source/MLibTest/ThemedDemo/ViewModels/ThemeDefinitionViewModel.cs b/source/MLibTest/ThemedDemo/ViewModels/ThemeDefinitionViewModel.cs index 194772a..2db0397 100644 --- a/source/MLibTest/ThemedDemo/ViewModels/ThemeDefinitionViewModel.cs +++ b/source/MLibTest/ThemedDemo/ViewModels/ThemeDefinitionViewModel.cs @@ -1,22 +1,29 @@ namespace ThemedDemo.ViewModels { - using MLib.Themes; + using MLib.Interfaces; public class ThemeDefinitionViewModel : Base.ViewModelBase { #region private fields - readonly private ThemeDefinition _model; + readonly private IThemeInfo _model; private bool _IsSelected; #endregion private fields #region constructors - public ThemeDefinitionViewModel(ThemeDefinition model) + /// + /// Class constructor + /// + /// + public ThemeDefinitionViewModel(IThemeInfo model) : this() { _model = model; } + /// + /// Hidden class constructor + /// protected ThemeDefinitionViewModel() { _model = null; @@ -28,7 +35,7 @@ protected ThemeDefinitionViewModel() /// /// Gets the static theme model based data items. /// - public ThemeDefinition Model + public IThemeInfo Model { get { diff --git a/source/MLibTest/ThemedDemo/ViewModels/ThemeViewModel.cs b/source/MLibTest/ThemedDemo/ViewModels/ThemeViewModel.cs index 65617d6..12f8ff2 100644 --- a/source/MLibTest/ThemedDemo/ViewModels/ThemeViewModel.cs +++ b/source/MLibTest/ThemedDemo/ViewModels/ThemeViewModel.cs @@ -1,8 +1,6 @@ namespace ThemedDemo.ViewModels { - using MLib; using MLib.Interfaces; - using MLib.Themes; using Settings.Interfaces; using System.Collections.Generic; using System.Linq; @@ -32,13 +30,7 @@ public ThemeViewModel() _ListOfThemes = new Dictionary(); foreach (var item in settings.Themes.GetThemeInfos()) - { - var list = new List(); - foreach (var subitem in item.ThemeSources) - list.Add(subitem.ToString()); - - _ListOfThemes.Add(item.DisplayName, new ThemeDefinitionViewModel(new ThemeDefinition(item.DisplayName, list))); - } + _ListOfThemes.Add(item.DisplayName, new ThemeDefinitionViewModel(item)); // Lets make sure there is a default _ListOfThemes.TryGetValue(GetService().GetDefaultTheme().DisplayName, out _DefaultTheme); diff --git a/source/MLibTest/ThemedDemo/packages.config b/source/MLibTest/ThemedDemo/packages.config index 741964e..104d729 100644 --- a/source/MLibTest/ThemedDemo/packages.config +++ b/source/MLibTest/ThemedDemo/packages.config @@ -1,8 +1,8 @@  - - - - + + + + \ No newline at end of file