Skip to content

Commit 5f9718d

Browse files
authored
Merge pull request #18 from KsWare/features/kux
Features/kux
2 parents 4596f91 + 0f85458 commit 5f9718d

File tree

41 files changed

+448
-117
lines changed

Some content is hidden

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

41 files changed

+448
-117
lines changed

ChangeLog.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
# 0.30
2+
- add TargetFrameworks: net6.0-windows, net452
3+
- remove TargetFrameworks: net45
4+
5+
# 0.21
6+
- EventManager.Raise add overload with lazy event args
7+
- FIX ActionVM.RegisterActionMethod
8+
- FIX do not RegisterActionMethod if Metadata.ActionProvider.ExecutedCallback is already set
9+
- add ButtonActionVM. derived from ActionVM supporting common button properties
10+
- add some UIProperties (ObjectVM.UI)
11+
- FIX ListVM clear item.Parent when removed
12+
113
# 0.20
214
- BREAKING CHANGE ValueChangedEventArgs swap arguments and rename PreviousValue to OldValue, so that you get a compiler error on event handlers. If you create ValueChangedEventArgs you have to swap the arguments manually. No Warning in this case!
315
- add SimpleCommand.RaiseCanExecuteChanged

src/KsWare.Presentation.Behavior.Common/KsWare.Presentation.Behavior.Common.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project Sdk="Microsoft.NET.Sdk">
33
<PropertyGroup>
4-
<TargetFrameworks>net5.0-windows;netcoreapp3.1;net45</TargetFrameworks>
4+
<TargetFrameworks>net6.0-windows;net5.0-windows;netcoreapp3.1;net452</TargetFrameworks>
55
<OutputType>Library</OutputType>
66
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
77
<UseWPF>true</UseWPF>
@@ -16,7 +16,7 @@
1616
</PropertyGroup>
1717
<PropertyGroup>
1818
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
19-
<Copyright>Copyright © 2002-2021 by KsWare. All rights reserved.</Copyright>
19+
<Copyright>Copyright © 2002-2022 by KsWare. All rights reserved.</Copyright>
2020
<Product>Presentation Framework</Product>
2121
<Company>KsWare</Company>
2222
<Authors>SchreinerK</Authors>
@@ -39,7 +39,7 @@
3939
<DebugSymbols>true</DebugSymbols>
4040
</PropertyGroup>
4141
<ItemGroup>
42-
<PackageReference Include="JetBrains.Annotations" Version="2021.2.0" />
42+
<PackageReference Include="JetBrains.Annotations" Version="2021.3.0" />
4343
</ItemGroup>
4444
<ItemGroup>
4545
<None Include="Properties\PackageIcon.png">

src/KsWare.Presentation.Behavior/KsWare.Presentation.Behavior.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project Sdk="Microsoft.NET.Sdk">
33
<PropertyGroup>
4-
<TargetFrameworks>net5.0-windows;netcoreapp3.1;net45</TargetFrameworks>
4+
<TargetFrameworks>net6.0-windows;net5.0-windows;netcoreapp3.1;net452</TargetFrameworks>
55
<OutputType>Library</OutputType>
66
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
77
<UseWPF>true</UseWPF>
@@ -16,7 +16,7 @@
1616
</PropertyGroup>
1717
<PropertyGroup>
1818
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
19-
<Copyright>Copyright © 2002-2021 by KsWare. All rights reserved.</Copyright>
19+
<Copyright>Copyright © 2002-2022 by KsWare. All rights reserved.</Copyright>
2020
<Product>Presentation Framework</Product>
2121
<Company>KsWare</Company>
2222
<Authors>SchreinerK</Authors>
@@ -39,7 +39,7 @@
3939
<DebugSymbols>true</DebugSymbols>
4040
</PropertyGroup>
4141
<ItemGroup>
42-
<PackageReference Include="JetBrains.Annotations" Version="2021.2.0" />
42+
<PackageReference Include="JetBrains.Annotations" Version="2021.3.0" />
4343
<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.31" />
4444
</ItemGroup>
4545
<ItemGroup>

src/KsWare.Presentation.BusinessFramework.Tests/KsWare.Presentation.BusinessFramework.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project Sdk="Microsoft.NET.Sdk">
33
<PropertyGroup>
4-
<TargetFrameworks>net5.0-windows;netcoreapp3.1;net45</TargetFrameworks>
4+
<TargetFrameworks>net6.0-windows;net5.0-windows;netcoreapp3.1;net452</TargetFrameworks>
55
<IsPackable>false</IsPackable>
66
<ApplicationIcon />
77
<OutputType>Library</OutputType>

src/KsWare.Presentation.BusinessFramework/KsWare.Presentation.BusinessFramework.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project Sdk="Microsoft.NET.Sdk">
33
<PropertyGroup>
4-
<TargetFrameworks>net5.0-windows;netcoreapp3.1;net45</TargetFrameworks>
4+
<TargetFrameworks>net6.0-windows;net5.0-windows;netcoreapp3.1;net452</TargetFrameworks>
55
<OutputType>Library</OutputType>
66
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
77
<UseWPF>true</UseWPF>
@@ -13,7 +13,7 @@
1313
</PropertyGroup>
1414
<PropertyGroup>
1515
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
16-
<Copyright>Copyright © 2002-2021 by KsWare. All rights reserved.</Copyright>
16+
<Copyright>Copyright © 2002-2022 by KsWare. All rights reserved.</Copyright>
1717
<Product>Presentation Framework</Product>
1818
<Company>KsWare</Company>
1919
<Authors>SchreinerK</Authors>

