Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/dev' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
dbeuchler committed Jul 2, 2021
2 parents 04b4ccb + 52a9a24 commit a5232c9
Show file tree
Hide file tree
Showing 21 changed files with 130 additions and 136 deletions.
48 changes: 9 additions & 39 deletions .build/BuildToolkit.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ $NugetPackageArtifacts = "$ArtifactsDir\Packages";
. "$PSScriptRoot\Output.ps1";

# Define Tools
$global:MSBuildCli = "msbuild.exe";
$global:DotNetCli = "dotnet.exe";
$global:NugetCli = "nuget.exe";
$global:GitCli = "";
Expand Down Expand Up @@ -189,7 +188,7 @@ function Invoke-Build([string]$ProjectFile, [string]$Options = "") {
ForEach ($solution in (Get-ChildItem $RootPath -Filter "*.sln")) {
Write-Host "Restoring Nuget packages of $solution";

& $global:NugetCli restore $solution -Verbosity $env:MORYX_NUGET_VERBOSITY -configfile $NugetConfig;
& $global:DotNetCli restore $solution --verbosity $env:MORYX_NUGET_VERBOSITY --configfile $NugetConfig;
Invoke-ExitCodeCheck $LastExitCode;
}

Expand All @@ -198,9 +197,12 @@ function Invoke-Build([string]$ProjectFile, [string]$Options = "") {
$additonalOptions = ",$Options";
}

$params = "Configuration=$env:MORYX_BUILD_CONFIG,Optimize=" + (&{If($env:MORYX_OPTIMIZE_CODE -eq $True) {"true"} Else {"false"}}) + ",DebugSymbols=true$additonalOptions";
$msbuildParams = "Optimize=" + (&{If($env:MORYX_OPTIMIZE_CODE -eq $True) {"true"} Else {"false"}}) + ",DebugSymbols=true$additonalOptions";
$buildArgs = "--configuration", "$env:MORYX_BUILD_CONFIG";
$buildArgs += "--verbosity", $env:MORYX_BUILD_VERBOSITY;
$buildArgs += "-p:$msbuildParams"

& $global:MSBuildCli $ProjectFile /p:$params /verbosity:$env:MORYX_BUILD_VERBOSITY
& $global:DotNetCli build $ProjectFile @buildArgs
Invoke-ExitCodeCheck $LastExitCode;
}

