Skip to content

Commit 477d54a

Browse files
authored
Merge pull request #24 from LavrentyAfanasiev/master
port to core 3.1. myget workflow
2 parents 338975a + 9a8331a commit 477d54a

File tree

13 files changed

+137
-95
lines changed

13 files changed

+137
-95
lines changed

.github/workflows/build.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Build on branches push
2+
on:
3+
push:
4+
branches:
5+
- "*"
6+
7+
jobs:
8+
build:
9+
runs-on: windows-latest
10+
steps:
11+
- uses: actions/checkout@master
12+
- uses: actions/setup-dotnet@v1
13+
with:
14+
dotnet-version: '3.1.100' # SDK Version to use.
15+
- run: dotnet build WPF.Tools.sln
16+
- run: dotnet test WPF.Tools.sln
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Publish Ui.Wpf.Common
2+
on:
3+
push:
4+
tags:
5+
- 'Ui.Wpf.Common/v[0-9]+.[0-9]+.[0-9]+'
6+
7+
jobs:
8+
publish:
9+
runs-on: windows-latest
10+
steps:
11+
- name: Set env
12+
run: echo "##[set-env name=RELEASE_VERSION;]$($env:GITHUB_REF.substring(25))"
13+
- name: print version
14+
run: echo $env:RELEASE_VERSION
15+
- uses: actions/checkout@master
16+
- uses: actions/setup-dotnet@v1
17+
with:
18+
dotnet-version: '3.1.100' # SDK Version to use.
19+
- run: dotnet pack ./Ui.Wpf.Common/Ui.Wpf.Common.csproj -c Release -o NuGetPackages /p:Version=$env:RELEASE_VERSION
20+
- name: Push to feeds
21+
env:
22+
MYGET_SOURCE: https://www.myget.org/F/wpftools/api/v3/index.json
23+
run: |
24+
dotnet nuget push ./NuGetPackages/Ui.Wpf.Common.$env:RELEASE_VERSION.nupkg -k ${{ secrets.MYGET_APIKEY }} -s $env:MYGET_SOURCE
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Publish Ui.Wpf.KanbanControl
2+
on:
3+
push:
4+
tags:
5+
- 'Ui.Wpf.KanbanControl/v[0-9]+.[0-9]+.[0-9]+'
6+
7+
jobs:
8+
publish:
9+
runs-on: windows-latest
10+
steps:
11+
- name: Set env
12+
run: echo "##[set-env name=RELEASE_VERSION;]$($env:GITHUB_REF.substring(32))"
13+
- name: print version
14+
run: echo $env:RELEASE_VERSION
15+
- uses: actions/checkout@master
16+
- uses: actions/setup-dotnet@v1
17+
with:
18+
dotnet-version: '3.1.100' # SDK Version to use.
19+
- run: dotnet pack ./Ui.Wpf.KanbanControl/Ui.Wpf.KanbanControl.csproj -c Release -o NuGetPackages /p:Version=$env:RELEASE_VERSION
20+
- name: Push to feeds
21+
env:
22+
MYGET_SOURCE: https://www.myget.org/F/wpftools/api/v3/index.json
23+
run: |
24+
dotnet nuget push ./NuGetPackages/Ui.Wpf.KanbanControl.$env:RELEASE_VERSION.nupkg -k ${{ secrets.MYGET_APIKEY }} -s $env:MYGET_SOURCE

Tests/Ui.Wpf.KanbanControl.Tests/Ui.Wpf.KanbanControl.Tests.csproj

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,25 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
22
<PropertyGroup>
33
<LanguageTargets>$(MSBuildToolsPath)\Microsoft.CSharp.targets</LanguageTargets>
4-
<TargetFramework>net462</TargetFramework>
4+
<TargetFramework>netcoreapp3.1</TargetFramework>
55
<OutputType>library</OutputType>
66
<RootNamespace>Ui.Wpf.KanbanControl.Tests</RootNamespace>
77
<AssemblyName>Ui.Wpf.KanbanControl.Tests</AssemblyName>
88
<AssemblyTitle>Ui.Wpf.KanbanControl.Tests</AssemblyTitle>
99
<AssemblyProduct>Ui.Wpf.KanbanControl.Tests</AssemblyProduct>
1010
<AssemblyCopyright>Copyright © 2019</AssemblyCopyright>
11+
<UseWpf>true</UseWpf>
1112

