From a2a063c136493d812608c8984a6573caeb7dde87 Mon Sep 17 00:00:00 2001 From: Robert Date: Sat, 20 Aug 2022 13:42:45 +0200 Subject: [PATCH] UI - Fix build warnings UI - Add remote controller --- src/Artemis.UI.Linux/packages.lock.json | 110 ++++++++++++++-- src/Artemis.UI.MacOS/packages.lock.json | 110 ++++++++++++++-- src/Artemis.UI.Shared/ReactiveCoreWindow.cs | 2 +- src/Artemis.UI.Shared/packages.lock.json | 117 ++++++++++++++++-- .../Providers/Input/WindowsInputProvider.cs | 2 +- .../SkiaSharp/Vulkan/Kernel32.cs | 2 +- src/Artemis.UI.Windows/packages.lock.json | 110 ++++++++++++++-- .../Controllers/RemoteController.cs | 39 ++++++ .../ColorGradientPropertyInputViewModel.cs | 1 - .../Screens/Debugger/DebugViewModel.cs | 8 +- .../Segments/TimelineSegmentViewModel.cs | 4 +- .../ProfileEditor/ProfileEditorViewModel.cs | 20 +-- src/Artemis.UI/Screens/Root/RootViewModel.cs | 24 ++-- .../Scripting/ScriptsDialogViewModel.cs | 3 +- .../ProfileConfigurationEditViewModel.cs | 2 +- .../Services/RegistrationService.cs | 7 ++ src/Artemis.UI/Services/UpdateService.cs | 2 +- src/Artemis.UI/packages.lock.json | 109 ++++++++++++++-- .../packages.lock.json | 117 ++++++++++++++++-- 19 files changed, 687 insertions(+), 102 deletions(-) create mode 100644 src/Artemis.UI/Controllers/RemoteController.cs diff --git a/src/Artemis.UI.Linux/packages.lock.json b/src/Artemis.UI.Linux/packages.lock.json index 2064c8127..5c1ceadc6 100644 --- a/src/Artemis.UI.Linux/packages.lock.json +++ b/src/Artemis.UI.Linux/packages.lock.json @@ -30,6 +30,18 @@ "Avalonia.X11": "0.10.18" } }, + "Avalonia.Diagnostics": { + "type": "Direct", + "requested": "[0.10.18, )", + "resolved": "0.10.18", + "contentHash": "3PjA6r0mmRUeS+R34VtYAyzmlPeqflsQ9B8E2TrZKGke0Wo6t3JsvPWA8ynA/ii0icPnnn7nmQaEZQs07ZthxQ==", + "dependencies": { + "Avalonia": "0.10.18", + "Avalonia.Controls.DataGrid": "0.10.18", + "Microsoft.CodeAnalysis.CSharp.Scripting": "3.4.0", + "System.Reactive": "5.0.0" + } + }, "Avalonia.ReactiveUI": { "type": "Direct", "requested": "[0.10.18, )", @@ -58,11 +70,11 @@ }, "Avalonia.Controls.DataGrid": { "type": "Transitive", - "resolved": "0.10.15", - "contentHash": "a0A0RcZU1FSCUxKHkYP49df9HjlvU9gdS+DqF6VR7zc3TYbaFwLHF0pg5fsjkW/FMgzUfO70NX/WwpDeu6celg==", + "resolved": "0.10.18", + "contentHash": "LDNZxnzk++GgBeUKsqmeWJDQgF83C4Quk4Wn0z5P6vIm1f5YSSFJL6JbibbIAvjqlGjqWWFTBZpHMUNjdyw4Aw==", "dependencies": { - "Avalonia": "0.10.15", - "Avalonia.Remote.Protocol": "0.10.15", + "Avalonia": "0.10.18", + "Avalonia.Remote.Protocol": "0.10.18", "JetBrains.Annotations": "10.3.0", "System.Reactive": "5.0.0" } @@ -328,6 +340,75 @@ "resolved": "0.10.4", "contentHash": "enc2U+/1UnF3rtocxb5ofcg7cJSmJI4adbYPr8DZa5bQzvhqA/VbjlcalxoqjI3CR2RvM5WWpjKT0p3BriFJjw==" }, + "Microsoft.CodeAnalysis.Analyzers": { + "type": "Transitive", + "resolved": "2.9.6", + "contentHash": "Kmms3TxGQMNb95Cu/3K+0bIcMnV4qf/phZBLAB0HUi65rBPxP4JO3aM2LoAcb+DFS600RQJMZ7ZLyYDTbLwJOQ==" + }, + "Microsoft.CodeAnalysis.Common": { + "type": "Transitive", + "resolved": "3.4.0", + "contentHash": "3ncA7cV+iXGA1VYwe2UEZXcvWyZSlbexWjM9AvocP7sik5UD93qt9Hq0fMRGk0jFRmvmE4T2g+bGfXiBVZEhLw==", + "dependencies": { + "Microsoft.CodeAnalysis.Analyzers": "2.9.6", + "System.Collections.Immutable": "1.5.0", + "System.Memory": "4.5.3", + "System.Reflection.Metadata": "1.6.0", + "System.Runtime.CompilerServices.Unsafe": "4.5.2", + "System.Text.Encoding.CodePages": "4.5.1", + "System.Threading.Tasks.Extensions": "4.5.3" + } + }, + "Microsoft.CodeAnalysis.CSharp": { + "type": "Transitive", + "resolved": "3.4.0", + "contentHash": "/LsTtgcMN6Tu1oo7/WYbRAHL4/ubXC/miEakwTpcZKJKtFo7D0AK95Hw0dbGxul6C8WJu60v6NP2435TDYZM+Q==", + "dependencies": { + "Microsoft.CodeAnalysis.Common": "[3.4.0]" + } + }, + "Microsoft.CodeAnalysis.CSharp.Scripting": { + "type": "Transitive", + "resolved": "3.4.0", + "contentHash": "tLgqc76qXHmONUhWhxo7z3TcL/LmGFWIUJm1exbQmVJohuQvJnejUMxmVkdxDfMuMZU1fIyJXPZ6Fkp4FEneAg==", + "dependencies": { + "Microsoft.CSharp": "4.3.0", + "Microsoft.CodeAnalysis.CSharp": "[3.4.0]", + "Microsoft.CodeAnalysis.Common": "[3.4.0]", + "Microsoft.CodeAnalysis.Scripting.Common": "[3.4.0]" + } + }, + "Microsoft.CodeAnalysis.Scripting.Common": { + "type": "Transitive", + "resolved": "3.4.0", + "contentHash": "+b6I3DZL2zvck+B/E/aiOveakj5U2G2BcYODQxcGh2IDbatNU3XXxGT1HumkWB5uIZI2Leu0opBgBpjScmjGMA==", + "dependencies": { + "Microsoft.CodeAnalysis.Common": "[3.4.0]" + } + }, + "Microsoft.CSharp": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "P+MBhIM0YX+JqROuf7i306ZLJEjQYA9uUyRDE+OqwUI5sh41e2ZbPQV3LfAPh+29cmceE1pUffXsGfR4eMY3KA==", + "dependencies": { + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Dynamic.Runtime": "4.3.0", + "System.Globalization": "4.3.0", + "System.Linq": "4.3.0", + "System.Linq.Expressions": "4.3.0", + "System.ObjectModel": "4.3.0", + "System.Reflection": "4.3.0", + "System.Reflection.Extensions": "4.3.0", + "System.Reflection.Primitives": "4.3.0", + "System.Reflection.TypeExtensions": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Threading": "4.3.0" + } + }, "Microsoft.DotNet.PlatformAbstractions": { "type": "Transitive", "resolved": "3.1.6", @@ -741,6 +822,11 @@ "System.Threading.Tasks": "4.3.0" } }, + "System.Collections.Immutable": { + "type": "Transitive", + "resolved": "1.5.0", + "contentHash": "EXKiDFsChZW0RjrZ4FYHu9aW6+P4MCgEDCklsVseRfhoO0F+dXeMSsMRAlVXIo06kGJ/zv+2w1a2uc2+kxxSaQ==" + }, "System.Collections.NonGeneric": { "type": "Transitive", "resolved": "4.3.0", @@ -1198,6 +1284,11 @@ "System.Runtime": "4.3.0" } }, + "System.Reflection.Metadata": { + "type": "Transitive", + "resolved": "1.6.0", + "contentHash": "COC1aiAJjCoA5GBF+QKL2uLqEBew4JsCkQmoHKbN3TlOZKa2fKLz5CpiRQKDz0RsAOEGsVKqOD5bomsXq/4STQ==" + }, "System.Reflection.Primitives": { "type": "Transitive", "resolved": "4.3.0", @@ -1518,13 +1609,8 @@ }, "System.Threading.Tasks.Extensions": { "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "npvJkVKl5rKXrtl1Kkm6OhOUaYGEiF9wFbppFRWSMoApKzt2PiPHT2Bb8a5sAWxprvdOAtvaARS9QYMznEUtug==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } + "resolved": "4.5.3", + "contentHash": "+MvhNtcvIbqmhANyKu91jQnvIRVSTiaOiFNfKWwXGHG48YAb4I/TyH8spsySiPYla7gKal5ZnF3teJqZAximyQ==" }, "System.Threading.Timer": { "type": "Transitive", @@ -1690,6 +1776,7 @@ "Avalonia.Controls.PanAndZoom": "10.14.0", "Avalonia.Controls.Skia": "0.10.16", "Avalonia.Desktop": "0.10.18", + "Avalonia.Diagnostics": "0.10.18", "Avalonia.ReactiveUI": "0.10.18", "Avalonia.Xaml.Behaviors": "0.10.18", "DynamicData": "7.9.14", @@ -1710,6 +1797,7 @@ "dependencies": { "Artemis.Core": "1.0.0", "Avalonia": "0.10.18", + "Avalonia.Diagnostics": "0.10.18", "Avalonia.ReactiveUI": "0.10.18", "Avalonia.Xaml.Behaviors": "0.10.18", "DynamicData": "7.9.14", diff --git a/src/Artemis.UI.MacOS/packages.lock.json b/src/Artemis.UI.MacOS/packages.lock.json index 2064c8127..5c1ceadc6 100644 --- a/src/Artemis.UI.MacOS/packages.lock.json +++ b/src/Artemis.UI.MacOS/packages.lock.json @@ -30,6 +30,18 @@ "Avalonia.X11": "0.10.18" } }, + "Avalonia.Diagnostics": { + "type": "Direct", + "requested": "[0.10.18, )", + "resolved": "0.10.18", + "contentHash": "3PjA6r0mmRUeS+R34VtYAyzmlPeqflsQ9B8E2TrZKGke0Wo6t3JsvPWA8ynA/ii0icPnnn7nmQaEZQs07ZthxQ==", + "dependencies": { + "Avalonia": "0.10.18", + "Avalonia.Controls.DataGrid": "0.10.18", + "Microsoft.CodeAnalysis.CSharp.Scripting": "3.4.0", + "System.Reactive": "5.0.0" + } + }, "Avalonia.ReactiveUI": { "type": "Direct", "requested": "[0.10.18, )", @@ -58,11 +70,11 @@ }, "Avalonia.Controls.DataGrid": { "type": "Transitive", - "resolved": "0.10.15", - "contentHash": "a0A0RcZU1FSCUxKHkYP49df9HjlvU9gdS+DqF6VR7zc3TYbaFwLHF0pg5fsjkW/FMgzUfO70NX/WwpDeu6celg==", + "resolved": "0.10.18", + "contentHash": "LDNZxnzk++GgBeUKsqmeWJDQgF83C4Quk4Wn0z5P6vIm1f5YSSFJL6JbibbIAvjqlGjqWWFTBZpHMUNjdyw4Aw==", "dependencies": { - "Avalonia": "0.10.15", - "Avalonia.Remote.Protocol": "0.10.15", + "Avalonia": "0.10.18", + "Avalonia.Remote.Protocol": "0.10.18", "JetBrains.Annotations": "10.3.0", "System.Reactive": "5.0.0" } @@ -328,6 +340,75 @@ "resolved": "0.10.4", "contentHash": "enc2U+/1UnF3rtocxb5ofcg7cJSmJI4adbYPr8DZa5bQzvhqA/VbjlcalxoqjI3CR2RvM5WWpjKT0p3BriFJjw==" }, + "Microsoft.CodeAnalysis.Analyzers": { + "type": "Transitive", + "resolved": "2.9.6", + "contentHash": "Kmms3TxGQMNb95Cu/3K+0bIcMnV4qf/phZBLAB0HUi65rBPxP4JO3aM2LoAcb+DFS600RQJMZ7ZLyYDTbLwJOQ==" + }, + "Microsoft.CodeAnalysis.Common": { + "type": "Transitive", + "resolved": "3.4.0", + "contentHash": "3ncA7cV+iXGA1VYwe2UEZXcvWyZSlbexWjM9AvocP7sik5UD93qt9Hq0fMRGk0jFRmvmE4T2g+bGfXiBVZEhLw==", + "dependencies": { + "Microsoft.CodeAnalysis.Analyzers": "2.9.6", + "System.Collections.Immutable": "1.5.0", + "System.Memory": "4.5.3", + "System.Reflection.Metadata": "1.6.0", + "System.Runtime.CompilerServices.Unsafe": "4.5.2", + "System.Text.Encoding.CodePages": "4.5.1", + "System.Threading.Tasks.Extensions": "4.5.3" + } + }, + "Microsoft.CodeAnalysis.CSharp": { + "type": "Transitive", + "resolved": "3.4.0", + "contentHash": "/LsTtgcMN6Tu1oo7/WYbRAHL4/ubXC/miEakwTpcZKJKtFo7D0AK95Hw0dbGxul6C8WJu60v6NP2435TDYZM+Q==", + "dependencies": { + "Microsoft.CodeAnalysis.Common": "[3.4.0]" + } + }, + "Microsoft.CodeAnalysis.CSharp.Scripting": { + "type": "Transitive", + "resolved": "3.4.0", + "contentHash": "tLgqc76qXHmONUhWhxo7z3TcL/LmGFWIUJm1exbQmVJohuQvJnejUMxmVkdxDfMuMZU1fIyJXPZ6Fkp4FEneAg==", + "dependencies": { + "Microsoft.CSharp": "4.3.0", + "Microsoft.CodeAnalysis.CSharp": "[3.4.0]", + "Microsoft.CodeAnalysis.Common": "[3.4.0]", + "Microsoft.CodeAnalysis.Scripting.Common": "[3.4.0]" + } + }, + "Microsoft.CodeAnalysis.Scripting.Common": { + "type": "Transitive", + "resolved": "3.4.0", + "contentHash": "+b6I3DZL2zvck+B/E/aiOveakj5U2G2BcYODQxcGh2IDbatNU3XXxGT1HumkWB5uIZI2Leu0opBgBpjScmjGMA==", + "dependencies": { + "Microsoft.CodeAnalysis.Common": "[3.4.0]" + } + }, + "Microsoft.CSharp": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "P+MBhIM0YX+JqROuf7i306ZLJEjQYA9uUyRDE+OqwUI5sh41e2ZbPQV3LfAPh+29cmceE1pUffXsGfR4eMY3KA==", + "dependencies": { + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Dynamic.Runtime": "4.3.0", + "System.Globalization": "4.3.0", + "System.Linq": "4.3.0", + "System.Linq.Expressions": "4.3.0", + "System.ObjectModel": "4.3.0", + "System.Reflection": "4.3.0", + "System.Reflection.Extensions": "4.3.0", + "System.Reflection.Primitives": "4.3.0", + "System.Reflection.TypeExtensions": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Threading": "4.3.0" + } + }, "Microsoft.DotNet.PlatformAbstractions": { "type": "Transitive", "resolved": "3.1.6", @@ -741,6 +822,11 @@ "System.Threading.Tasks": "4.3.0" } }, + "System.Collections.Immutable": { + "type": "Transitive", + "resolved": "1.5.0", + "contentHash": "EXKiDFsChZW0RjrZ4FYHu9aW6+P4MCgEDCklsVseRfhoO0F+dXeMSsMRAlVXIo06kGJ/zv+2w1a2uc2+kxxSaQ==" + }, "System.Collections.NonGeneric": { "type": "Transitive", "resolved": "4.3.0", @@ -1198,6 +1284,11 @@ "System.Runtime": "4.3.0" } }, + "System.Reflection.Metadata": { + "type": "Transitive", + "resolved": "1.6.0", + "contentHash": "COC1aiAJjCoA5GBF+QKL2uLqEBew4JsCkQmoHKbN3TlOZKa2fKLz5CpiRQKDz0RsAOEGsVKqOD5bomsXq/4STQ==" + }, "System.Reflection.Primitives": { "type": "Transitive", "resolved": "4.3.0", @@ -1518,13 +1609,8 @@ }, "System.Threading.Tasks.Extensions": { "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "npvJkVKl5rKXrtl1Kkm6OhOUaYGEiF9wFbppFRWSMoApKzt2PiPHT2Bb8a5sAWxprvdOAtvaARS9QYMznEUtug==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } + "resolved": "4.5.3", + "contentHash": "+MvhNtcvIbqmhANyKu91jQnvIRVSTiaOiFNfKWwXGHG48YAb4I/TyH8spsySiPYla7gKal5ZnF3teJqZAximyQ==" }, "System.Threading.Timer": { "type": "Transitive", @@ -1690,6 +1776,7 @@ "Avalonia.Controls.PanAndZoom": "10.14.0", "Avalonia.Controls.Skia": "0.10.16", "Avalonia.Desktop": "0.10.18", + "Avalonia.Diagnostics": "0.10.18", "Avalonia.ReactiveUI": "0.10.18", "Avalonia.Xaml.Behaviors": "0.10.18", "DynamicData": "7.9.14", @@ -1710,6 +1797,7 @@ "dependencies": { "Artemis.Core": "1.0.0", "Avalonia": "0.10.18", + "Avalonia.Diagnostics": "0.10.18", "Avalonia.ReactiveUI": "0.10.18", "Avalonia.Xaml.Behaviors": "0.10.18", "DynamicData": "7.9.14", diff --git a/src/Artemis.UI.Shared/ReactiveCoreWindow.cs b/src/Artemis.UI.Shared/ReactiveCoreWindow.cs index 2001e192f..86668c90a 100644 --- a/src/Artemis.UI.Shared/ReactiveCoreWindow.cs +++ b/src/Artemis.UI.Shared/ReactiveCoreWindow.cs @@ -63,7 +63,7 @@ namespace Artemis.UI.Shared TransparencyBackgroundFallback = Brushes.Transparent; TransparencyLevelHint = WindowTransparencyLevel.Mica; - Color2 color = this.TryFindResource("SolidBackgroundFillColorBase", out object? value) ? (Color) value : new Color2(32, 32, 32); + Color2 color = this.TryFindResource("SolidBackgroundFillColorBase", out object? value) ? (Color) value! : new Color2(32, 32, 32); color = color.LightenPercent(-0.5f); Background = new ImmutableSolidColorBrush(color, 0.82); } diff --git a/src/Artemis.UI.Shared/packages.lock.json b/src/Artemis.UI.Shared/packages.lock.json index bf966a26d..2a1592c73 100644 --- a/src/Artemis.UI.Shared/packages.lock.json +++ b/src/Artemis.UI.Shared/packages.lock.json @@ -17,6 +17,18 @@ "System.ValueTuple": "4.5.0" } }, + "Avalonia.Diagnostics": { + "type": "Direct", + "requested": "[0.10.18, )", + "resolved": "0.10.18", + "contentHash": "3PjA6r0mmRUeS+R34VtYAyzmlPeqflsQ9B8E2TrZKGke0Wo6t3JsvPWA8ynA/ii0icPnnn7nmQaEZQs07ZthxQ==", + "dependencies": { + "Avalonia": "0.10.18", + "Avalonia.Controls.DataGrid": "0.10.18", + "Microsoft.CodeAnalysis.CSharp.Scripting": "3.4.0", + "System.Reactive": "5.0.0" + } + }, "Avalonia.ReactiveUI": { "type": "Direct", "requested": "[0.10.18, )", @@ -113,11 +125,11 @@ }, "Avalonia.Controls.DataGrid": { "type": "Transitive", - "resolved": "0.10.15", - "contentHash": "a0A0RcZU1FSCUxKHkYP49df9HjlvU9gdS+DqF6VR7zc3TYbaFwLHF0pg5fsjkW/FMgzUfO70NX/WwpDeu6celg==", + "resolved": "0.10.18", + "contentHash": "LDNZxnzk++GgBeUKsqmeWJDQgF83C4Quk4Wn0z5P6vIm1f5YSSFJL6JbibbIAvjqlGjqWWFTBZpHMUNjdyw4Aw==", "dependencies": { - "Avalonia": "0.10.15", - "Avalonia.Remote.Protocol": "0.10.15", + "Avalonia": "0.10.18", + "Avalonia.Remote.Protocol": "0.10.18", "JetBrains.Annotations": "10.3.0", "System.Reactive": "5.0.0" } @@ -316,6 +328,75 @@ "resolved": "0.10.4", "contentHash": "enc2U+/1UnF3rtocxb5ofcg7cJSmJI4adbYPr8DZa5bQzvhqA/VbjlcalxoqjI3CR2RvM5WWpjKT0p3BriFJjw==" }, + "Microsoft.CodeAnalysis.Analyzers": { + "type": "Transitive", + "resolved": "2.9.6", + "contentHash": "Kmms3TxGQMNb95Cu/3K+0bIcMnV4qf/phZBLAB0HUi65rBPxP4JO3aM2LoAcb+DFS600RQJMZ7ZLyYDTbLwJOQ==" + }, + "Microsoft.CodeAnalysis.Common": { + "type": "Transitive", + "resolved": "3.4.0", + "contentHash": "3ncA7cV+iXGA1VYwe2UEZXcvWyZSlbexWjM9AvocP7sik5UD93qt9Hq0fMRGk0jFRmvmE4T2g+bGfXiBVZEhLw==", + "dependencies": { + "Microsoft.CodeAnalysis.Analyzers": "2.9.6", + "System.Collections.Immutable": "1.5.0", + "System.Memory": "4.5.3", + "System.Reflection.Metadata": "1.6.0", + "System.Runtime.CompilerServices.Unsafe": "4.5.2", + "System.Text.Encoding.CodePages": "4.5.1", + "System.Threading.Tasks.Extensions": "4.5.3" + } + }, + "Microsoft.CodeAnalysis.CSharp": { + "type": "Transitive", + "resolved": "3.4.0", + "contentHash": "/LsTtgcMN6Tu1oo7/WYbRAHL4/ubXC/miEakwTpcZKJKtFo7D0AK95Hw0dbGxul6C8WJu60v6NP2435TDYZM+Q==", + "dependencies": { + "Microsoft.CodeAnalysis.Common": "[3.4.0]" + } + }, + "Microsoft.CodeAnalysis.CSharp.Scripting": { + "type": "Transitive", + "resolved": "3.4.0", + "contentHash": "tLgqc76qXHmONUhWhxo7z3TcL/LmGFWIUJm1exbQmVJohuQvJnejUMxmVkdxDfMuMZU1fIyJXPZ6Fkp4FEneAg==", + "dependencies": { + "Microsoft.CSharp": "4.3.0", + "Microsoft.CodeAnalysis.CSharp": "[3.4.0]", + "Microsoft.CodeAnalysis.Common": "[3.4.0]", + "Microsoft.CodeAnalysis.Scripting.Common": "[3.4.0]" + } + }, + "Microsoft.CodeAnalysis.Scripting.Common": { + "type": "Transitive", + "resolved": "3.4.0", + "contentHash": "+b6I3DZL2zvck+B/E/aiOveakj5U2G2BcYODQxcGh2IDbatNU3XXxGT1HumkWB5uIZI2Leu0opBgBpjScmjGMA==", + "dependencies": { + "Microsoft.CodeAnalysis.Common": "[3.4.0]" + } + }, + "Microsoft.CSharp": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "P+MBhIM0YX+JqROuf7i306ZLJEjQYA9uUyRDE+OqwUI5sh41e2ZbPQV3LfAPh+29cmceE1pUffXsGfR4eMY3KA==", + "dependencies": { + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Dynamic.Runtime": "4.3.0", + "System.Globalization": "4.3.0", + "System.Linq": "4.3.0", + "System.Linq.Expressions": "4.3.0", + "System.ObjectModel": "4.3.0", + "System.Reflection": "4.3.0", + "System.Reflection.Extensions": "4.3.0", + "System.Reflection.Primitives": "4.3.0", + "System.Reflection.TypeExtensions": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Threading": "4.3.0" + } + }, "Microsoft.DotNet.PlatformAbstractions": { "type": "Transitive", "resolved": "3.1.6", @@ -664,6 +745,11 @@ "System.Threading.Tasks": "4.3.0" } }, + "System.Collections.Immutable": { + "type": "Transitive", + "resolved": "1.5.0", + "contentHash": "EXKiDFsChZW0RjrZ4FYHu9aW6+P4MCgEDCklsVseRfhoO0F+dXeMSsMRAlVXIo06kGJ/zv+2w1a2uc2+kxxSaQ==" + }, "System.Collections.NonGeneric": { "type": "Transitive", "resolved": "4.3.0", @@ -1121,6 +1207,11 @@ "System.Runtime": "4.3.0" } }, + "System.Reflection.Metadata": { + "type": "Transitive", + "resolved": "1.6.0", + "contentHash": "COC1aiAJjCoA5GBF+QKL2uLqEBew4JsCkQmoHKbN3TlOZKa2fKLz5CpiRQKDz0RsAOEGsVKqOD5bomsXq/4STQ==" + }, "System.Reflection.Primitives": { "type": "Transitive", "resolved": "4.3.0", @@ -1392,6 +1483,15 @@ "System.Runtime": "4.3.0" } }, + "System.Text.Encoding.CodePages": { + "type": "Transitive", + "resolved": "4.5.1", + "contentHash": "4J2JQXbftjPMppIHJ7IC+VXQ9XfEagN92vZZNoG12i+zReYlim5dMoXFC1Zzg7tsnKDM7JPo5bYfFK4Jheq44w==", + "dependencies": { + "Microsoft.NETCore.Platforms": "2.1.2", + "System.Runtime.CompilerServices.Unsafe": "4.5.2" + } + }, "System.Text.Encoding.Extensions": { "type": "Transitive", "resolved": "4.3.0", @@ -1432,13 +1532,8 @@ }, "System.Threading.Tasks.Extensions": { "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "npvJkVKl5rKXrtl1Kkm6OhOUaYGEiF9wFbppFRWSMoApKzt2PiPHT2Bb8a5sAWxprvdOAtvaARS9QYMznEUtug==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } + "resolved": "4.5.3", + "contentHash": "+MvhNtcvIbqmhANyKu91jQnvIRVSTiaOiFNfKWwXGHG48YAb4I/TyH8spsySiPYla7gKal5ZnF3teJqZAximyQ==" }, "System.Threading.Timer": { "type": "Transitive", diff --git a/src/Artemis.UI.Windows/Providers/Input/WindowsInputProvider.cs b/src/Artemis.UI.Windows/Providers/Input/WindowsInputProvider.cs index 30ed82688..37f23710d 100644 --- a/src/Artemis.UI.Windows/Providers/Input/WindowsInputProvider.cs +++ b/src/Artemis.UI.Windows/Providers/Input/WindowsInputProvider.cs @@ -83,7 +83,7 @@ namespace Artemis.UI.Windows.Providers.Input } } - private void TaskManagerTimerOnElapsed(object sender, ElapsedEventArgs e) + private void TaskManagerTimerOnElapsed(object? sender, ElapsedEventArgs e) { int processId = WindowUtilities.GetActiveProcessId(); if (processId == _lastProcessId) diff --git a/src/Artemis.UI.Windows/SkiaSharp/Vulkan/Kernel32.cs b/src/Artemis.UI.Windows/SkiaSharp/Vulkan/Kernel32.cs index e12c564bc..5bc05bd55 100644 --- a/src/Artemis.UI.Windows/SkiaSharp/Vulkan/Kernel32.cs +++ b/src/Artemis.UI.Windows/SkiaSharp/Vulkan/Kernel32.cs @@ -17,5 +17,5 @@ internal class Kernel32 public static IntPtr CurrentModuleHandle { get; } [DllImport(kernel32, CallingConvention = CallingConvention.Winapi, BestFitMapping = false, ThrowOnUnmappableChar = true)] - public static extern IntPtr GetModuleHandle([MarshalAs(UnmanagedType.LPTStr)] string lpModuleName); + public static extern IntPtr GetModuleHandle([MarshalAs(UnmanagedType.LPTStr)] string? lpModuleName); } \ No newline at end of file diff --git a/src/Artemis.UI.Windows/packages.lock.json b/src/Artemis.UI.Windows/packages.lock.json index 09ab3921e..4ce21430a 100644 --- a/src/Artemis.UI.Windows/packages.lock.json +++ b/src/Artemis.UI.Windows/packages.lock.json @@ -30,6 +30,18 @@ "Avalonia.X11": "0.10.18" } }, + "Avalonia.Diagnostics": { + "type": "Direct", + "requested": "[0.10.18, )", + "resolved": "0.10.18", + "contentHash": "3PjA6r0mmRUeS+R34VtYAyzmlPeqflsQ9B8E2TrZKGke0Wo6t3JsvPWA8ynA/ii0icPnnn7nmQaEZQs07ZthxQ==", + "dependencies": { + "Avalonia": "0.10.18", + "Avalonia.Controls.DataGrid": "0.10.18", + "Microsoft.CodeAnalysis.CSharp.Scripting": "3.4.0", + "System.Reactive": "5.0.0" + } + }, "Avalonia.ReactiveUI": { "type": "Direct", "requested": "[0.10.18, )", @@ -107,11 +119,11 @@ }, "Avalonia.Controls.DataGrid": { "type": "Transitive", - "resolved": "0.10.15", - "contentHash": "a0A0RcZU1FSCUxKHkYP49df9HjlvU9gdS+DqF6VR7zc3TYbaFwLHF0pg5fsjkW/FMgzUfO70NX/WwpDeu6celg==", + "resolved": "0.10.18", + "contentHash": "LDNZxnzk++GgBeUKsqmeWJDQgF83C4Quk4Wn0z5P6vIm1f5YSSFJL6JbibbIAvjqlGjqWWFTBZpHMUNjdyw4Aw==", "dependencies": { - "Avalonia": "0.10.15", - "Avalonia.Remote.Protocol": "0.10.15", + "Avalonia": "0.10.18", + "Avalonia.Remote.Protocol": "0.10.18", "JetBrains.Annotations": "10.3.0", "System.Reactive": "5.0.0" } @@ -366,6 +378,75 @@ "resolved": "0.10.4", "contentHash": "enc2U+/1UnF3rtocxb5ofcg7cJSmJI4adbYPr8DZa5bQzvhqA/VbjlcalxoqjI3CR2RvM5WWpjKT0p3BriFJjw==" }, + "Microsoft.CodeAnalysis.Analyzers": { + "type": "Transitive", + "resolved": "2.9.6", + "contentHash": "Kmms3TxGQMNb95Cu/3K+0bIcMnV4qf/phZBLAB0HUi65rBPxP4JO3aM2LoAcb+DFS600RQJMZ7ZLyYDTbLwJOQ==" + }, + "Microsoft.CodeAnalysis.Common": { + "type": "Transitive", + "resolved": "3.4.0", + "contentHash": "3ncA7cV+iXGA1VYwe2UEZXcvWyZSlbexWjM9AvocP7sik5UD93qt9Hq0fMRGk0jFRmvmE4T2g+bGfXiBVZEhLw==", + "dependencies": { + "Microsoft.CodeAnalysis.Analyzers": "2.9.6", + "System.Collections.Immutable": "1.5.0", + "System.Memory": "4.5.3", + "System.Reflection.Metadata": "1.6.0", + "System.Runtime.CompilerServices.Unsafe": "4.5.2", + "System.Text.Encoding.CodePages": "4.5.1", + "System.Threading.Tasks.Extensions": "4.5.3" + } + }, + "Microsoft.CodeAnalysis.CSharp": { + "type": "Transitive", + "resolved": "3.4.0", + "contentHash": "/LsTtgcMN6Tu1oo7/WYbRAHL4/ubXC/miEakwTpcZKJKtFo7D0AK95Hw0dbGxul6C8WJu60v6NP2435TDYZM+Q==", + "dependencies": { + "Microsoft.CodeAnalysis.Common": "[3.4.0]" + } + }, + "Microsoft.CodeAnalysis.CSharp.Scripting": { + "type": "Transitive", + "resolved": "3.4.0", + "contentHash": "tLgqc76qXHmONUhWhxo7z3TcL/LmGFWIUJm1exbQmVJohuQvJnejUMxmVkdxDfMuMZU1fIyJXPZ6Fkp4FEneAg==", + "dependencies": { + "Microsoft.CSharp": "4.3.0", + "Microsoft.CodeAnalysis.CSharp": "[3.4.0]", + "Microsoft.CodeAnalysis.Common": "[3.4.0]", + "Microsoft.CodeAnalysis.Scripting.Common": "[3.4.0]" + } + }, + "Microsoft.CodeAnalysis.Scripting.Common": { + "type": "Transitive", + "resolved": "3.4.0", + "contentHash": "+b6I3DZL2zvck+B/E/aiOveakj5U2G2BcYODQxcGh2IDbatNU3XXxGT1HumkWB5uIZI2Leu0opBgBpjScmjGMA==", + "dependencies": { + "Microsoft.CodeAnalysis.Common": "[3.4.0]" + } + }, + "Microsoft.CSharp": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "P+MBhIM0YX+JqROuf7i306ZLJEjQYA9uUyRDE+OqwUI5sh41e2ZbPQV3LfAPh+29cmceE1pUffXsGfR4eMY3KA==", + "dependencies": { + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Dynamic.Runtime": "4.3.0", + "System.Globalization": "4.3.0", + "System.Linq": "4.3.0", + "System.Linq.Expressions": "4.3.0", + "System.ObjectModel": "4.3.0", + "System.Reflection": "4.3.0", + "System.Reflection.Extensions": "4.3.0", + "System.Reflection.Primitives": "4.3.0", + "System.Reflection.TypeExtensions": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Threading": "4.3.0" + } + }, "Microsoft.DotNet.PlatformAbstractions": { "type": "Transitive", "resolved": "3.1.6", @@ -797,6 +878,11 @@ "System.Threading.Tasks": "4.3.0" } }, + "System.Collections.Immutable": { + "type": "Transitive", + "resolved": "1.5.0", + "contentHash": "EXKiDFsChZW0RjrZ4FYHu9aW6+P4MCgEDCklsVseRfhoO0F+dXeMSsMRAlVXIo06kGJ/zv+2w1a2uc2+kxxSaQ==" + }, "System.Collections.NonGeneric": { "type": "Transitive", "resolved": "4.3.0", @@ -1254,6 +1340,11 @@ "System.Runtime": "4.3.0" } }, + "System.Reflection.Metadata": { + "type": "Transitive", + "resolved": "1.6.0", + "contentHash": "COC1aiAJjCoA5GBF+QKL2uLqEBew4JsCkQmoHKbN3TlOZKa2fKLz5CpiRQKDz0RsAOEGsVKqOD5bomsXq/4STQ==" + }, "System.Reflection.Primitives": { "type": "Transitive", "resolved": "4.3.0", @@ -1574,13 +1665,8 @@ }, "System.Threading.Tasks.Extensions": { "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "npvJkVKl5rKXrtl1Kkm6OhOUaYGEiF9wFbppFRWSMoApKzt2PiPHT2Bb8a5sAWxprvdOAtvaARS9QYMznEUtug==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } + "resolved": "4.5.3", + "contentHash": "+MvhNtcvIbqmhANyKu91jQnvIRVSTiaOiFNfKWwXGHG48YAb4I/TyH8spsySiPYla7gKal5ZnF3teJqZAximyQ==" }, "System.Threading.Timer": { "type": "Transitive", @@ -1746,6 +1832,7 @@ "Avalonia.Controls.PanAndZoom": "10.14.0", "Avalonia.Controls.Skia": "0.10.16", "Avalonia.Desktop": "0.10.18", + "Avalonia.Diagnostics": "0.10.18", "Avalonia.ReactiveUI": "0.10.18", "Avalonia.Xaml.Behaviors": "0.10.18", "DynamicData": "7.9.14", @@ -1766,6 +1853,7 @@ "dependencies": { "Artemis.Core": "1.0.0", "Avalonia": "0.10.18", + "Avalonia.Diagnostics": "0.10.18", "Avalonia.ReactiveUI": "0.10.18", "Avalonia.Xaml.Behaviors": "0.10.18", "DynamicData": "7.9.14", diff --git a/src/Artemis.UI/Controllers/RemoteController.cs b/src/Artemis.UI/Controllers/RemoteController.cs new file mode 100644 index 000000000..00af97fa0 --- /dev/null +++ b/src/Artemis.UI/Controllers/RemoteController.cs @@ -0,0 +1,39 @@ +using System; +using Artemis.Core.Services; +using Artemis.UI.Shared.Services.MainWindow; +using EmbedIO; +using EmbedIO.Routing; +using EmbedIO.WebApi; + +namespace Artemis.UI.Controllers +{ + public class RemoteController : WebApiController + { + private readonly ICoreService _coreService; + private readonly IMainWindowService _mainWindowService; + + public RemoteController(ICoreService coreService, IMainWindowService mainWindowService) + { + _coreService = coreService; + _mainWindowService = mainWindowService; + } + + [Route(HttpVerbs.Post, "/remote/bring-to-foreground")] + public void PostBringToForeground() + { + _mainWindowService.OpenMainWindow(); + } + + [Route(HttpVerbs.Post, "/remote/restart")] + public void PostRestart() + { + Core.Utilities.Restart(_coreService.IsElevated, TimeSpan.FromMilliseconds(500)); + } + + [Route(HttpVerbs.Post, "/remote/shutdown")] + public void PostShutdown() + { + Core.Utilities.Shutdown(); + } + } +} \ No newline at end of file diff --git a/src/Artemis.UI/DefaultTypes/PropertyInput/ColorGradientPropertyInputViewModel.cs b/src/Artemis.UI/DefaultTypes/PropertyInput/ColorGradientPropertyInputViewModel.cs index 2b451b791..ba00fdc90 100644 --- a/src/Artemis.UI/DefaultTypes/PropertyInput/ColorGradientPropertyInputViewModel.cs +++ b/src/Artemis.UI/DefaultTypes/PropertyInput/ColorGradientPropertyInputViewModel.cs @@ -10,7 +10,6 @@ namespace Artemis.UI.DefaultTypes.PropertyInput; public class ColorGradientPropertyInputViewModel : PropertyInputViewModel { - private ColorGradient _colorGradient = null!; private List? _originalStops; public ColorGradientPropertyInputViewModel(LayerProperty layerProperty, IProfileEditorService profileEditorService, IPropertyInputService propertyInputService) diff --git a/src/Artemis.UI/Screens/Debugger/DebugViewModel.cs b/src/Artemis.UI/Screens/Debugger/DebugViewModel.cs index 63133067e..44f80c8d7 100644 --- a/src/Artemis.UI/Screens/Debugger/DebugViewModel.cs +++ b/src/Artemis.UI/Screens/Debugger/DebugViewModel.cs @@ -15,14 +15,10 @@ public class DebugViewModel : ActivatableViewModelBase, IScreen { private ViewModelBase _selectedItem; - public DebugViewModel(IDebugService debugService, - RenderDebugViewModel render, - DataModelDebugViewModel dataModel, - PerformanceDebugViewModel performance, - LogsDebugViewModel logs) + public DebugViewModel(IDebugService debugService, RenderDebugViewModel render, DataModelDebugViewModel dataModel, PerformanceDebugViewModel performance, LogsDebugViewModel logs) { Items = new ObservableCollection {render, dataModel, performance, logs}; - SelectedItem = render; + _selectedItem = render; this.WhenActivated(d => Disposable.Create(debugService.ClearDebugger).DisposeWith(d)); } diff --git a/src/Artemis.UI/Screens/ProfileEditor/Panels/Properties/Timeline/Segments/TimelineSegmentViewModel.cs b/src/Artemis.UI/Screens/ProfileEditor/Panels/Properties/Timeline/Segments/TimelineSegmentViewModel.cs index da58970a6..842b23600 100644 --- a/src/Artemis.UI/Screens/ProfileEditor/Panels/Properties/Timeline/Segments/TimelineSegmentViewModel.cs +++ b/src/Artemis.UI/Screens/ProfileEditor/Panels/Properties/Timeline/Segments/TimelineSegmentViewModel.cs @@ -28,7 +28,7 @@ public abstract class TimelineSegmentViewModel : ActivatableViewModelBase private ObservableAsPropertyHelper? _showAddEnd; private ObservableAsPropertyHelper? _showAddMain; private ObservableAsPropertyHelper? _showAddStart; - private ReactiveCommand _removeSegment; + private ReactiveCommand? _removeSegment; protected TimelineSegmentViewModel(IProfileEditorService profileEditorService, IWindowService windowService) { @@ -102,7 +102,7 @@ public abstract class TimelineSegmentViewModel : ActivatableViewModelBase public ReactiveCommand EditTime { get; } - public ReactiveCommand RemoveSegment + public ReactiveCommand? RemoveSegment { get => _removeSegment; set => RaiseAndSetIfChanged(ref _removeSegment, value); diff --git a/src/Artemis.UI/Screens/ProfileEditor/ProfileEditorViewModel.cs b/src/Artemis.UI/Screens/ProfileEditor/ProfileEditorViewModel.cs index cb643ba0c..4e9515211 100644 --- a/src/Artemis.UI/Screens/ProfileEditor/ProfileEditorViewModel.cs +++ b/src/Artemis.UI/Screens/ProfileEditor/ProfileEditorViewModel.cs @@ -27,11 +27,11 @@ public class ProfileEditorViewModel : MainScreenViewModel private ObservableAsPropertyHelper? _history; private ObservableAsPropertyHelper? _profileConfiguration; private ObservableAsPropertyHelper? _suspendedEditing; - private StatusBarViewModel _statusBarViewModel; - private DisplayConditionScriptViewModel _displayConditionScriptViewModel; - private PropertiesViewModel _propertiesViewModel; - private ProfileTreeViewModel _profileTreeViewModel; - private VisualEditorViewModel _visualEditorViewModel; + private StatusBarViewModel? _statusBarViewModel; + private DisplayConditionScriptViewModel? _displayConditionScriptViewModel; + private PropertiesViewModel? _propertiesViewModel; + private ProfileTreeViewModel? _profileTreeViewModel; + private VisualEditorViewModel? _visualEditorViewModel; /// public ProfileEditorViewModel(IScreen hostScreen, @@ -79,31 +79,31 @@ public class ProfileEditorViewModel : MainScreenViewModel ToggleAutoSuspend = ReactiveCommand.Create(ExecuteToggleAutoSuspend); } - public VisualEditorViewModel VisualEditorViewModel + public VisualEditorViewModel? VisualEditorViewModel { get => _visualEditorViewModel; set => RaiseAndSetIfChanged(ref _visualEditorViewModel, value); } - public ProfileTreeViewModel ProfileTreeViewModel + public ProfileTreeViewModel? ProfileTreeViewModel { get => _profileTreeViewModel; set => RaiseAndSetIfChanged(ref _profileTreeViewModel, value); } - public PropertiesViewModel PropertiesViewModel + public PropertiesViewModel? PropertiesViewModel { get => _propertiesViewModel; set => RaiseAndSetIfChanged(ref _propertiesViewModel, value); } - public DisplayConditionScriptViewModel DisplayConditionScriptViewModel + public DisplayConditionScriptViewModel? DisplayConditionScriptViewModel { get => _displayConditionScriptViewModel; set => RaiseAndSetIfChanged(ref _displayConditionScriptViewModel, value); } - public StatusBarViewModel StatusBarViewModel + public StatusBarViewModel? StatusBarViewModel { get => _statusBarViewModel; set => RaiseAndSetIfChanged(ref _statusBarViewModel, value); diff --git a/src/Artemis.UI/Screens/Root/RootViewModel.cs b/src/Artemis.UI/Screens/Root/RootViewModel.cs index 8e7a71146..72def4022 100644 --- a/src/Artemis.UI/Screens/Root/RootViewModel.cs +++ b/src/Artemis.UI/Screens/Root/RootViewModel.cs @@ -67,7 +67,6 @@ namespace Artemis.UI.Screens.Root registrationService.RegisterBuiltInDataModelDisplays(); registrationService.RegisterBuiltInDataModelInputs(); registrationService.RegisterBuiltInPropertyEditors(); - registrationService.RegisterBuiltInNodeTypes(); }); } @@ -156,23 +155,26 @@ namespace Artemis.UI.Screens.Root /// public void OpenMainWindow() { - if (_lifeTime.MainWindow == null) + Dispatcher.UIThread.Post(() => { - SidebarViewModel = _sidebarVmFactory.SidebarViewModel(this); - _lifeTime.MainWindow = new MainWindow {DataContext = this}; - _lifeTime.MainWindow.Show(); - _lifeTime.MainWindow.Closing += CurrentMainWindowOnClosing; - } + if (_lifeTime.MainWindow == null) + { + SidebarViewModel = _sidebarVmFactory.SidebarViewModel(this); + _lifeTime.MainWindow = new MainWindow {DataContext = this}; + _lifeTime.MainWindow.Show(); + _lifeTime.MainWindow.Closing += CurrentMainWindowOnClosing; + } - _lifeTime.MainWindow.WindowState = WindowState.Normal; - _lifeTime.MainWindow.Activate(); - OnMainWindowOpened(); + _lifeTime.MainWindow.WindowState = WindowState.Normal; + _lifeTime.MainWindow.Activate(); + OnMainWindowOpened(); + }); } /// public void CloseMainWindow() { - _lifeTime.MainWindow?.Close(); + Dispatcher.UIThread.Post(() => { _lifeTime.MainWindow?.Close(); }); } /// diff --git a/src/Artemis.UI/Screens/Scripting/ScriptsDialogViewModel.cs b/src/Artemis.UI/Screens/Scripting/ScriptsDialogViewModel.cs index 8aa44521e..1dceb74eb 100644 --- a/src/Artemis.UI/Screens/Scripting/ScriptsDialogViewModel.cs +++ b/src/Artemis.UI/Screens/Scripting/ScriptsDialogViewModel.cs @@ -42,6 +42,7 @@ public class ScriptsDialogViewModel : DialogViewModelBase AddScriptConfiguration = ReactiveCommand.CreateFromTask(ExecuteAddScriptConfiguration, Observable.Return(ScriptingProviders.Any())); this.WhenAnyValue(vm => vm.SelectedScript).Subscribe(s => SetupScriptEditor(s?.ScriptConfiguration)); + _scriptConfigurations = new ReadOnlyObservableCollection(new ObservableCollection()); // TODO: When not bound to a profile, base the contents of the UI on the ScriptingService } @@ -64,7 +65,7 @@ public class ScriptsDialogViewModel : DialogViewModelBase .Subscribe() .DisposeWith(d); - ScriptConfigurations = scriptConfigurationViewModels; + _scriptConfigurations = scriptConfigurationViewModels; SelectedScript = ScriptConfigurations.FirstOrDefault(); Disposable.Create(() => profileService.SaveProfile(Profile, false)).DisposeWith(d); }); diff --git a/src/Artemis.UI/Screens/Sidebar/Dialogs/ProfileConfigurationEditViewModel.cs b/src/Artemis.UI/Screens/Sidebar/Dialogs/ProfileConfigurationEditViewModel.cs index ea22c1117..36f5eff5b 100644 --- a/src/Artemis.UI/Screens/Sidebar/Dialogs/ProfileConfigurationEditViewModel.cs +++ b/src/Artemis.UI/Screens/Sidebar/Dialogs/ProfileConfigurationEditViewModel.cs @@ -134,7 +134,7 @@ namespace Artemis.UI.Screens.Sidebar public ReactiveCommand Confirm { get; } public ReactiveCommand Import { get; } public ReactiveCommand Delete { get; } - public new ReactiveCommand Cancel { get; } + public ReactiveCommand Cancel { get; } private async Task ExecuteImport() { diff --git a/src/Artemis.UI/Services/RegistrationService.cs b/src/Artemis.UI/Services/RegistrationService.cs index de6811cba..f5c72034d 100644 --- a/src/Artemis.UI/Services/RegistrationService.cs +++ b/src/Artemis.UI/Services/RegistrationService.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.Linq; using Artemis.Core; using Artemis.Core.Services; +using Artemis.UI.Controllers; using Artemis.UI.DefaultTypes.PropertyInput; using Artemis.UI.Services.Interfaces; using Artemis.UI.Shared.DefaultTypes.DataModel.Display; @@ -25,6 +26,7 @@ public class RegistrationService : IRegistrationService private readonly IPropertyInputService _propertyInputService; private readonly INodeService _nodeService; private readonly IDataModelUIService _dataModelUIService; + private readonly IWebServerService _webServerService; private bool _registeredBuiltInPropertyEditors; public RegistrationService(IKernel kernel, @@ -33,6 +35,7 @@ public class RegistrationService : IRegistrationService IProfileEditorService profileEditorService, INodeService nodeService, IDataModelUIService dataModelUIService, + IWebServerService webServerService, IDeviceLayoutService deviceLayoutService // here to make sure it is instantiated ) { @@ -41,8 +44,11 @@ public class RegistrationService : IRegistrationService _propertyInputService = propertyInputService; _nodeService = nodeService; _dataModelUIService = dataModelUIService; + _webServerService = webServerService; CreateCursorResources(); + RegisterBuiltInNodeTypes(); + RegisterControllers(); } private void CreateCursorResources() @@ -87,6 +93,7 @@ public class RegistrationService : IRegistrationService public void RegisterControllers() { + _webServerService.AddController(Constants.CorePlugin.Features.First().Instance!); } public void RegisterBuiltInNodeTypes() diff --git a/src/Artemis.UI/Services/UpdateService.cs b/src/Artemis.UI/Services/UpdateService.cs index 457868c82..ec1b3e673 100644 --- a/src/Artemis.UI/Services/UpdateService.cs +++ b/src/Artemis.UI/Services/UpdateService.cs @@ -54,7 +54,7 @@ public class UpdateService : IUpdateService private async void WindowServiceOnMainWindowOpened(object? sender, EventArgs e) { - // await AutoUpdate(); + await AutoUpdate(); } private async Task AutoUpdate() diff --git a/src/Artemis.UI/packages.lock.json b/src/Artemis.UI/packages.lock.json index 3b738a163..514e5a064 100644 --- a/src/Artemis.UI/packages.lock.json +++ b/src/Artemis.UI/packages.lock.json @@ -50,6 +50,18 @@ "Avalonia.X11": "0.10.18" } }, + "Avalonia.Diagnostics": { + "type": "Direct", + "requested": "[0.10.18, )", + "resolved": "0.10.18", + "contentHash": "3PjA6r0mmRUeS+R34VtYAyzmlPeqflsQ9B8E2TrZKGke0Wo6t3JsvPWA8ynA/ii0icPnnn7nmQaEZQs07ZthxQ==", + "dependencies": { + "Avalonia": "0.10.18", + "Avalonia.Controls.DataGrid": "0.10.18", + "Microsoft.CodeAnalysis.CSharp.Scripting": "3.4.0", + "System.Reactive": "5.0.0" + } + }, "Avalonia.ReactiveUI": { "type": "Direct", "requested": "[0.10.18, )", @@ -185,11 +197,11 @@ }, "Avalonia.Controls.DataGrid": { "type": "Transitive", - "resolved": "0.10.15", - "contentHash": "a0A0RcZU1FSCUxKHkYP49df9HjlvU9gdS+DqF6VR7zc3TYbaFwLHF0pg5fsjkW/FMgzUfO70NX/WwpDeu6celg==", + "resolved": "0.10.18", + "contentHash": "LDNZxnzk++GgBeUKsqmeWJDQgF83C4Quk4Wn0z5P6vIm1f5YSSFJL6JbibbIAvjqlGjqWWFTBZpHMUNjdyw4Aw==", "dependencies": { - "Avalonia": "0.10.15", - "Avalonia.Remote.Protocol": "0.10.15", + "Avalonia": "0.10.18", + "Avalonia.Remote.Protocol": "0.10.18", "JetBrains.Annotations": "10.3.0", "System.Reactive": "5.0.0" } @@ -380,6 +392,75 @@ "resolved": "0.10.4", "contentHash": "enc2U+/1UnF3rtocxb5ofcg7cJSmJI4adbYPr8DZa5bQzvhqA/VbjlcalxoqjI3CR2RvM5WWpjKT0p3BriFJjw==" }, + "Microsoft.CodeAnalysis.Analyzers": { + "type": "Transitive", + "resolved": "2.9.6", + "contentHash": "Kmms3TxGQMNb95Cu/3K+0bIcMnV4qf/phZBLAB0HUi65rBPxP4JO3aM2LoAcb+DFS600RQJMZ7ZLyYDTbLwJOQ==" + }, + "Microsoft.CodeAnalysis.Common": { + "type": "Transitive", + "resolved": "3.4.0", + "contentHash": "3ncA7cV+iXGA1VYwe2UEZXcvWyZSlbexWjM9AvocP7sik5UD93qt9Hq0fMRGk0jFRmvmE4T2g+bGfXiBVZEhLw==", + "dependencies": { + "Microsoft.CodeAnalysis.Analyzers": "2.9.6", + "System.Collections.Immutable": "1.5.0", + "System.Memory": "4.5.3", + "System.Reflection.Metadata": "1.6.0", + "System.Runtime.CompilerServices.Unsafe": "4.5.2", + "System.Text.Encoding.CodePages": "4.5.1", + "System.Threading.Tasks.Extensions": "4.5.3" + } + }, + "Microsoft.CodeAnalysis.CSharp": { + "type": "Transitive", + "resolved": "3.4.0", + "contentHash": "/LsTtgcMN6Tu1oo7/WYbRAHL4/ubXC/miEakwTpcZKJKtFo7D0AK95Hw0dbGxul6C8WJu60v6NP2435TDYZM+Q==", + "dependencies": { + "Microsoft.CodeAnalysis.Common": "[3.4.0]" + } + }, + "Microsoft.CodeAnalysis.CSharp.Scripting": { + "type": "Transitive", + "resolved": "3.4.0", + "contentHash": "tLgqc76qXHmONUhWhxo7z3TcL/LmGFWIUJm1exbQmVJohuQvJnejUMxmVkdxDfMuMZU1fIyJXPZ6Fkp4FEneAg==", + "dependencies": { + "Microsoft.CSharp": "4.3.0", + "Microsoft.CodeAnalysis.CSharp": "[3.4.0]", + "Microsoft.CodeAnalysis.Common": "[3.4.0]", + "Microsoft.CodeAnalysis.Scripting.Common": "[3.4.0]" + } + }, + "Microsoft.CodeAnalysis.Scripting.Common": { + "type": "Transitive", + "resolved": "3.4.0", + "contentHash": "+b6I3DZL2zvck+B/E/aiOveakj5U2G2BcYODQxcGh2IDbatNU3XXxGT1HumkWB5uIZI2Leu0opBgBpjScmjGMA==", + "dependencies": { + "Microsoft.CodeAnalysis.Common": "[3.4.0]" + } + }, + "Microsoft.CSharp": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "P+MBhIM0YX+JqROuf7i306ZLJEjQYA9uUyRDE+OqwUI5sh41e2ZbPQV3LfAPh+29cmceE1pUffXsGfR4eMY3KA==", + "dependencies": { + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Dynamic.Runtime": "4.3.0", + "System.Globalization": "4.3.0", + "System.Linq": "4.3.0", + "System.Linq.Expressions": "4.3.0", + "System.ObjectModel": "4.3.0", + "System.Reflection": "4.3.0", + "System.Reflection.Extensions": "4.3.0", + "System.Reflection.Primitives": "4.3.0", + "System.Reflection.TypeExtensions": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Threading": "4.3.0" + } + }, "Microsoft.DotNet.PlatformAbstractions": { "type": "Transitive", "resolved": "3.1.6", @@ -754,6 +835,11 @@ "System.Threading.Tasks": "4.3.0" } }, + "System.Collections.Immutable": { + "type": "Transitive", + "resolved": "1.5.0", + "contentHash": "EXKiDFsChZW0RjrZ4FYHu9aW6+P4MCgEDCklsVseRfhoO0F+dXeMSsMRAlVXIo06kGJ/zv+2w1a2uc2+kxxSaQ==" + }, "System.Collections.NonGeneric": { "type": "Transitive", "resolved": "4.3.0", @@ -1211,6 +1297,11 @@ "System.Runtime": "4.3.0" } }, + "System.Reflection.Metadata": { + "type": "Transitive", + "resolved": "1.6.0", + "contentHash": "COC1aiAJjCoA5GBF+QKL2uLqEBew4JsCkQmoHKbN3TlOZKa2fKLz5CpiRQKDz0RsAOEGsVKqOD5bomsXq/4STQ==" + }, "System.Reflection.Primitives": { "type": "Transitive", "resolved": "4.3.0", @@ -1531,13 +1622,8 @@ }, "System.Threading.Tasks.Extensions": { "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "npvJkVKl5rKXrtl1Kkm6OhOUaYGEiF9wFbppFRWSMoApKzt2PiPHT2Bb8a5sAWxprvdOAtvaARS9QYMznEUtug==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } + "resolved": "4.5.3", + "contentHash": "+MvhNtcvIbqmhANyKu91jQnvIRVSTiaOiFNfKWwXGHG48YAb4I/TyH8spsySiPYla7gKal5ZnF3teJqZAximyQ==" }, "System.Threading.Timer": { "type": "Transitive", @@ -1698,6 +1784,7 @@ "dependencies": { "Artemis.Core": "1.0.0", "Avalonia": "0.10.18", + "Avalonia.Diagnostics": "0.10.18", "Avalonia.ReactiveUI": "0.10.18", "Avalonia.Xaml.Behaviors": "0.10.18", "DynamicData": "7.9.14", diff --git a/src/Artemis.VisualScripting/packages.lock.json b/src/Artemis.VisualScripting/packages.lock.json index bd1d243f5..54e2c950d 100644 --- a/src/Artemis.VisualScripting/packages.lock.json +++ b/src/Artemis.VisualScripting/packages.lock.json @@ -103,11 +103,11 @@ }, "Avalonia.Controls.DataGrid": { "type": "Transitive", - "resolved": "0.10.15", - "contentHash": "a0A0RcZU1FSCUxKHkYP49df9HjlvU9gdS+DqF6VR7zc3TYbaFwLHF0pg5fsjkW/FMgzUfO70NX/WwpDeu6celg==", + "resolved": "0.10.18", + "contentHash": "LDNZxnzk++GgBeUKsqmeWJDQgF83C4Quk4Wn0z5P6vIm1f5YSSFJL6JbibbIAvjqlGjqWWFTBZpHMUNjdyw4Aw==", "dependencies": { - "Avalonia": "0.10.15", - "Avalonia.Remote.Protocol": "0.10.15", + "Avalonia": "0.10.18", + "Avalonia.Remote.Protocol": "0.10.18", "JetBrains.Annotations": "10.3.0", "System.Reactive": "5.0.0" } @@ -124,6 +124,17 @@ "Avalonia.X11": "0.10.15" } }, + "Avalonia.Diagnostics": { + "type": "Transitive", + "resolved": "0.10.18", + "contentHash": "3PjA6r0mmRUeS+R34VtYAyzmlPeqflsQ9B8E2TrZKGke0Wo6t3JsvPWA8ynA/ii0icPnnn7nmQaEZQs07ZthxQ==", + "dependencies": { + "Avalonia": "0.10.18", + "Avalonia.Controls.DataGrid": "0.10.18", + "Microsoft.CodeAnalysis.CSharp.Scripting": "3.4.0", + "System.Reactive": "5.0.0" + } + }, "Avalonia.FreeDesktop": { "type": "Transitive", "resolved": "0.10.15", @@ -335,6 +346,75 @@ "resolved": "0.10.4", "contentHash": "enc2U+/1UnF3rtocxb5ofcg7cJSmJI4adbYPr8DZa5bQzvhqA/VbjlcalxoqjI3CR2RvM5WWpjKT0p3BriFJjw==" }, + "Microsoft.CodeAnalysis.Analyzers": { + "type": "Transitive", + "resolved": "2.9.6", + "contentHash": "Kmms3TxGQMNb95Cu/3K+0bIcMnV4qf/phZBLAB0HUi65rBPxP4JO3aM2LoAcb+DFS600RQJMZ7ZLyYDTbLwJOQ==" + }, + "Microsoft.CodeAnalysis.Common": { + "type": "Transitive", + "resolved": "3.4.0", + "contentHash": "3ncA7cV+iXGA1VYwe2UEZXcvWyZSlbexWjM9AvocP7sik5UD93qt9Hq0fMRGk0jFRmvmE4T2g+bGfXiBVZEhLw==", + "dependencies": { + "Microsoft.CodeAnalysis.Analyzers": "2.9.6", + "System.Collections.Immutable": "1.5.0", + "System.Memory": "4.5.3", + "System.Reflection.Metadata": "1.6.0", + "System.Runtime.CompilerServices.Unsafe": "4.5.2", + "System.Text.Encoding.CodePages": "4.5.1", + "System.Threading.Tasks.Extensions": "4.5.3" + } + }, + "Microsoft.CodeAnalysis.CSharp": { + "type": "Transitive", + "resolved": "3.4.0", + "contentHash": "/LsTtgcMN6Tu1oo7/WYbRAHL4/ubXC/miEakwTpcZKJKtFo7D0AK95Hw0dbGxul6C8WJu60v6NP2435TDYZM+Q==", + "dependencies": { + "Microsoft.CodeAnalysis.Common": "[3.4.0]" + } + }, + "Microsoft.CodeAnalysis.CSharp.Scripting": { + "type": "Transitive", + "resolved": "3.4.0", + "contentHash": "tLgqc76qXHmONUhWhxo7z3TcL/LmGFWIUJm1exbQmVJohuQvJnejUMxmVkdxDfMuMZU1fIyJXPZ6Fkp4FEneAg==", + "dependencies": { + "Microsoft.CSharp": "4.3.0", + "Microsoft.CodeAnalysis.CSharp": "[3.4.0]", + "Microsoft.CodeAnalysis.Common": "[3.4.0]", + "Microsoft.CodeAnalysis.Scripting.Common": "[3.4.0]" + } + }, + "Microsoft.CodeAnalysis.Scripting.Common": { + "type": "Transitive", + "resolved": "3.4.0", + "contentHash": "+b6I3DZL2zvck+B/E/aiOveakj5U2G2BcYODQxcGh2IDbatNU3XXxGT1HumkWB5uIZI2Leu0opBgBpjScmjGMA==", + "dependencies": { + "Microsoft.CodeAnalysis.Common": "[3.4.0]" + } + }, + "Microsoft.CSharp": { + "type": "Transitive", + "resolved": "4.3.0", + "contentHash": "P+MBhIM0YX+JqROuf7i306ZLJEjQYA9uUyRDE+OqwUI5sh41e2ZbPQV3LfAPh+29cmceE1pUffXsGfR4eMY3KA==", + "dependencies": { + "System.Collections": "4.3.0", + "System.Diagnostics.Debug": "4.3.0", + "System.Dynamic.Runtime": "4.3.0", + "System.Globalization": "4.3.0", + "System.Linq": "4.3.0", + "System.Linq.Expressions": "4.3.0", + "System.ObjectModel": "4.3.0", + "System.Reflection": "4.3.0", + "System.Reflection.Extensions": "4.3.0", + "System.Reflection.Primitives": "4.3.0", + "System.Reflection.TypeExtensions": "4.3.0", + "System.Resources.ResourceManager": "4.3.0", + "System.Runtime": "4.3.0", + "System.Runtime.Extensions": "4.3.0", + "System.Runtime.InteropServices": "4.3.0", + "System.Threading": "4.3.0" + } + }, "Microsoft.DotNet.PlatformAbstractions": { "type": "Transitive", "resolved": "3.1.6", @@ -697,6 +777,11 @@ "System.Threading.Tasks": "4.3.0" } }, + "System.Collections.Immutable": { + "type": "Transitive", + "resolved": "1.5.0", + "contentHash": "EXKiDFsChZW0RjrZ4FYHu9aW6+P4MCgEDCklsVseRfhoO0F+dXeMSsMRAlVXIo06kGJ/zv+2w1a2uc2+kxxSaQ==" + }, "System.Collections.NonGeneric": { "type": "Transitive", "resolved": "4.3.0", @@ -1154,6 +1239,11 @@ "System.Runtime": "4.3.0" } }, + "System.Reflection.Metadata": { + "type": "Transitive", + "resolved": "1.6.0", + "contentHash": "COC1aiAJjCoA5GBF+QKL2uLqEBew4JsCkQmoHKbN3TlOZKa2fKLz5CpiRQKDz0RsAOEGsVKqOD5bomsXq/4STQ==" + }, "System.Reflection.Primitives": { "type": "Transitive", "resolved": "4.3.0", @@ -1425,6 +1515,15 @@ "System.Runtime": "4.3.0" } }, + "System.Text.Encoding.CodePages": { + "type": "Transitive", + "resolved": "4.5.1", + "contentHash": "4J2JQXbftjPMppIHJ7IC+VXQ9XfEagN92vZZNoG12i+zReYlim5dMoXFC1Zzg7tsnKDM7JPo5bYfFK4Jheq44w==", + "dependencies": { + "Microsoft.NETCore.Platforms": "2.1.2", + "System.Runtime.CompilerServices.Unsafe": "4.5.2" + } + }, "System.Text.Encoding.Extensions": { "type": "Transitive", "resolved": "4.3.0", @@ -1465,13 +1564,8 @@ }, "System.Threading.Tasks.Extensions": { "type": "Transitive", - "resolved": "4.3.0", - "contentHash": "npvJkVKl5rKXrtl1Kkm6OhOUaYGEiF9wFbppFRWSMoApKzt2PiPHT2Bb8a5sAWxprvdOAtvaARS9QYMznEUtug==", - "dependencies": { - "System.Collections": "4.3.0", - "System.Runtime": "4.3.0", - "System.Threading.Tasks": "4.3.0" - } + "resolved": "4.5.3", + "contentHash": "+MvhNtcvIbqmhANyKu91jQnvIRVSTiaOiFNfKWwXGHG48YAb4I/TyH8spsySiPYla7gKal5ZnF3teJqZAximyQ==" }, "System.Threading.Timer": { "type": "Transitive", @@ -1632,6 +1726,7 @@ "dependencies": { "Artemis.Core": "1.0.0", "Avalonia": "0.10.18", + "Avalonia.Diagnostics": "0.10.18", "Avalonia.ReactiveUI": "0.10.18", "Avalonia.Xaml.Behaviors": "0.10.18", "DynamicData": "7.9.14",