Expand Down Expand Up @@ -353,7 +355,7 @@ function Get-CsprojIsNetCore($CsprojItem) {
if ($null -ne $sdkProject) {
# Read Target Framework
$targetFramework = $csprojContent.Project.PropertyGroup.TargetFramework;
if ($targetFramework -Match "netcoreapp") {
if ($targetFramework -Match "netcoreapp" -or $targetFramework -Match "net5.") {
# NETCore
return $true;
}
Expand Down Expand Up @@ -501,7 +503,7 @@ function Invoke-Publish {

foreach ($package in $packages) {
Write-Host "Pushing package $package"
& $global:NugetCli push $package $env:MORYX_NUGET_APIKEY -Source $env:MORYX_PACKAGE_TARGET -Verbosity $env:MORYX_NUGET_VERBOSITY -NoSymbols
& $global:DotNetCli nuget push $package --api-key $env:MORYX_NUGET_APIKEY --no-symbols true --skip-duplicate --source $env:MORYX_PACKAGE_TARGET
Invoke-ExitCodeCheck $LastExitCode;
}

Expand All @@ -513,7 +515,7 @@ function Invoke-Publish {

foreach ($symbolPackage in $symbolPackages) {
Write-Host "Pushing symbol (snupkg) $symbolPackage"
& $global:NugetCli push $symbolPackage $env:MORYX_NUGET_APIKEY -Source $env:MORYX_PACKAGE_TARGET_V3 -Verbosity $env:MORYX_NUGET_VERBOSITY
& $global:DotNetCli nuget push $symbolPackage --api-key $env:MORYX_NUGET_APIKEY --skip-duplicate --source $env:MORYX_PACKAGE_TARGET_V3
Invoke-ExitCodeCheck $LastExitCode;
}
}
Expand Down Expand Up @@ -645,38 +647,6 @@ function Set-AssemblyVersions([string[]]$Ignored = $(), [string]$SearchPath = $R
}
}

function Set-VsixManifestVersion([string]$VsixManifest) {
$file = Get-Childitem -Path $VsixManifest
if (-Not $file) {
Write-Host "VSIX Manifest: $VsixManifest was not found!"
exit 1;
}

[xml]$manifestContent = Get-Content $file
$manifestContent.PackageManifest.Metadata.Identity.Version = $env:MORYX_ASSEMBLY_VERSION
$manifestContent.Save($VsixManifest)

Write-Host "Version $env:MORYX_ASSEMBLY_VERSION applied to $VsixManifest!"
}

function Set-VsTemplateVersion([string]$VsTemplate) {
$file = Get-Childitem -Path $VsTemplate
if (-Not $file) {
Write-Host "VsTemplate: $VsTemplate was not found!"
exit 1;
}

[xml]$templateContent = Get-Content $VsTemplate

$versionRegex = "(\d+)\.(\d+)\.(\d+)\.(\d+)"

$wizardAssemblyStrongName = $templateContent.VSTemplate.WizardExtension.Assembly -replace $versionRegex, $env:MORYX_ASSEMBLY_VERSION
$templateContent.VSTemplate.WizardExtension.Assembly = $wizardAssemblyStrongName
$templateContent.Save($vsTemplate)

Write-Host "Version$env:MORYX_ASSEMBLY_VERSION applied to $VsTemplate!"
}

function CreateFolderIfNotExists([string]$Folder) {
if (-not (Test-Path $Folder)) {
Write-Host "Creating missing directory '$Folder'"
Expand Down
80 changes: 41 additions & 39 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,52 +15,52 @@ env:
MORYX_OPTIMIZE_CODE: "false"
MORYX_BUILD_CONFIG: "Release"
MORYX_BUILDNUMBER: ${{github.run_number}}
dotnet_sdk_version: '5.0.100'
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true

jobs:
Build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2

- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1

- name: Setup NuGet.exe
uses: NuGet/[email protected]

- name: Build
shell: pwsh
run: ./Build.ps1 -Build -Pack

- name: Upload package artifacts
uses: actions/upload-artifact@v2
with:
name: packages
path: artifacts/Packages/
retention-days: 1
- uses: actions/checkout@v2

- name: Setup .NET SDK
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.dotnet_sdk_version }}

- name: Build
shell: pwsh
run: ./Build.ps1 -Build -Pack

- name: Upload package artifacts
uses: actions/upload-artifact@v2
with:
name: packages
path: artifacts/Packages/
retention-days: 1

UnitTests:
needs: [Build]
runs-on: windows-latest
steps:
- uses: actions/checkout@v2

- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1

- name: Setup NuGet.exe
uses: NuGet/[email protected]

- name: Execute Unit Tests
shell: pwsh
run: ./Build.ps1 -UnitTests

- name: Upload test results
uses: actions/upload-artifact@v2
with:
name: test-results
path: artifacts/Tests/
retention-days: 1
- uses: actions/checkout@v2

- name: Setup .NET SDK
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.dotnet_sdk_version }}

- name: Execute Unit Tests
shell: pwsh
run: ./Build.ps1 -UnitTests

- name: Upload test results
uses: actions/upload-artifact@v2
with:
name: test-results
path: artifacts/Tests/
retention-days: 1

Codecov:
needs: [UnitTests]
Expand Down Expand Up @@ -101,9 +101,11 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Setup NuGet.exe
uses: NuGet/[email protected]

- name: Setup .NET SDK
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.dotnet_sdk_version }}

