1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-13 05:48:35 +00:00

Linux input provider - Style fixes

Nodes - Added display value node
Nodes - Updated help link
This commit is contained in:
Robert 2022-08-20 21:48:46 +02:00
parent f9b3bc9377
commit 7a7d0ab387
16 changed files with 780 additions and 73 deletions

View File

@ -41,7 +41,7 @@ namespace Artemis.UI.Linux.Providers.Input
else if (Handlers?.Any(h => h.Contains("js")) == true)
DeviceType = LinuxDeviceType.Gamepad;
var evt = Handlers!.First(h => h.Contains("event"));
string evt = Handlers!.First(h => h.Contains("event"));
EventPath = $"/dev/input/{evt}";
break;
@ -73,7 +73,7 @@ namespace Artemis.UI.Linux.Providers.Input
public LinuxInputId(string line)
{
var components = line.Split(" ")
Dictionary<string, string> components = line.Split(" ")
.Select(c => c.Split('='))
.ToDictionary(c => c[0], c => c[1]);

View File

@ -54,7 +54,7 @@ namespace Artemis.UI.Linux.Providers.Input
_logger.Verbose($"Keyboard Key: {(LinuxKeyboardKeyCodes)args.Code} | Down: {isDown}");
var identifier = keyboard.InputId;
LinuxInputDevice.LinuxInputId identifier = keyboard.InputId;
OnIdentifierReceived(identifier, InputDeviceType.Keyboard);
@ -79,7 +79,7 @@ namespace Artemis.UI.Linux.Providers.Input
private void HandleMouseData(LinuxInputDevice mouse, LinuxInputEventArgs args)
{
var identifier = mouse.InputId;
LinuxInputDevice.LinuxInputId identifier = mouse.InputId;
OnIdentifierReceived(identifier, InputDeviceType.Mouse);

View File

@ -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",

View File

@ -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",

View File

@ -31,6 +31,20 @@ namespace Artemis.UI.Shared.Services
/// <param name="exception">The exception to display</param>
void ShowExceptionDialog(string title, Exception exception);
/// <summary>
/// Creates a view model instance of type <typeparamref name="TViewModel" /> and shows its corresponding View as a
/// dialog
/// </summary>
/// <typeparam name="TViewModel">The type of view model to create</typeparam>
/// <returns>The created view model</returns>
Task<TViewModel> ShowDialogAsync<TViewModel>(params (string name, object value)[] parameters);
/// <summary>
/// Given a ViewModel, show its corresponding View as a dialog
/// </summary>
/// <param name="viewModel">ViewModel to show the View for</param>
Task ShowDialogAsync(object viewModel);
/// <summary>
/// Given an existing ViewModel, show its corresponding View as a Dialog
/// </summary>

View File

@ -53,6 +53,32 @@ namespace Artemis.UI.Shared.Services
return window;
}
public async Task<T> ShowDialogAsync<T>(params (string name, object value)[] parameters)
{
IParameter[] paramsArray = parameters.Select(kv => new ConstructorArgument(kv.name, kv.value)).Cast<IParameter>().ToArray();
T viewModel = _kernel.Get<T>(paramsArray)!;
await ShowDialogAsync(viewModel);
return viewModel;
}
public async Task ShowDialogAsync(object viewModel)
{
Window? parent = GetCurrentWindow();
string name = viewModel.GetType().FullName!.Split('`')[0].Replace("ViewModel", "View");
Type? type = viewModel.GetType().Assembly.GetType(name);
if (type == null)
throw new ArtemisSharedUIException($"Failed to find a window named {name}.");
if (!type.IsAssignableTo(typeof(Window)))
throw new ArtemisSharedUIException($"Type {name} is not a window.");
Window window = (Window) Activator.CreateInstance(type)!;
window.DataContext = viewModel;
await window.ShowDialog(parent);
}
public async Task<TResult> ShowDialogAsync<TViewModel, TResult>(params (string name, object? value)[] parameters) where TViewModel : DialogViewModelBase<TResult>
{
IParameter[] paramsArray = parameters.Select(kv => new ConstructorArgument(kv.name, kv.value)).Cast<IParameter>().ToArray();
@ -119,7 +145,7 @@ namespace Artemis.UI.Shared.Services
throw new ArtemisSharedUIException("Can't show a content dialog without any windows being shown.");
return new ContentDialogBuilder(_kernel, currentWindow);
}
public OpenFolderDialogBuilder CreateOpenFolderDialog()
{
Window? currentWindow = GetCurrentWindow();

View File

@ -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",

View File

@ -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",

View File

@ -165,7 +165,7 @@
Grid.Column="1"
VerticalAlignment="Top"
HorizontalAlignment="Right"
NavigateUri="https://wiki.artemis-rgb.com/en/guides/user/profiles/conditions">
NavigateUri="https://wiki.artemis-rgb.com/en/guides/user/profiles/nodes">
Learn more about visual scripts
</controls:HyperlinkButton>

View File

@ -100,7 +100,7 @@ public class RegistrationService : IRegistrationService
{
_nodeService.RegisterTypeColor(Constants.CorePlugin, typeof(bool), new SKColor(0xFFCD3232));
_nodeService.RegisterTypeColor(Constants.CorePlugin, typeof(string), new SKColor(0xFFFFD700));
_nodeService.RegisterTypeColor(Constants.CorePlugin, typeof(int), new SKColor(0xFF32CD32));
_nodeService.RegisterTypeColor(Constants.CorePlugin, typeof(Numeric), new SKColor(0xFF32CD32));
_nodeService.RegisterTypeColor(Constants.CorePlugin, typeof(float), new SKColor(0xFFFF7C00));
_nodeService.RegisterTypeColor(Constants.CorePlugin, typeof(SKColor), new SKColor(0xFFAD3EED));
_nodeService.RegisterTypeColor(Constants.CorePlugin, typeof(IList), new SKColor(0xFFED3E61));

View File

@ -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",

View File

@ -0,0 +1,19 @@
using Artemis.Core;
using Artemis.VisualScripting.Nodes.Static.Screens;
namespace Artemis.VisualScripting.Nodes.Static;
[Node("Display Value", "Displays an input value for testing purposes.", "Static", InputType = typeof(object))]
public class DisplayValueNode : Node<string, DisplayValueNodeCustomViewModel>
{
public DisplayValueNode() : base("Display Value", "Displays an input value for testing purposes.")
{
Input = CreateInputPin<object>();
}
public InputPin<object> Input { get; }
public override void Evaluate()
{
}
}

View File

@ -0,0 +1,51 @@
<UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:screens="clr-namespace:Artemis.VisualScripting.Nodes.Static.Screens"
xmlns:skiaSharp="clr-namespace:SkiaSharp;assembly=SkiaSharp"
xmlns:core="clr-namespace:Artemis.Core;assembly=Artemis.Core"
xmlns:converters1="clr-namespace:Artemis.UI.Shared.Converters;assembly=Artemis.UI.Shared"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="Artemis.VisualScripting.Nodes.Static.Screens.DisplayValueNodeCustomView"
x:DataType="screens:DisplayValueNodeCustomViewModel">
<UserControl.Resources>
<converters1:SKColorToStringConverter x:Key="SKColorToStringConverter" />
<converters1:SKColorToColorConverter x:Key="SKColorToColorConverter" />
</UserControl.Resources>
<ContentControl Content="{CompiledBinding CurrentValue}" VerticalContentAlignment="Center">
<ContentControl.DataTemplates>
<DataTemplate DataType="skiaSharp:SKColor">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
<TextBlock x:Name="HexDisplay"
Text="{CompiledBinding Converter={StaticResource SKColorToStringConverter}}"
VerticalAlignment="Center"
HorizontalAlignment="Stretch"
FontFamily="Consolas"/>
<Border Margin="5 0 0 0"
VerticalAlignment="Bottom"
HorizontalAlignment="Right"
BorderThickness="1"
MinWidth="18"
MinHeight="18"
Background="{DynamicResource CheckerboardBrush}"
BorderBrush="{DynamicResource ColorPickerButtonOutline}"
CornerRadius="4"
ClipToBounds="True">
<Border CornerRadius="4">
<Border.Background>
<SolidColorBrush Color="{Binding Converter={StaticResource SKColorToColorConverter}}" />
</Border.Background>
</Border>
</Border>
</StackPanel>
</DataTemplate>
<DataTemplate DataType="core:Numeric">
<TextBlock Text="{Binding}" FontFamily="Consolas"/>
</DataTemplate>
<DataTemplate>
<TextBlock Text="{Binding}" FontFamily="Consolas"/>
</DataTemplate>
</ContentControl.DataTemplates>
</ContentControl>
</UserControl>

View File

@ -0,0 +1,19 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
using Avalonia.ReactiveUI;
namespace Artemis.VisualScripting.Nodes.Static.Screens;
public partial class DisplayValueNodeCustomView : ReactiveUserControl<DisplayValueNodeCustomViewModel>
{
public DisplayValueNodeCustomView()
{
InitializeComponent();
}
private void InitializeComponent()
{
AvaloniaXamlLoader.Load(this);
}
}

View File

@ -0,0 +1,37 @@
using System.Reactive.Disposables;
using Artemis.Core;
using Artemis.UI.Shared.VisualScripting;
using Avalonia.Threading;
using ReactiveUI;
namespace Artemis.VisualScripting.Nodes.Static.Screens;
public class DisplayValueNodeCustomViewModel : CustomNodeViewModel
{
private readonly DisplayValueNode _node;
private object? _currentValue;
public DisplayValueNodeCustomViewModel(DisplayValueNode node, INodeScript script) : base(node, script)
{
_node = node;
// Because the DisplayValueNode has no output it never evaluates, manually do so here
this.WhenActivated(d =>
{
DispatcherTimer updateTimer = new(TimeSpan.FromMilliseconds(25.0 / 1000), DispatcherPriority.Normal, Update);
updateTimer.Start();
Disposable.Create(() => updateTimer.Stop()).DisposeWith(d);
});
}
public object? CurrentValue
{
get => _currentValue;
private set => this.RaiseAndSetIfChanged(ref _currentValue, value);
}
private void Update(object? sender, EventArgs e)
{
CurrentValue = _node.Input.Value;
}
}

View File

@ -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",