Skip to content

Commit e93a31a

Browse files
author
Marcel Sandermann
committed
Merge remote-tracking branch 'upstream/dev' into main
2 parents 792be03 + 4ce2091 commit e93a31a

File tree

10 files changed

+275
-119
lines changed

10 files changed

+275
-119
lines changed

.build/BuildToolkit.ps1

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# Tool Versions
22
$NunitVersion = "3.12.0";
3-
$OpenCoverVersion = "4.7.922";
4-
$DocFxVersion = "2.56.2";
5-
$ReportGeneratorVersion = "4.8.7";
3+
$OpenCoverVersion = "4.7.1221";
4+
$DocFxVersion = "2.58.4";
5+
$ReportGeneratorVersion = "4.8.13";
6+
$OpenCoverToCoberturaVersion = "0.3.4";
67

78
# Folder Pathes
89
$RootPath = $MyInvocation.PSScriptRoot;
@@ -18,6 +19,7 @@ $DocumentationArtifcacts = "$ArtifactsDir\Documentation";
1819
# Tests
1920
$NunitReportsDir = "$ArtifactsDir\Tests";
2021
$OpenCoverReportsDir = "$ArtifactsDir\Tests"
22+
$CoberturaReportsDir = "$ArtifactsDir\Tests"
2123

2224
# Nuget
2325
$NugetConfig = "$RootPath\NuGet.Config";
@@ -34,6 +36,7 @@ $global:OpenCoverCli = "$BuildTools\OpenCover.$OpenCoverVersion\tools\OpenCover.
3436
$global:NunitCli = "$BuildTools\NUnit.ConsoleRunner.$NunitVersion\tools\nunit3-console.exe";
3537
$global:ReportGeneratorCli = "$BuildTools\ReportGenerator.$ReportGeneratorVersion\tools\net47\ReportGenerator.exe";
3638
$global:DocFxCli = "$BuildTools\docfx.console.$DocFxVersion\tools\docfx.exe";
39+
$global:OpenCoverToCoberturaCli = "$BuildTools\OpenCoverToCoberturaConverter.$OpenCoverToCoberturaVersion\tools\OpenCoverToCoberturaConverter.exe";
3740

3841
# Git
3942
$global:GitCommitHash = "";
@@ -132,6 +135,7 @@ function Invoke-Initialize([string]$Version = "1.0.0", [bool]$Cleanup = $False)
132135
Write-Variable "NUnitCli" $global:NUnitCli;
133136
Write-Variable "ReportGeneratorCli" $global:ReportGeneratorCli;
134137
Write-Variable "DocFxCli" $global:DocFxCli;
138+
Write-Variable "OpenCoverToCoberturaCli" $global:OpenCoverToCoberturaCli;
135139
Write-Variable "GitCli" $global:GitCli;
136140
Write-Variable "GitCommitHash" $global:GitCommitHash;
137141

@@ -269,6 +273,10 @@ function Invoke-CoverTests($SearchPath = $RootPath, $SearchFilter = "*.csproj",
269273
Install-Tool "OpenCover" $OpenCoverVersion $global:OpenCoverCli;
270274
}
271275

276+
if (-not (Test-Path $global:OpenCoverToCoberturaCli)) {
277+
Install-Tool "OpenCoverToCoberturaConverter" $OpenCoverToCoberturaVersion $global:OpenCoverToCoberturaCli;
278+
}
279+
272280
CreateFolderIfNotExists $OpenCoverReportsDir;
273281
CreateFolderIfNotExists $NunitReportsDir;
274282

@@ -308,6 +316,7 @@ function Invoke-CoverTests($SearchPath = $RootPath, $SearchFilter = "*.csproj",
308316

309317
$nunitXml = ($NunitReportsDir + "\$projectName.TestResult.xml");
310318
$openCoverXml = ($OpenCoverReportsDir + "\$projectName.OpenCover.xml");
319+
$coberturaXml = ($CoberturaReportsDir + "\$projectName.Cobertura.xml");
311320

312321
if ($isNetCore) {
313322
$targetArgs = '"test -v ' + $env:MORYX_TEST_VERBOSITY + ' -c ' + $env:MORYX_BUILD_CONFIG + ' ' + $testProject + '"';
@@ -346,6 +355,9 @@ function Invoke-CoverTests($SearchPath = $RootPath, $SearchFilter = "*.csproj",
346355
Write-Host-Error "Nunit exited with $errorText for $projectName";
347356
Invoke-ExitCodeCheck $exitCode;
348357
}
358+
359+
& $global:OpenCoverToCoberturaCli -input:$openCoverXml -output:$coberturaXml -sources:$rootPath
360+
Invoke-ExitCodeCheck $LastExitCode;
349361
}
350362
}
351363