1213
<IsPackable>false</IsPackable>
1314
</PropertyGroup>
1415

1516
<ItemGroup>
16-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
17+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
1718
<PackageReference Include="NUnit" Version="3.12.0" />
18-
<PackageReference Include="NUnit3TestAdapter" Version="3.15.1" />
19+
<PackageReference Include="NUnit3TestAdapter" Version="3.16.1">
20+
<PrivateAssets>all</PrivateAssets>
21+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
22+
</PackageReference>
1923
</ItemGroup>
2024

2125
<ItemGroup>

Ui.Wpf.Common/MainWindow.xaml.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ public MainWindow(IShell shell)
1212
Shell = shell;
1313
DataContext = Shell;
1414
InitializeComponent();
15+
1516
}
1617

1718
private IShell Shell { get; }

Ui.Wpf.Common/Shell.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ public async Task<TResult> ShowFlyoutView<TResult>(Func<ILifetimeScope, IView> v
208208

209209
if (viewOld != null)
210210
{
211-
(viewOld.ViewModel as IActivatableViewModel)?.Activate(viewRequest);
211+
(viewOld.ViewModel as Ui.Wpf.Common.ViewModels.IActivatableViewModel)?.Activate(viewRequest);
212212
return default(TResult);
213213
}
214214
}
@@ -274,7 +274,7 @@ public async Task<TResult> ShowFlyoutView<TResult>(Func<ILifetimeScope, IView> v
274274

275275
FlyoutsControl.Items.Add(flyout);
276276
InitializeView(view, viewRequest);
277-
(view.ViewModel as IActivatableViewModel)?.Activate(viewRequest);
277+
(view.ViewModel as Ui.Wpf.Common.ViewModels.IActivatableViewModel)?.Activate(viewRequest);
278278

279279
await closedObservable.FirstAsync();
280280

@@ -335,7 +335,7 @@ public Task<TResult> ShowChildWindowView<TResult>(Func<ILifetimeScope, IView> vi
335335

336336
if (viewOld != null)
337337
{
338-
(viewOld.ViewModel as IActivatableViewModel)?.Activate(viewRequest);
338+
(viewOld.ViewModel as Ui.Wpf.Common.ViewModels.IActivatableViewModel)?.Activate(viewRequest);
339339
return Task.FromResult(default(TResult));
340340
}
341341
}
@@ -345,7 +345,7 @@ public Task<TResult> ShowChildWindowView<TResult>(Func<ILifetimeScope, IView> vi
345345
view.Configure(options);
346346

347347
InitializeView(view, viewRequest);
348-
(view.ViewModel as IActivatableViewModel)?.Activate(viewRequest);
348+
(view.ViewModel as Ui.Wpf.Common.ViewModels.IActivatableViewModel)?.Activate(viewRequest);
349349

350350
options = options ?? new UiShowChildWindowOptions();
351351

@@ -533,7 +533,7 @@ private static void ActivateContent(LayoutContent layoutContent, ViewRequest vie
533533
{
534534
layoutContent.IsActive = true;
535535
if (layoutContent.Content is IView view &&
536-
view.ViewModel is IActivatableViewModel activatableViewModel)
536+
view.ViewModel is Ui.Wpf.Common.ViewModels.IActivatableViewModel activatableViewModel)
537537
{
538538
activatableViewModel.Activate(viewRequest);
539539
}

Ui.Wpf.Common/Ui.Wpf.Common.csproj

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,32 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
22
<PropertyGroup>
3-
<LanguageTargets>$(MSBuildToolsPath)\Microsoft.CSharp.targets</LanguageTargets>
4-
<TargetFramework>net462</TargetFramework>
3+
<TargetFramework>netcoreapp3.1</TargetFramework>
54
<OutputType>library</OutputType>
65
<RootNamespace>Ui.Wpf.Common</RootNamespace>
76
<AssemblyName>Ui.Wpf.Common</AssemblyName>
87
<AssemblyTitle>Ui.Wpf.Common</AssemblyTitle>
98
<AssemblyProduct>Ui.Wpf.Common</AssemblyProduct>
109
<AssemblyCopyright>Copyright © 2019</AssemblyCopyright>
10+
<UseWpf>true</UseWpf>
1111
</PropertyGroup>
1212

13-
<ItemGroup>
14-
<Reference Include="PresentationCore" />
15-
<Reference Include="PresentationFramework" />
16-
<Reference Include="System.Xaml" />
17-
<Reference Include="WindowsBase" />
18-
</ItemGroup>
19-
2013
<ItemGroup>
2114
<EmbeddedResource Update="Properties\Resources.resx" Generator="ResXFileCodeGenerator" LastGenOutput="Resources.Designer.cs" />
2215
<Compile Update="Properties\Resources.Designer.cs" DesignTime="True" AutoGen="True" DependentUpon="Resources.resx" />
2316

2417
<None Update="Properties\Settings.settings" Generator="SettingsSingleFileGenerator" LastGenOutput="Settings.Designer.cs" />
2518
<Compile Update="Properties\Settings.Designer.cs" DesignTime="True" AutoGen="True" DependentUpon="Settings.settings" />
2619

27-
<Page Include="**\*.xaml" SubType="Designer" Generator="MSBuild:UpdateDesignTimeXaml" />
2820
<Compile Update="**\*.xaml.cs" SubType="Code" DependentUpon="%(Filename)" />
2921
</ItemGroup>
3022

3123
<ItemGroup>
3224
<PackageReference Include="FluentValidation" Version="8.4.0" />
3325
<PackageReference Include="Autofac" Version="4.9.4" />
34-
<PackageReference Include="Extended.Wpf.Toolkit" Version="3.5.0" />
35-
<PackageReference Include="MahApps.Metro" Version="1.6.5" />
36-
<PackageReference Include="MahApps.Metro.SimpleChildWindow" Version="1.5.0" />
37-
<PackageReference Include="ReactiveUI.Fody" Version="9.22.1" />
38-
<PackageReference Include="ReactiveUI.WPF" Version="9.22.1" />
26+
<PackageReference Include="MahApps.Metro" Version="2.0.0-alpha0660" />
27+
<PackageReference Include="MahApps.Metro.SimpleChildWindow" Version="2.0.0-alpha0032" />
28+
<PackageReference Include="MiqM.Xceed.Wpf.Toolkit.NETCore" Version="3.5.1.3" />
29+
<PackageReference Include="ReactiveUI.Fody" Version="11.2.1" />
30+
<PackageReference Include="ReactiveUI.WPF" Version="11.2.1" />
3931
</ItemGroup>
4032
</Project>

Ui.Wpf.Demo/App.xaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@
77
<!-- MahApps.Metro resource dictionaries. Make sure that all file names are Case Sensitive! -->
88
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
99
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
10-
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colors.xaml" />
10+
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/VS/Colors.xaml" />
1111
<!-- Accent and AppTheme setting -->
12-
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/Blue.xaml" />
13-
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseLight.xaml" />
12+
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Themes/Light.Blue.xaml"/>
1413
</ResourceDictionary.MergedDictionaries>
1514
</ResourceDictionary>
1615
</Application.Resources>

Ui.Wpf.Demo/Properties/Resources.Designer.cs

Lines changed: 18 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Ui.Wpf.Demo/Properties/Settings.Designer.cs

Lines changed: 9 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)