Skip to content

Commit 26a3205

Browse files
Merge pull request #81 from johelvisguzman/dev
Merge from 'dev' for v2.2.0
2 parents 819b27b + 3d2248d commit 26a3205

File tree

103 files changed

+10173
-5609
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+10173
-5609
lines changed

DotNetToolkit.Repository.sln

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,15 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DotNetToolkit.Repository.En
2121
EndProject
2222
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DotNetToolkit.Repository.Json", "src\DotNetToolkit.Repository.Json\DotNetToolkit.Repository.Json.csproj", "{B71EA207-390A-4AB0-BFC8-44BA124FC35B}"
2323
EndProject
24-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotNetToolkit.Repository.Xml", "src\DotNetToolkit.Repository.Xml\DotNetToolkit.Repository.Xml.csproj", "{BB858B77-5CE8-4301-9FB6-343FFF5B7E63}"
24+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DotNetToolkit.Repository.Xml", "src\DotNetToolkit.Repository.Xml\DotNetToolkit.Repository.Xml.csproj", "{BB858B77-5CE8-4301-9FB6-343FFF5B7E63}"
25+
EndProject
26+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DotNetToolkit.Repository.Csv", "src\DotNetToolkit.Repository.Csv\DotNetToolkit.Repository.Csv.csproj", "{AE291CF3-4753-4454-9A7B-DE6137A76C4C}"
27+
EndProject
28+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DotNetToolkit.Repository.AdoNet", "src\DotNetToolkit.Repository.AdoNet\DotNetToolkit.Repository.AdoNet.csproj", "{77973BF2-E352-43C9-8CF2-99E01142B2A8}"
29+
EndProject
30+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{257E837B-5B99-44D7-9647-1C2FE0A07520}"
31+
EndProject
32+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DotNetToolkit.Repository.Wpf.Demo", "samples\DotNetToolkit.Repository.Wpf.Demo\DotNetToolkit.Repository.Wpf.Demo.csproj", "{14409451-ED11-4DEF-8A89-783834F8316C}"
2533
EndProject
2634
Global
2735
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -61,6 +69,17 @@ Global
6169
{BB858B77-5CE8-4301-9FB6-343FFF5B7E63}.Debug|Any CPU.Build.0 = Debug|Any CPU
6270
{BB858B77-5CE8-4301-9FB6-343FFF5B7E63}.Release|Any CPU.ActiveCfg = Release|Any CPU
6371
{BB858B77-5CE8-4301-9FB6-343FFF5B7E63}.Release|Any CPU.Build.0 = Release|Any CPU
72+
{AE291CF3-4753-4454-9A7B-DE6137A76C4C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
73+
{AE291CF3-4753-4454-9A7B-DE6137A76C4C}.Debug|Any CPU.Build.0 = Debug|Any CPU
74+
{AE291CF3-4753-4454-9A7B-DE6137A76C4C}.Release|Any CPU.ActiveCfg = Release|Any CPU
75+
{AE291CF3-4753-4454-9A7B-DE6137A76C4C}.Release|Any CPU.Build.0 = Release|Any CPU
76+
{77973BF2-E352-43C9-8CF2-99E01142B2A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
77+
{77973BF2-E352-43C9-8CF2-99E01142B2A8}.Debug|Any CPU.Build.0 = Debug|Any CPU
78+
{77973BF2-E352-43C9-8CF2-99E01142B2A8}.Release|Any CPU.ActiveCfg = Release|Any CPU
79+
{77973BF2-E352-43C9-8CF2-99E01142B2A8}.Release|Any CPU.Build.0 = Release|Any CPU
80+
{14409451-ED11-4DEF-8A89-783834F8316C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
81+
{14409451-ED11-4DEF-8A89-783834F8316C}.Debug|Any CPU.Build.0 = Debug|Any CPU
82+
{14409451-ED11-4DEF-8A89-783834F8316C}.Release|Any CPU.ActiveCfg = Release|Any CPU
6483
EndGlobalSection
6584
GlobalSection(SolutionProperties) = preSolution
6685
HideSolutionNode = FALSE
@@ -74,6 +93,9 @@ Global
7493
{0A9D9AA4-F01C-470F-AD5B-5A81EA7A398D} = {DD273D5E-6D6C-41FA-A0C8-646CC53C4DC3}
7594
{B71EA207-390A-4AB0-BFC8-44BA124FC35B} = {DD273D5E-6D6C-41FA-A0C8-646CC53C4DC3}
7695
{BB858B77-5CE8-4301-9FB6-343FFF5B7E63} = {DD273D5E-6D6C-41FA-A0C8-646CC53C4DC3}
96+
{AE291CF3-4753-4454-9A7B-DE6137A76C4C} = {DD273D5E-6D6C-41FA-A0C8-646CC53C4DC3}
97+
{77973BF2-E352-43C9-8CF2-99E01142B2A8} = {DD273D5E-6D6C-41FA-A0C8-646CC53C4DC3}
98+
{14409451-ED11-4DEF-8A89-783834F8316C} = {257E837B-5B99-44D7-9647-1C2FE0A07520}
7799
EndGlobalSection
78100
GlobalSection(ExtensibilityGlobals) = postSolution
79101
SolutionGuid = {96973E0C-81D1-42DE-9F78-7103241B4E07}

appveyor.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ after_build:
5050
- dotnet pack .\src\DotNetToolkit.Repository.EntityFrameworkCore\DotNetToolkit.Repository.EntityFrameworkCore.csproj --configuration Release
5151
- dotnet pack .\src\DotNetToolkit.Repository.Json\DotNetToolkit.Repository.Json.csproj --configuration Release
5252
- dotnet pack .\src\DotNetToolkit.Repository.Xml\DotNetToolkit.Repository.Xml.csproj --configuration Release
53+
- dotnet pack .\src\DotNetToolkit.Repository.Csv\DotNetToolkit.Repository.Csv.csproj --configuration Release
54+
- dotnet pack .\src\DotNetToolkit.Repository.AdoNet\DotNetToolkit.Repository.AdoNet.csproj --configuration Release
5355

5456
#---------------------------------#
5557
# tests configuration #
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<configuration>
3+
<startup>
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.1" />
5+
</startup>
6+
</configuration>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<Application x:Class="DotNetToolkit.Repository.Wpf.Demo.App"
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
StartupUri="Views/MainWindowView.xaml">
5+
<Application.Resources>
6+
<ResourceDictionary>
7+
<ResourceDictionary.MergedDictionaries>
8+
<ResourceDictionary Source="pack://application:,,,/Resources/Themes/Generic.xaml" />
9+
</ResourceDictionary.MergedDictionaries>
10+
</ResourceDictionary>
11+
</Application.Resources>
12+
</Application>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
namespace DotNetToolkit.Repository.Wpf.Demo
2+
{
3+
/// <summary>
4+
/// Interaction logic for App.xaml
5+
/// </summary>
6+
public partial class App : System.Windows.Application
7+
{
8+
}
9+
}
Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{14409451-ED11-4DEF-8A89-783834F8316C}</ProjectGuid>
8+
<OutputType>WinExe</OutputType>
9+
<RootNamespace>DotNetToolkit.Repository.Wpf.Demo</RootNamespace>
10+
<AssemblyName>DotNetToolkit.Repository.Wpf.Demo</AssemblyName>
11+
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
12+
<FileAlignment>512</FileAlignment>
13+
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
14+
<WarningLevel>4</WarningLevel>
15+
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
16+
</PropertyGroup>
17+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
18+
<PlatformTarget>AnyCPU</PlatformTarget>
19+
<DebugSymbols>true</DebugSymbols>
20+
<DebugType>full</DebugType>
21+
<Optimize>false</Optimize>
22+
<OutputPath>bin\Debug\</OutputPath>
23+
<DefineConstants>DEBUG;TRACE</DefineConstants>
24+
<ErrorReport>prompt</ErrorReport>
25+
<WarningLevel>4</WarningLevel>
26+
</PropertyGroup>
27+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
28+
<PlatformTarget>AnyCPU</PlatformTarget>
29+
<DebugType>pdbonly</DebugType>
30+
<Optimize>true</Optimize>
31+
<OutputPath>bin\Release\</OutputPath>
32+
<DefineConstants>TRACE</DefineConstants>
33+
<ErrorReport>prompt</ErrorReport>
34+
<WarningLevel>4</WarningLevel>
35+
</PropertyGroup>
36+
<ItemGroup>
37+
<Reference Include="ControlzEx, Version=3.0.2.4, Culture=neutral, processorArchitecture=MSIL">
38+
<HintPath>..\..\packages\ControlzEx.3.0.2.4\lib\net45\ControlzEx.dll</HintPath>
39+
</Reference>
40+
<Reference Include="DotNetToolkit.Wpf, Version=1.0.2.22, Culture=neutral, PublicKeyToken=fc15a78dc7f484d4, processorArchitecture=MSIL">
41+
<HintPath>..\..\packages\DotNetToolkit.Wpf.1.0.2.22\lib\net451\DotNetToolkit.Wpf.dll</HintPath>
42+
</Reference>
43+
<Reference Include="DotNetToolkit.Wpf.Metro.Dialogs, Version=1.0.2.22, Culture=neutral, PublicKeyToken=fc15a78dc7f484d4, processorArchitecture=MSIL">
44+
<HintPath>..\..\packages\DotNetToolkit.Wpf.Metro.Dialogs.1.0.2.22\lib\net451\DotNetToolkit.Wpf.Metro.Dialogs.dll</HintPath>
45+
</Reference>
46+
<Reference Include="FluentValidation, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7de548da2fbae0f0, processorArchitecture=MSIL">
47+
<HintPath>..\..\packages\FluentValidation.7.6.0-preview1\lib\net45\FluentValidation.dll</HintPath>
48+
</Reference>
49+
<Reference Include="MahApps.Metro, Version=1.5.0.23, Culture=neutral, PublicKeyToken=f4fb5a3c4d1e5b4f, processorArchitecture=MSIL">
50+
<HintPath>..\..\packages\MahApps.Metro.1.5.0\lib\net45\MahApps.Metro.dll</HintPath>
51+
</Reference>
52+
<Reference Include="MahApps.Metro.IconPacks, Version=2.2.0.12, Culture=neutral, processorArchitecture=MSIL">
53+
<HintPath>..\..\packages\MahApps.Metro.IconPacks.2.2.0\lib\net45\MahApps.Metro.IconPacks.dll</HintPath>
54+
</Reference>
55+
<Reference Include="MahApps.Metro.SimpleChildWindow, Version=1.4.0.0, Culture=neutral, PublicKeyToken=bbbfdff7f500a992, processorArchitecture=MSIL">
56+
<HintPath>..\..\packages\MahApps.Metro.SimpleChildWindow.1.4.0\lib\net45\MahApps.Metro.SimpleChildWindow.dll</HintPath>
57+
</Reference>
58+
<Reference Include="System" />
59+
<Reference Include="System.ComponentModel.DataAnnotations" />
60+
<Reference Include="System.ComponentModel.Primitives, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
61+
<HintPath>..\..\packages\System.ComponentModel.Primitives.4.3.0\lib\net45\System.ComponentModel.Primitives.dll</HintPath>
62+
</Reference>
63+
<Reference Include="System.Data" />
64+
<Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
65+
<HintPath>..\..\packages\ControlzEx.3.0.2.4\lib\net45\System.Windows.Interactivity.dll</HintPath>
66+
<Private>True</Private>
67+
</Reference>
68+
<Reference Include="System.Xml" />
69+
<Reference Include="Microsoft.CSharp" />
70+
<Reference Include="System.Core" />
71+
<Reference Include="System.Xml.Linq" />
72+
<Reference Include="System.Data.DataSetExtensions" />
73+
<Reference Include="System.Net.Http" />
74+
<Reference Include="System.Xaml">
75+
<RequiredTargetFramework>4.0</RequiredTargetFramework>
76+
</Reference>
77+
<Reference Include="WindowsBase" />
78+
<Reference Include="PresentationCore" />
79+
<Reference Include="PresentationFramework" />
80+
</ItemGroup>
81+
<ItemGroup>
82+
<ApplicationDefinition Include="App.xaml">
83+
<Generator>MSBuild:Compile</Generator>
84+
<SubType>Designer</SubType>
85+
</ApplicationDefinition>
86+
<Compile Include="ViewModels\CustomerFormViewModel.cs" />
87+
<Compile Include="ViewModels\CustomerWorkspaceViewModel.cs" />
88+
<Compile Include="ViewModels\MainWindowViewModel.cs" />
89+
<Compile Include="Views\CustomerFormView.xaml.cs">
90+
<DependentUpon>CustomerFormView.xaml</DependentUpon>
91+
</Compile>
92+
<Compile Include="Views\CustomerWorkspaceView.xaml.cs">
93+
<DependentUpon>CustomerWorkspaceView.xaml</DependentUpon>
94+
</Compile>
95+
<Compile Include="Views\MainWindowView.xaml.cs">
96+
<DependentUpon>MainWindowView.xaml</DependentUpon>
97+
</Compile>
98+
<Compile Include="App.xaml.cs">
99+
<DependentUpon>App.xaml</DependentUpon>
100+
<SubType>Code</SubType>
101+
</Compile>
102+
<Compile Include="Infrastructure\AutoMapper.cs" />
103+
<Compile Include="Infrastructure\DialogController.cs" />
104+
<Compile Include="Infrastructure\FormViewModelBase.cs" />
105+
<Compile Include="Infrastructure\Interfaces\ICustomer.cs" />
106+
<Compile Include="Infrastructure\NavigationController.cs" />
107+
<Page Include="Resources\Themes\Generic.xaml">
108+
<Generator>MSBuild:Compile</Generator>
109+
<SubType>Designer</SubType>
110+
</Page>
111+
<Page Include="Views\CustomerFormView.xaml">
112+
<Generator>MSBuild:Compile</Generator>
113+
<SubType>Designer</SubType>
114+
</Page>
115+
<Page Include="Views\CustomerWorkspaceView.xaml">
116+
<Generator>MSBuild:Compile</Generator>
117+
<SubType>Designer</SubType>
118+
</Page>
119+
<Page Include="Views\MainWindowView.xaml">
120+
<Generator>MSBuild:Compile</Generator>
121+
<SubType>Designer</SubType>
122+
</Page>
123+
</ItemGroup>
124+
<ItemGroup>
125+
<Compile Include="Models\Customer.cs" />
126+
<Compile Include="Properties\AssemblyInfo.cs">
127+
<SubType>Code</SubType>
128+
</Compile>
129+
<Compile Include="Properties\Resources.Designer.cs">
130+
<AutoGen>True</AutoGen>
131+
<DesignTime>True</DesignTime>
132+
<DependentUpon>Resources.resx</DependentUpon>
133+
</Compile>
134+
<Compile Include="Properties\Settings.Designer.cs">
135+
<AutoGen>True</AutoGen>
136+
<DependentUpon>Settings.settings</DependentUpon>
137+
<DesignTimeSharedInput>True</DesignTimeSharedInput>
138+
</Compile>
139+
<EmbeddedResource Include="Properties\Resources.resx">
140+
<Generator>ResXFileCodeGenerator</Generator>
141+
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
142+
</EmbeddedResource>
143+
<None Include="packages.config" />
144+
<None Include="Properties\Settings.settings">
145+
<Generator>SettingsSingleFileGenerator</Generator>
146+
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
147+
</None>
148+
</ItemGroup>
149+
<ItemGroup>
150+
<None Include="App.config" />
151+
</ItemGroup>
152+
<ItemGroup>
153+
<ProjectReference Include="..\..\src\DotNetToolkit.Repository.InMemory\DotNetToolkit.Repository.InMemory.csproj">
154+
<Project>{715d2f11-3aaf-476e-9a6a-dca6debd377e}</Project>
155+
<Name>DotNetToolkit.Repository.InMemory</Name>
156+
</ProjectReference>
157+
<ProjectReference Include="..\..\src\DotNetToolkit.Repository\DotNetToolkit.Repository.csproj">
158+
<Project>{76bc5ab7-1198-4c99-b2c3-3b734931f8ee}</Project>
159+
<Name>DotNetToolkit.Repository</Name>
160+
</ProjectReference>
161+
</ItemGroup>
162+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
163+
</Project>
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
namespace DotNetToolkit.Repository.Wpf.Demo.Infrastructure
2+
{
3+
using System;
4+
using Interfaces;
5+
6+
public static class AutoMapper
7+
{
8+
public static void Map<TSource, TTarget>(TSource source, TTarget target)
9+
where TSource : ICustomer
10+
where TTarget : ICustomer
11+
{
12+
if (source == null)
13+
throw new ArgumentNullException(nameof(source));
14+
15+
if (target == null)
16+
throw new ArgumentNullException(nameof(target));
17+
18+
target.Id = source.Id;
19+
target.Name = source.Name;
20+
target.Notes = source.Notes;
21+
target.Date = source.Date;
22+
}
23+
24+
public static TTarget Map<TSource, TTarget>(TSource source)
25+
where TSource : ICustomer
26+
where TTarget : ICustomer, new()
27+
{
28+
var target = new TTarget();
29+
30+
Map(source, target);
31+
32+
return target;
33+
}
34+
}
35+
}
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
namespace DotNetToolkit.Repository.Wpf.Demo.Infrastructure
2+
{
3+
using System.Threading.Tasks;
4+
using System.Windows;
5+
using DotNetToolkit.Wpf.Metro.Dialogs;
6+
using MahApps.Metro.Controls;
7+
8+
public class DialogController
9+
{
10+
#region Fields
11+
12+
private static volatile DialogController _instance;
13+
private static readonly object _syncRoot = new object();
14+
15+
private readonly MetroWindow _metroWindow;
16+
17+
#endregion
18+
19+
#region Properties
20+
21+
public static DialogController Instance
22+
{
23+
get
24+
{
25+
if (_instance == null)
26+
{
27+
lock (_syncRoot)
28+
{
29+
if (_instance == null)
30+
_instance = new DialogController();
31+
}
32+
}
33+
34+
return _instance;
35+
}
36+
}
37+
38+
#endregion
39+
40+
#region Constructors
41+
42+
private DialogController()
43+
{
44+
_metroWindow = Application.Current.MainWindow as MetroWindow;
45+
}
46+
47+
#endregion
48+
49+
#region Public Methods
50+
51+
public async Task<MessageDialogResult> ShowWarningMessageAsync(string message, MessageDialogStyle style = MessageDialogStyle.AffirmativeAndNegative)
52+
{
53+
var settings = new ChildWindowDialogSettings
54+
{
55+
AllowMove = true,
56+
TitleCharacterCasing = _metroWindow.TitleCharacterCasing,
57+
TitleBarBackground = (System.Windows.Media.Brush)Application.Current.Resources["FlatAlizarinColorBrush"]
58+
};
59+
60+
return await _metroWindow.ShowChildWindowMessageAsync("Warning!", message, style, settings);
61+
}
62+
63+
#endregion
64+
}
65+
}

0 commit comments

Comments
 (0)