src/KsWare.Presentation.BusyManager.Tests/KsWare.Presentation.BusyManager.TestApp.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project Sdk="Microsoft.NET.Sdk">
33
<PropertyGroup>
4-
<TargetFramework>net5.0-windows</TargetFramework>
4+
<TargetFramework>net6.0-windows</TargetFramework>
55
<OutputType>WinExe</OutputType>
66
<RootNamespace>KsWare.Presentation.BusyManagerTestApp</RootNamespace>
77
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>

src/KsWare.Presentation.Core.Tests/KsWare.Presentation.Core.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project Sdk="Microsoft.NET.Sdk">
33
<PropertyGroup>
4-
<TargetFrameworks>net5.0-windows;netcoreapp3.1;net45</TargetFrameworks>
4+
<TargetFrameworks>net6.0-windows;net5.0-windows;netcoreapp3.1;net452</TargetFrameworks>
55
<IsPackable>false</IsPackable>
66
<SignAssembly>true</SignAssembly>
77
<DelaySign>false</DelaySign>

src/KsWare.Presentation.Core/(Common Interfaces)/IHierarchical.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,8 @@ public interface IHierarchical<T> {
3838
/// <value>The member path.</value>
3939
string MemberPath{get;}
4040
}
41+
42+
public interface IHaveParent {
43+
object Parent { get; set; }
44+
}
4145
}

src/KsWare.Presentation.Core/(Utils)/(WeakEvents)/EventManager.cs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,23 @@ public static void Raise<TEventHandler, TEventArgs>(Lazy<EventSourceStore> lazyE
236236
wes.Raise<TEventArgs>(e);
237237
}
238238

239+
/// <summary> Raises the specified lazy weak event.
240+
/// </summary>
241+
/// <typeparam name="TEventHandler">The type of the event handler (a delegate type)</typeparam>
242+
/// <typeparam name="TEventArgs">The type of the event arguments.</typeparam>
243+
/// <param name="lazyEventSourceStore">The store with the lazy weak event sources.</param>
244+
/// <param name="eventName">Name of the event.</param>
245+
/// <param name="lazyEventArgs">The lazy instance containing the event data.</param>
246+
/// <example><code>WeakEventManager.Raise&gt;EventHandler,EventArgs>(LazyWeakEventStore,"MyPropertyChangedEvent", EventArgs.Empty);</code></example>
247+
public static void Raise<TEventHandler, TEventArgs>(Lazy<EventSourceStore> lazyEventSourceStore, string eventName, Lazy<TEventArgs> lazyEventArgs) where TEventArgs : EventArgs {
248+
if (!lazyEventSourceStore.IsValueCreated) return;
249+
var weakEventPropertyStore = lazyEventSourceStore.Value;
250+
if (weakEventPropertyStore.Count == 0) return;
251+
var wes = (EventSource<TEventHandler>)weakEventPropertyStore.TryGet<TEventHandler>(eventName);
252+
if (wes == null /*No one has accessed the event property*/) return;
253+
wes.Raise<TEventArgs>(lazyEventArgs.Value);
254+
}
255+
239256
// private static void RaiseInternal(object source, string eventName, object[] args) {
240257
// Interlocked.Increment(ref StatisticsːRaiseːInvocationCount);
241258
// var raise = new List<WeakEventHandle>();

src/KsWare.Presentation.Core/KsWare.Presentation.Core.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project Sdk="Microsoft.NET.Sdk">
33
<PropertyGroup>
4-
<TargetFrameworks>net5.0-windows;netcoreapp3.1;net45</TargetFrameworks>
4+
<TargetFrameworks>net6.0-windows;net5.0-windows;netcoreapp3.1;net452</TargetFrameworks>
55
<OutputType>Library</OutputType>
66
<RootNamespace>KsWare.Presentation</RootNamespace>
77
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
@@ -21,7 +21,7 @@
2121
</PropertyGroup>
2222
<PropertyGroup>
2323
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
24-
<Copyright>Copyright © 2002-2021 by KsWare. All rights reserved.</Copyright>
24+
<Copyright>Copyright © 2002-2022 by KsWare. All rights reserved.</Copyright>
2525
<Product>Presentation Framework</Product>
2626
<Company>KsWare</Company>
2727
<Authors>SchreinerK</Authors>
@@ -53,7 +53,7 @@
5353
<None Include="%28.docs%29\notes.txt" />
5454
</ItemGroup>
5555
<ItemGroup>
56-
<PackageReference Include="JetBrains.Annotations" Version="2021.2.0" />
56+
<PackageReference Include="JetBrains.Annotations" Version="2021.3.0" />
5757
</ItemGroup>
5858
<ItemGroup>
5959
<Compile Remove="(Attributes)\ResharperAnotations.cs" />
@@ -66,6 +66,6 @@
6666
</None>
6767
</ItemGroup>
6868
<ItemGroup>
69-
<Reference Include="Microsoft.CSharp" Condition=" $(TargetFramework) == 'net45'" />
69+
<Reference Include="Microsoft.CSharp" Condition=" $(TargetFramework) == 'net452'" />
7070
</ItemGroup>
7171
</Project>

0 commit comments

Comments
 (0)