- name: Download package artifacts
uses: actions/download-artifact@v2
with:
Expand Down
4 changes: 2 additions & 2 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
<PackageReference Update="Caliburn.Micro" Version="3.2.0" />
<PackageReference Update="Castle.Windsor" Version="5.0.1" />
<PackageReference Update="CommandLineParser" Version="2.8.0" />
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="16.7.1" />
<PackageReference Update="Moq" Version="4.14.6" />
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="16.8.0" />
<PackageReference Update="Moq" Version="4.15.1" />
<PackageReference Update="NUnit" Version="3.12.0" />
<PackageReference Update="NUnit3TestAdapter" Version="3.17.0" />

Expand Down
2 changes: 1 addition & 1 deletion Directory.build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<LangVersion>7.3</LangVersion>
<LangVersion>8.0</LangVersion>
</PropertyGroup>

<PropertyGroup>
Expand Down
17 changes: 14 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
<a href="https://github.com/PHOENIXCONTACT/MORYX-ClientFramework/workflows">
<img src="https://github.com/PHOENIXCONTACT/MORYX-ClientFramework/workflows/CI/badge.svg" alt="CI">
</a>
<a href="https://www.myget.org/feed/Packages/moryx">
<img src="https://img.shields.io/myget/moryx/v/Moryx.ClientFramework" alt="MyGet">
</a>
<a href="https://codecov.io/gh/PHOENIXCONTACT/MORYX-ClientFramework/coverage.svg?branch=dev">
<img alt="Coverage" src="https://codecov.io/gh/PHOENIXCONTACT/MORYX-ClientFramework/coverage.svg?branch=dev" />
</a>
Expand All @@ -30,3 +27,17 @@ The **MORYX ClientFramework** is the foundation for MORYX WPF desktop frontends.
- [MORYX Platform](https://github.com/PHOENIXCONTACT/MORYX-Platform)
- [MORYX Maintenance](https://github.com/PHOENIXCONTACT/MORYX-MaintenanceWeb)
- [MORYX Abstraction Layer](https://github.com/PHOENIXCONTACT/MORYX-AbstractionLayer)

## Getting started

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.

| Package Name | Release (NuGet) | CI (MyGet) |
|--------------|-----------------|------------|
| `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) |
| `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) |
| `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) |
| `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) |
| `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) |
| `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) |
| `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) |
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.0
3.0.1
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
<TargetFramework>net45</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<UseWPF>true</UseWPF>
<Description>Configurator for the ClientFramework.</Description>
<Description>Graphical MORYX client configuration for proxy settings, client id and language selection</Description>
<CreatePackage>true</CreatePackage>
<PackageTags>MORYX;WPF;UI;Client;Config;Configuration;Proxy;Language</PackageTags>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@
<value>STRG:</value>
</data>
<data name="AppConfigView_Ctrl_Description" xml:space="preserve">
<value>(Aktiviert das der Konfigurator mit STRG beim starten geladen wird)</value>
<value>(Aktiviert, dass der Konfigurator mit STRG beim Starten geladen wird)</value>
</data>
<data name="AppConfigView_LimitInstances_Label" xml:space="preserve">
<value>Limitiere Instanzen:</value>
Expand All @@ -187,7 +187,7 @@
<value>AppData:</value>
</data>
<data name="AppConfigView_RunMode_Hint" xml:space="preserve">
<value>Wenn ein RunMode ausgewählt wurde, kann der Konfigurator erneut mit dem Command-Line Argument "--configurator" oder des drückens der STRG-Taste gestartet werden.</value>
<value>Wenn ein RunMode ausgewählt wurde, kann der Konfigurator erneut mit dem Command-Line Argument "--configurator" oder des Drückens der STRG-Taste gestartet werden.</value>
</data>
<data name="AppConfigViewModel_Title" xml:space="preserve">
<value>Anwendung</value>
Expand Down Expand Up @@ -241,7 +241,7 @@
<value>Hostname:</value>
</data>
<data name="RuntimeConfigView_Hostname_Description" xml:space="preserve">
<value>(Wo kann die Runtime gefunden werden (e.g. "localhost")?)</value>
<value>(Wo kann die Runtime gefunden werden (z.B. "localhost")?)</value>
</data>
<data name="RuntimeConfigView_Port_Label" xml:space="preserve">
<value>Port: </value>
Expand All @@ -253,7 +253,7 @@
<value>Client Id:</value>
</data>
<data name="RuntimeConfigView_ClientId_Description" xml:space="preserve">
<value>(Eindeutige id um den Client auf dem Server zu regitrieren)</value>
<value>(Eindeutige Id um den Client auf dem Server zu registrieren)</value>
</data>
<data name="LocalizationViewModel_Title" xml:space="preserve">
<value>Lokalisierung</value>
Expand All @@ -264,4 +264,4 @@
<data name="ConfigConductorViewModel_ConfigsSaved_Message" xml:space="preserve">
<value>Alle Konfigurationen wurden erfolgreich gespeichert!</value>
</data>
</root>
</root>
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
<value>AppData:</value>
</data>
<data name="AppConfigView_RunMode_Hint" xml:space="preserve">
<value>If you have selected an RunMode you can open the configurator again with the command line argument "--configurator" or press CTRL at startup.</value>
<value>If you have selected a RunMode you can open the configurator again with the command line argument "--configurator" or press CTRL at startup.</value>
</data>
<data name="AppConfigViewModel_Title" xml:space="preserve">
<value>Application</value>
Expand Down Expand Up @@ -244,4 +244,4 @@
<data name="ConfigConductorViewModel_ConfigsSaved_Message" xml:space="preserve">
<value>All configurations are successfully saved!</value>
</data>
</root>
</root>
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
<TargetFramework>net45</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<UseWPF>true</UseWPF>
<Description>Kernel for the client framework with infrastructure and shared components.</Description>
<Description>Kernel for the MORYX client framework with infrastructure and shared components.</Description>
<CreatePackage>true</CreatePackage>
<PackageTags>MORYX;WPF;UI;Client;Kernel;Components</PackageTags>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="LoaderView_Credits" xml:space="preserve">
<value>Diese Anwendung basiert auf der MORYX Framework!</value>
<value>Diese Anwendung basiert auf dem MORYX Framework!</value>
</data>
<data name="RunModeLoaderAdapter_AssemblyConfigurationLoaded" xml:space="preserve">
<value>Bibliothekseinstellung geladen ({0}) ...</value>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
<TargetFramework>net45</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<UseWPF>true</UseWPF>
<Description>Simple client shell implementation to handle modules.</Description>
<Description>Simple client shell implementation to host MORYX WPF modules.</Description>
<CreatePackage>true</CreatePackage>
<PackageTags>MORYX;WPF;UI;Client;Shell;Modules;Theme</PackageTags>
</PropertyGroup>

<ItemGroup>
Expand Down
3 changes: 2 additions & 1 deletion src/Moryx.ClientFramework/Moryx.ClientFramework.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
<TargetFramework>net45</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<UseWPF>true</UseWPF>
<Description>Framework for MORYX WPF desktop clients</Description>
<Description>Framework core package for MORYX WPF desktop clients</Description>
<CreatePackage>true</CreatePackage>
<PackageTags>MORYX;WPF;UI;Client;Desktop;Core</PackageTags>
</PropertyGroup>

<ItemGroup>
Expand Down
8 changes: 8 additions & 0 deletions src/Moryx.Controls.Demo/Models/EntryClass.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ public class EntryClass

public List<EntrySubClass> ListSubClass { get; set; }

public List<EntrySubClass> ListReadOnly { get; } = new List<EntrySubClass>
{
new EntrySubClass
{
AByte = 1
}
};

public List<Visibility> ListEnum { get; set; }

public List<string> ListString { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ public object Convert(object value, Type targetType, object parameter, CultureIn
if (entry == null)
return Visibility.Collapsed;

return entry.ValueType == EntryValueType.Collection ? Visibility.Visible : Visibility.Collapsed;
return entry.ValueType == EntryValueType.Collection && !entry.IsReadOnly
? Visibility.Visible
: Visibility.Collapsed;
}

/// <inheritdoc />
Expand Down
Loading

0 comments on commit a5232c9

Please sign in to comment.