@@ -655,7 +667,7 @@ function CreateFolderIfNotExists([string]$Folder) {
655667
}
656668

657669
function CopyAndReplaceFolder($SourceDir, $TargetDir) {
658-
Write-Host-Info "Copy $TargetDir to $SourceDir!"
670+
Write-Host-Info "Copy $SourceDir to $TargetDir!"
659671
# Remove old folder if exists
660672
if (Test-Path $TargetDir) {
661673
Write-Host "Target path already exists, removing ..." -ForegroundColor Yellow
@@ -665,4 +677,4 @@ function CopyAndReplaceFolder($SourceDir, $TargetDir) {
665677
# Copy to target path
666678
Write-Host "Copy from $SourceDir to $TargetDir ..." -ForegroundColor Green
667679
Copy-Item -Path $SourceDir -Recurse -Destination $TargetDir -Container
668-
}
680+
}

.build/Global.DotSettings

Lines changed: 0 additions & 12 deletions
This file was deleted.

.github/workflows/build-and-test.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,21 @@ name: CI
33
# Controls when the action will run. Triggers the workflow on push or pull request
44
on:
55
push:
6-
branches:
6+
branches:
77
- dev
8+
- future
89
tags:
910
- v[0-9]+.[0-9]+.[0-9]+ # Matches all semantic versioning tags with major, minor, patch
1011
pull_request:
11-
branches:
12+
branches:
1213
- dev
14+
- future
1315

1416
env:
1517
MORYX_OPTIMIZE_CODE: "false"
1618
MORYX_BUILD_CONFIG: "Release"
1719
MORYX_BUILDNUMBER: ${{github.run_number}}
18-
dotnet_sdk_version: '5.0.100'
20+
dotnet_sdk_version: '5.0.403'
1921
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
2022

2123
jobs:
@@ -112,15 +114,24 @@ jobs:
112114
name: packages
113115
path: artifacts/Packages/
114116

115-
- name: Publish on MyGet
116-
if: ${{ startsWith(github.ref, 'refs/heads/') }} # Normal branches are published to myget
117+
- name: Publish on MyGet-CI
118+
if: ${{ github.ref == 'refs/heads/dev' }} # dev branche is published to myget moryx
117119
shell: pwsh
118120
env:
119121
MORYX_NUGET_APIKEY: ${{secrets.MYGET_TOKEN}}
120122
MORYX_PACKAGE_TARGET: "https://www.myget.org/F/moryx/api/v2/package"
121123
MORYX_PACKAGE_TARGET_V3: "https://www.myget.org/F/moryx/api/v3/index.json"
122124
run: ./Build.ps1 -Publish
123125

126+
- name: Publish on MyGet-Future
127+
if: ${{ github.ref == 'refs/heads/future' }} # Future branch is published to myget moryx-future
128+
shell: pwsh
129+
env:
130+
MORYX_NUGET_APIKEY: ${{secrets.MYGET_TOKEN}}
131+
MORYX_PACKAGE_TARGET: "https://www.myget.org/F/moryx-future/api/v2/package"
132+
MORYX_PACKAGE_TARGET_V3: "https://www.myget.org/F/moryx-future/api/v3/index.json"
133+
run: ./Build.ps1 -Publish
134+
124135
- name: Publish on NuGet
125136
if: ${{ startsWith(github.ref, 'refs/tags/v') }} # Version Tags are published to nuget
126137
shell: pwsh

Directory.Build.targets

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
<PackageReference Update="Caliburn.Micro" Version="3.2.0" />
1919
<PackageReference Update="Castle.Windsor" Version="5.0.1" />
2020
<PackageReference Update="CommandLineParser" Version="2.8.0" />
21-
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="16.8.0" />
22-
<PackageReference Update="Moq" Version="4.15.1" />
23-
<PackageReference Update="NUnit" Version="3.12.0" />
24-
<PackageReference Update="NUnit3TestAdapter" Version="3.17.0" />
21+
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="16.11.0" />
22+
<PackageReference Update="Moq" Version="4.16.1" />
23+
<PackageReference Update="NUnit" Version="3.13.2" />
24+
<PackageReference Update="NUnit3TestAdapter" Version="4.1.0" />
2525

2626
<!--Platform dependencies-->
2727
<PackageReference Update="Moryx" Version="$(MoryxCoreVersion)" />

README.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,13 @@ The **MORYX ClientFramework** is the foundation for MORYX WPF desktop frontends.
3232

3333
If you want to start developing with or for MORYX, the easiest way is our [template repository](https://github.com/PHOENIXCONTACT/MORYX-Template). It comes with two empty solutions, the necessary package feeds and preinstalled empty MORYX runtime. Add projects and packages to backend and frontend solutions depending on your specific requirements. Install stable releases via Nuget; development releases are available via MyGet.
3434

35-
| Package Name | Release (NuGet) | CI (MyGet) |
36-
|--------------|-----------------|------------|
37-
| `Moryx.WpfToolkit` | [![NuGet](https://img.shields.io/nuget/v/Moryx.WpfToolkit.svg)](https://www.nuget.org/packages/Moryx.WpfToolkit/) | [![MyGet](https://img.shields.io/myget/moryx/vpre/Moryx.WpfToolkit)](https://www.myget.org/feed/moryx/package/nuget/Moryx.WpfToolkit) |
38-
| `Moryx.Controls` | [![NuGet](https://img.shields.io/nuget/v/Moryx.Controls.svg)](https://www.nuget.org/packages/Moryx.Controls/) | [![MyGet](https://img.shields.io/myget/moryx/vpre/Moryx.Controls)](https://www.myget.org/feed/moryx/package/nuget/Moryx.Controls) |
39-
| `Moryx.ClientFramework` | [![NuGet](https://img.shields.io/nuget/v/Moryx.ClientFramework.svg)](https://www.nuget.org/packages/Moryx.ClientFramework/) | [![MyGet](https://img.shields.io/myget/moryx/vpre/Moryx.ClientFramework)](https://www.myget.org/feed/moryx/package/nuget/Moryx.ClientFramework) |
40-
| `Moryx.ClientFramework.Configurator` | [![NuGet](https://img.shields.io/nuget/v/Moryx.ClientFramework.Configurator.svg)](https://www.nuget.org/packages/Moryx.ClientFramework.Configurator/) | [![MyGet](https://img.shields.io/myget/moryx/vpre/Moryx.ClientFramework.Configurator)](https://www.myget.org/feed/moryx/package/nuget/Moryx.ClientFramework.Configurator) |
41-
| `Moryx.ClientFramework.Kernel` | [![NuGet](https://img.shields.io/nuget/v/Moryx.ClientFramework.Kernel.svg)](https://www.nuget.org/packages/Moryx.ClientFramework.Kernel/) | [![MyGet](https://img.shields.io/myget/moryx/vpre/Moryx.ClientFramework.Kernel)](https://www.myget.org/feed/moryx/package/nuget/Moryx.ClientFramework.Kernel) |
42-
| `Moryx.ClientFramework.SimpleShell` | [![NuGet](https://img.shields.io/nuget/v/Moryx.ClientFramework.SimpleShell.svg)](https://www.nuget.org/packages/Moryx.ClientFramework.SimpleShell/) | [![MyGet](https://img.shields.io/myget/moryx/vpre/Moryx.ClientFramework.SimpleShell)](https://www.myget.org/feed/moryx/package/nuget/Moryx.ClientFramework.SimpleShell) |
43-
| `Moryx.Tools.WcfClient.UI.Viewer` | [![NuGet](https://img.shields.io/nuget/v/Moryx.Tools.WcfClient.UI.Viewer.svg)](https://www.nuget.org/packages/Moryx.Tools.WcfClient.UI.Viewer/) | [![MyGet](https://img.shields.io/myget/moryx/vpre/Moryx.Tools.WcfClient.UI.Viewer)](https://www.myget.org/feed/moryx/package/nuget/Moryx.Tools.WcfClient.UI.Viewer) |
35+
| Package Name | Release (NuGet) | CI (MyGet) | Future (MyGet) |
36+
|--------------|-----------------|------------|----------------|
37+
| `Moryx.WpfToolkit` | [![NuGet](https://img.shields.io/nuget/v/Moryx.WpfToolkit.svg)](https://www.nuget.org/packages/Moryx.WpfToolkit/) | [![MyGet](https://img.shields.io/myget/moryx/vpre/Moryx.WpfToolkit)](https://www.myget.org/feed/moryx/package/nuget/Moryx.WpfToolkit) | [![MyGet-Release](https://img.shields.io/myget/moryx-future/vpre/Moryx.WpfToolkit)](https://www.myget.org/feed/moryx-future/package/nuget/Moryx.WpfToolkit) |
38+
| `Moryx.Controls` | [![NuGet](https://img.shields.io/nuget/v/Moryx.Controls.svg)](https://www.nuget.org/packages/Moryx.Controls/) | [![MyGet](https://img.shields.io/myget/moryx/vpre/Moryx.Controls)](https://www.myget.org/feed/moryx/package/nuget/Moryx.Controls) | [![MyGet-Release](https://img.shields.io/myget/moryx-future/vpre/Moryx.Controls)](https://www.myget.org/feed/moryx-future/package/nuget/Moryx.Controls) |
39+
| `Moryx.ClientFramework` | [![NuGet](https://img.shields.io/nuget/v/Moryx.ClientFramework.svg)](https://www.nuget.org/packages/Moryx.ClientFramework/) | [![MyGet](https://img.shields.io/myget/moryx/vpre/Moryx.ClientFramework)](https://www.myget.org/feed/moryx/package/nuget/Moryx.ClientFramework) | [![MyGet-Release](https://img.shields.io/myget/moryx-future/vpre/Moryx.ClientFramework)](https://www.myget.org/feed/moryx-future/package/nuget/Moryx.ClientFramework) |
40+
| `Moryx.ClientFramework.Kernel` | [![NuGet](https://img.shields.io/nuget/v/Moryx.ClientFramework.Kernel.svg)](https://www.nuget.org/packages/Moryx.ClientFramework.Kernel/) | [![MyGet](https://img.shields.io/myget/moryx/vpre/Moryx.ClientFramework.Kernel)](https://www.myget.org/feed/moryx/package/nuget/Moryx.ClientFramework.Kernel) | [![MyGet-Release](https://img.shields.io/myget/moryx-future/vpre/Moryx.ClientFramework.Kernel)](https://www.myget.org/feed/moryx-future/package/nuget/Moryx.ClientFramework.Kernel) |
41+
| `Moryx.ClientFramework.Configurator` | [![NuGet](https://img.shields.io/nuget/v/Moryx.ClientFramework.Configurator.svg)](https://www.nuget.org/packages/Moryx.ClientFramework.Configurator/) | [![MyGet](https://img.shields.io/myget/moryx/vpre/Moryx.ClientFramework.Configurator)](https://www.myget.org/feed/moryx/package/nuget/Moryx.ClientFramework.Configurator) | [![MyGet-Release](https://img.shields.io/myget/moryx-future/vpre/Moryx.ClientFramework.Configurator)](https://www.myget.org/feed/moryx-future/package/nuget/Moryx.ClientFramework.Configurator) |
42+
| `Moryx.ClientFramework.SimpleShell` | [![NuGet](https://img.shields.io/nuget/v/Moryx.ClientFramework.SimpleShell.svg)](https://www.nuget.org/packages/Moryx.ClientFramework.SimpleShell/) | [![MyGet](https://img.shields.io/myget/moryx/vpre/Moryx.ClientFramework.SimpleShell)](https://www.myget.org/feed/moryx/package/nuget/Moryx.ClientFramework.SimpleShell) | [![MyGet-Release](https://img.shields.io/myget/moryx-future/vpre/Moryx.ClientFramework.SimpleShell)](https://www.myget.org/feed/moryx-future/package/nuget/Moryx.ClientFramework.SimpleShell) |
43+
| `Moryx.ClientFramework.Wcf` | [![NuGet](https://img.shields.io/nuget/v/Moryx.ClientFramework.Wcf.svg)](https://www.nuget.org/packages/Moryx.ClientFramework.Wcf/) | [![MyGet](https://img.shields.io/myget/moryx/vpre/Moryx.ClientFramework.Wcf)](https://www.myget.org/feed/moryx/package/nuget/Moryx.ClientFramework.Wcf) | [![MyGet-Release](https://img.shields.io/myget/moryx-future/vpre/Moryx.ClientFramework.Wcf)](https://www.myget.org/feed/moryx-future/package/nuget/Moryx.ClientFramework.Wcf) |
44+
| `Moryx.Tools.WcfClient.UI.Viewer` | [![NuGet](https://img.shields.io/nuget/v/Moryx.Tools.WcfClient.UI.Viewer.svg)](https://www.nuget.org/packages/Moryx.Tools.WcfClient.UI.Viewer/) | [![MyGet](https://img.shields.io/myget/moryx/vpre/Moryx.Tools.WcfClient.UI.Viewer)](https://www.myget.org/feed/moryx/package/nuget/Moryx.Tools.WcfClient.UI.Viewer) | [![MyGet-Release](https://img.shields.io/myget/moryx-future/vpre/Moryx.Tools.WcfClient.UI.Viewer)](https://www.myget.org/feed/moryx-future/package/nuget/Moryx.Tools.WcfClient.UI.Viewer) |

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.1.0
1+
3.2.0

src/Moryx.Controls.Demo/ViewModels/EntryEditorViewModel.cs

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright (c) 2020, Phoenix Contact GmbH & Co. KG
22
// Licensed under the Apache License, Version 2.0
33

4+
using System;
45
using System.Collections.Generic;
56
using System.Windows;
67
using System.Windows.Input;
@@ -13,12 +14,30 @@ namespace Moryx.Controls.Demo.ViewModels
1314
{
1415
public class EntryEditorViewModel : Screen
1516
{
17+
private bool _isEditMode;
18+
1619
public override string DisplayName => "EntryEditor";
1720

1821
public EntryViewModel EntryViewModels { get; }
1922

2023
public ICommand ShowExceptionCommand { get; }
2124

25+
public ICommand BeginEditCmd { get; }
26+
27+
public ICommand EndEditCmd { get; }
28+
29+
public ICommand CancelEditCmd { get; }
30+
31+
public bool IsEditMode
32+
{
33+
get { return _isEditMode; }
34+
private set
35+
{
36+
_isEditMode = value;
37+
NotifyOfPropertyChange();
38+
}
39+
}
40+
2241
public EntryEditorViewModel()
2342
{
2443
var entryModel = new EntryClass
@@ -62,6 +81,26 @@ public EntryEditorViewModel()
6281
EntryViewModels = new EntryViewModel(entry);
6382

6483
ShowExceptionCommand = new RelayCommand(ShowException);
84+
BeginEditCmd = new RelayCommand(BeginEdit);
85+
EndEditCmd = new RelayCommand(EndEdit);
86+
CancelEditCmd = new RelayCommand(CancelEdit);
87+
}
88+
89+
private void EndEdit(object obj)
90+
{
91+
throw new NotImplementedException();
92+
}
93+
94+
private void CancelEdit(object obj)
95+
{
96+
IsEditMode = false;
97+
EntryViewModels.CancelEdit();
98+
}
99+
100+
private void BeginEdit(object obj)
101+
{
102+
IsEditMode = true;
103+
EntryViewModels.BeginEdit();
65104
}
66105

67106
public void ShowException(object parameter)

src/Moryx.Controls.Demo/Views/EntryEditorView.xaml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,22 @@
1111
xmlns:controls="clr-namespace:Moryx.Controls;assembly=Moryx.Controls"
1212
mc:Ignorable="d"
1313
d:DataContext="{d:DesignInstance viewModels:EntryEditorViewModel}">
14-
<controls:EntryEditor Margin="20" RootEntry="{Binding EntryViewModels}" IsEditMode="True" ShowExceptionCommand="{Binding ShowExceptionCommand}" />
14+
<DockPanel LastChildFill="True">
15+
<StackPanel DockPanel.Dock="Bottom" Orientation="Horizontal" Margin="0,5,5,5" HorizontalAlignment="Right">
16+
<EddieButton Icon="{CommonShape Pencil}"
17+
Command="{Binding BeginEditCmd}"
18+
Content="Begin Edit"/>
19+
<EddieButton Icon="{CommonShape Cross}"
20+
Margin="5,0,0,0"
21+
Command="{Binding CancelEditCmd}"
22+
Content="Cancel Edit"/>
23+
<EddieButton Icon="{CommonShape CheckMark}"
24+
Margin="5,0,0,0"
25+
Command="{Binding EndEditCmd}"
26+
Content="End Edit"/>
27+
</StackPanel>
28+
29+
<controls:EntryEditor Margin="20" DockPanel.Dock="Top" RootEntry="{Binding EntryViewModels}" IsEditMode="{Binding IsEditMode}"
30+
ShowExceptionCommand="{Binding ShowExceptionCommand}" />
31+
</DockPanel>
1532
</UserControl>

0 commit comments

Comments
 (0)