From c969d5e34c686d4681efd178283bad5995fc75b3 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Fri, 17 Jun 2022 12:06:32 +0200 Subject: [PATCH 1/2] Update NuGet dependencies to latest stable versions Includes UWP and WinUI 3 dependencies --- .../ComputeSharp.Sample.FSharp.fsproj | 2 +- .../ComputeSharp.SwapChain.Uwp.csproj | 2 +- .../ComputeSharp.SwapChain.WinUI.csproj | 2 +- src/ComputeSharp.Uwp/ComputeSharp.Uwp.csproj | 2 +- src/ComputeSharp.WinUI/ComputeSharp.WinUI.csproj | 2 +- src/Directory.Build.props | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/samples/ComputeSharp.Sample.FSharp/ComputeSharp.Sample.FSharp.fsproj b/samples/ComputeSharp.Sample.FSharp/ComputeSharp.Sample.FSharp.fsproj index ae682324..fe09e41c 100644 --- a/samples/ComputeSharp.Sample.FSharp/ComputeSharp.Sample.FSharp.fsproj +++ b/samples/ComputeSharp.Sample.FSharp/ComputeSharp.Sample.FSharp.fsproj @@ -7,7 +7,7 @@ - + diff --git a/samples/ComputeSharp.SwapChain.Uwp/ComputeSharp.SwapChain.Uwp.csproj b/samples/ComputeSharp.SwapChain.Uwp/ComputeSharp.SwapChain.Uwp.csproj index a4c2592c..e683cd8f 100644 --- a/samples/ComputeSharp.SwapChain.Uwp/ComputeSharp.SwapChain.Uwp.csproj +++ b/samples/ComputeSharp.SwapChain.Uwp/ComputeSharp.SwapChain.Uwp.csproj @@ -217,7 +217,7 @@ 6.0.0 - 6.2.13 + 6.2.14 7.1.2 diff --git a/samples/ComputeSharp.SwapChain.WinUI/ComputeSharp.SwapChain.WinUI.csproj b/samples/ComputeSharp.SwapChain.WinUI/ComputeSharp.SwapChain.WinUI.csproj index ff2c1bff..36220337 100644 --- a/samples/ComputeSharp.SwapChain.WinUI/ComputeSharp.SwapChain.WinUI.csproj +++ b/samples/ComputeSharp.SwapChain.WinUI/ComputeSharp.SwapChain.WinUI.csproj @@ -27,7 +27,7 @@ - + diff --git a/src/ComputeSharp.Uwp/ComputeSharp.Uwp.csproj b/src/ComputeSharp.Uwp/ComputeSharp.Uwp.csproj index cf837b3a..1cfdc85a 100644 --- a/src/ComputeSharp.Uwp/ComputeSharp.Uwp.csproj +++ b/src/ComputeSharp.Uwp/ComputeSharp.Uwp.csproj @@ -31,7 +31,7 @@ - + diff --git a/src/ComputeSharp.WinUI/ComputeSharp.WinUI.csproj b/src/ComputeSharp.WinUI/ComputeSharp.WinUI.csproj index 5b141cc4..3fb23ab3 100644 --- a/src/ComputeSharp.WinUI/ComputeSharp.WinUI.csproj +++ b/src/ComputeSharp.WinUI/ComputeSharp.WinUI.csproj @@ -23,7 +23,7 @@ - + diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 96486587..a6b8f857 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -2,6 +2,6 @@ - + \ No newline at end of file From 51f3ee8a97ed22755ee1903e33acca2cc812bd73 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Fri, 17 Jun 2022 12:12:38 +0200 Subject: [PATCH 2/2] Update .NET Community Toolkit to Preview 4 --- .../ViewModels/MainViewModel.cs | 27 ++++++------------- .../ComputeSharp.SwapChain.Uwp.csproj | 2 +- .../ComputeSharp.SwapChain.WinUI.csproj | 2 +- src/ComputeSharp/ComputeSharp.csproj | 2 +- .../ComputeSharp.Tests.csproj | 2 +- 5 files changed, 12 insertions(+), 23 deletions(-) diff --git a/samples/ComputeSharp.SwapChain.Core.Shared/ViewModels/MainViewModel.cs b/samples/ComputeSharp.SwapChain.Core.Shared/ViewModels/MainViewModel.cs index 1f0291b3..1381476b 100644 --- a/samples/ComputeSharp.SwapChain.Core.Shared/ViewModels/MainViewModel.cs +++ b/samples/ComputeSharp.SwapChain.Core.Shared/ViewModels/MainViewModel.cs @@ -20,7 +20,7 @@ namespace ComputeSharp.SwapChain.Core.ViewModels; /// /// The viewmodel for for a view that allows users to select shaders and customize settings. /// -public sealed class MainViewModel : ObservableObject +public sealed partial class MainViewModel : ObservableObject { /// /// The instance currently in use. @@ -40,9 +40,6 @@ public sealed class MainViewModel : ObservableObject this.selectedResolutionScale = 100; this.selectedComputeShader = ComputeShaderOptions[0]; this.selectedComputeShader.IsSelected = true; - - SetResolutionScaleCommand = new RelayCommand(SetResolutionScale); - ToggleRenderingPausedCommand = new RelayCommand(ToggleRenderingPaused); } /// @@ -101,19 +98,6 @@ public sealed class MainViewModel : ObservableObject } } - /// - /// Gets the command that sets . - /// - public IRelayCommand SetResolutionScaleCommand { get; } - - /// - /// Sets . - /// - private void SetResolutionScale(int resolutionScale) - { - SelectedResolutionScale = resolutionScale; - } - /// /// Gets the collection of available compute shader. /// @@ -171,13 +155,18 @@ public sealed class MainViewModel : ObservableObject } /// - /// Gets the command that toggles . + /// Sets . /// - public IRelayCommand ToggleRenderingPausedCommand { get; } + [RelayCommand] + private void SetResolutionScale(int resolutionScale) + { + SelectedResolutionScale = resolutionScale; + } /// /// Toggles . /// + [RelayCommand] private void ToggleRenderingPaused() { IsRenderingPaused = !IsRenderingPaused; diff --git a/samples/ComputeSharp.SwapChain.Uwp/ComputeSharp.SwapChain.Uwp.csproj b/samples/ComputeSharp.SwapChain.Uwp/ComputeSharp.SwapChain.Uwp.csproj index e683cd8f..1f8aa933 100644 --- a/samples/ComputeSharp.SwapChain.Uwp/ComputeSharp.SwapChain.Uwp.csproj +++ b/samples/ComputeSharp.SwapChain.Uwp/ComputeSharp.SwapChain.Uwp.csproj @@ -205,7 +205,7 @@ - 8.0.0-preview1 + 8.0.0-preview4 4.5.1 diff --git a/samples/ComputeSharp.SwapChain.WinUI/ComputeSharp.SwapChain.WinUI.csproj b/samples/ComputeSharp.SwapChain.WinUI/ComputeSharp.SwapChain.WinUI.csproj index 36220337..a9f09581 100644 --- a/samples/ComputeSharp.SwapChain.WinUI/ComputeSharp.SwapChain.WinUI.csproj +++ b/samples/ComputeSharp.SwapChain.WinUI/ComputeSharp.SwapChain.WinUI.csproj @@ -28,7 +28,7 @@ - + diff --git a/src/ComputeSharp/ComputeSharp.csproj b/src/ComputeSharp/ComputeSharp.csproj index ce8db878..2db2d034 100644 --- a/src/ComputeSharp/ComputeSharp.csproj +++ b/src/ComputeSharp/ComputeSharp.csproj @@ -16,7 +16,7 @@ - + diff --git a/tests/ComputeSharp.Tests/ComputeSharp.Tests.csproj b/tests/ComputeSharp.Tests/ComputeSharp.Tests.csproj index cc0194a8..665da7e6 100644 --- a/tests/ComputeSharp.Tests/ComputeSharp.Tests.csproj +++ b/tests/ComputeSharp.Tests/ComputeSharp.Tests.csproj @@ -8,7 +8,7 @@ - +