diff --git a/src/.idea/.idea.Artemis/.idea/avalonia.xml b/src/.idea/.idea.Artemis/.idea/avalonia.xml
index 2363528ee..c9701a626 100644
--- a/src/.idea/.idea.Artemis/.idea/avalonia.xml
+++ b/src/.idea/.idea.Artemis/.idea/avalonia.xml
@@ -19,6 +19,8 @@
+
+
@@ -40,6 +42,7 @@
+
diff --git a/src/Artemis.Core/Services/NodeService.cs b/src/Artemis.Core/Services/NodeService.cs
index 70c7d2e9b..6bffa8b37 100644
--- a/src/Artemis.Core/Services/NodeService.cs
+++ b/src/Artemis.Core/Services/NodeService.cs
@@ -87,7 +87,7 @@ namespace Artemis.Core.Services
nodeScript.Save();
return JsonConvert.SerializeObject(nodeScript.Entity, IProfileService.ExportSettings);
}
-
+
public void ImportScript(string json, NodeScript target)
{
NodeScriptEntity? entity = JsonConvert.DeserializeObject(json);
@@ -153,7 +153,18 @@ namespace Artemis.Core.Services
/// The color to display
TypeColorRegistration RegisterTypeColor(Plugin plugin, Type type, SKColor color);
+ ///
+ /// Exports the provided node script to JSON.
+ ///
+ /// The node script to export.
+ /// The resulting JSON.
string ExportScript(NodeScript nodeScript);
+
+ ///
+ /// Imports the provided JSON onto the provided node script, overwriting any existing contents.
+ ///
+ /// The JSON to import.
+ /// The target node script whose contents to overwrite.
void ImportScript(string json, NodeScript target);
}
}
\ No newline at end of file
diff --git a/src/Artemis.Storage/Artemis.Storage.csproj b/src/Artemis.Storage/Artemis.Storage.csproj
index 96200361d..03d35af84 100644
--- a/src/Artemis.Storage/Artemis.Storage.csproj
+++ b/src/Artemis.Storage/Artemis.Storage.csproj
@@ -1,15 +1,15 @@
-
- net6.0
- false
- x64
-
-
- x64
-
+
+ net6.0
+ false
+ x64
+
+
+ x64
+
-
-
-
-
+
+
+
+
\ No newline at end of file
diff --git a/src/Artemis.UI.Linux/Artemis.UI.Linux.csproj b/src/Artemis.UI.Linux/Artemis.UI.Linux.csproj
index 493530e27..285bbd78d 100644
--- a/src/Artemis.UI.Linux/Artemis.UI.Linux.csproj
+++ b/src/Artemis.UI.Linux/Artemis.UI.Linux.csproj
@@ -1,25 +1,25 @@
-
- WinExe
- net6.0
- enable
- x64
- x64
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ WinExe
+ net6.0
+ enable
+ x64
+ x64
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Artemis.UI.MacOS/Artemis.UI.MacOS.csproj b/src/Artemis.UI.MacOS/Artemis.UI.MacOS.csproj
index 493530e27..285bbd78d 100644
--- a/src/Artemis.UI.MacOS/Artemis.UI.MacOS.csproj
+++ b/src/Artemis.UI.MacOS/Artemis.UI.MacOS.csproj
@@ -1,25 +1,25 @@
-
- WinExe
- net6.0
- enable
- x64
- x64
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ WinExe
+ net6.0
+ enable
+ x64
+ x64
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Artemis.UI.Shared/Artemis.UI.Avalonia.Shared.xml b/src/Artemis.UI.Shared/Artemis.UI.Avalonia.Shared.xml
index 022dea7c7..7809ada7e 100644
--- a/src/Artemis.UI.Shared/Artemis.UI.Avalonia.Shared.xml
+++ b/src/Artemis.UI.Shared/Artemis.UI.Avalonia.Shared.xml
@@ -6,26 +6,36 @@
- Gets or sets the currently displayed icon as either a or an pointing
+ Gets or sets the currently displayed icon as either a
+
+ or an
+
+ pointing
to an SVG
- Gets or sets the currently displayed icon as either a or an pointing
+ Gets or sets the currently displayed icon as either a
+
+ or an
+
+ pointing
to an SVG
- Visualizes an with optional per-LED colors
+ Visualizes an
+
+ with optional per-LED colors
-
+
-
+
@@ -34,23 +44,29 @@
- Invokes the event
+ Invokes the
+
+ event
- Gets or sets the to display
+ Gets or sets the
+
+ to display
- Gets or sets the to display
+ Gets or sets the
+
+ to display
- Gets or sets boolean indicating whether or not to show per-LED colors
+ Gets or sets boolean indicating whether or not to show per-LED colors
@@ -69,13 +85,13 @@
-
+
-
+
-
+
@@ -88,48 +104,62 @@
-
+
-
+
- Gets or sets the to display
+ Gets or sets the
+
+ to display
- Gets or sets the to display
+ Gets or sets the
+
+ to display
- Visualizes an with optional per-LED colors
+ Visualizes an
+
+ with optional per-LED colors
- Defines the property.
+ Defines the
+
+ property.
- Defines the property.
+ Defines the
+
+ property.
- Defines the property.
+ Defines the
+
+ property.
- Defines the property.
+ Defines the
+
+ property.
-
+
@@ -147,36 +177,41 @@
-
+
-
+
- Converts into .
+ Converts
+
+ into.
-
+
-
+
- Converts into .
+ Converts
+
+ into.
-
+
-
+
- Provides data about selection events raised by
+ Provides data about selection events raised by
+
@@ -186,7 +221,8 @@
- Provides data about submit events raised by
+ Provides data about submit events raised by
+
@@ -246,17 +282,19 @@
- The main of the Artemis Shared UI toolkit that binds all services
+ The main
+
+ of the Artemis Shared UI toolkit that binds all services
-
+
-
+
-
+
@@ -264,7 +302,7 @@
-
+
@@ -273,7 +311,9 @@
- Creates a new instance of the class
+ Creates a new instance of the
+
+ class
@@ -294,7 +334,7 @@
- Represents a builder that can create a .
+ Represents a builder that can create a.
@@ -314,7 +354,7 @@
- Represents a builder that can create a .
+ Represents a builder that can create a.
@@ -353,7 +393,7 @@
- Represents a builder that can create a .
+ Represents a builder that can create a.
@@ -397,59 +437,74 @@
- Creates a view model instance of type and shows its corresponding View as a window
+ Creates a view model instance of type
+
+ and shows its corresponding View as a window
The type of view model to createThe created view model
- Given a ViewModel, show its corresponding View as a window
+ Given a ViewModel, show its corresponding View as a window
ViewModel to show the View for
- Shows a dialog displaying the given exception
+ Shows a dialog displaying the given exception
The title of the dialog
The exception to display
- Given an existing ViewModel, show its corresponding View as a Dialog
+ Given an existing ViewModel, show its corresponding View as a Dialog
The return type
ViewModel to show the View for
- A task containing the return value of type
+ A task containing the return value of type
+
+
- Creates a view model instance of type and shows its corresponding View as a Dialog
+ Creates a view model instance of type
+
+ and shows its corresponding View as a Dialog
The view model typeThe return type
- A task containing the return value of type
+ A task containing the return value of type
+
+
- Shows a content dialog asking the user to confirm an action
+ Shows a content dialog asking the user to confirm an action
The title of the dialog
The message of the dialog
The text of the confirm button
- The text of the cancel button, if the cancel button will not be shown
- A task containing the result of the dialog, if confirmed; otherwise
+ The text of the cancel button, if
+
+ the cancel button will not be shown
+
+ A task containing the result of the dialog,
+
+ if confirmed; otherwise
+
+
- Creates an open file dialog, use the fluent API to configure it
+ Creates an open file dialog, use the fluent API to configure it
The builder that can be used to configure the dialog
- Creates a save file dialog, use the fluent API to configure it
+ Creates a save file dialog, use the fluent API to configure it
The builder that can be used to configure the dialog
@@ -469,22 +524,24 @@
-
+
Releases the unmanaged resources used by the object and optionally releases the managed resources.
- to release both managed and unmanaged resources;
- to release only unmanaged resources.
+
+ to release both managed and unmanaged resources;
+
+ to release only unmanaged resources.
-
+
-
+
@@ -493,7 +550,8 @@
- Closes the dialog with the given
+ Closes the dialog with the given
+
The result of the dialog
diff --git a/src/Artemis.UI.Shared/Artemis.UI.Shared.csproj b/src/Artemis.UI.Shared/Artemis.UI.Shared.csproj
index 8e1c8fa0d..462420cc5 100644
--- a/src/Artemis.UI.Shared/Artemis.UI.Shared.csproj
+++ b/src/Artemis.UI.Shared/Artemis.UI.Shared.csproj
@@ -1,41 +1,41 @@
-
- Library
- net6.0
- enable
-
-
- bin\
- x64
- x64
-
-
- bin\Artemis.UI.Avalonia.Shared.xml
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- HotkeyBox.axaml
-
-
- %(Filename)
-
-
+
+ Library
+ net6.0
+ enable
+
+
+ bin\
+ x64
+ x64
+
+
+ bin\Artemis.UI.Avalonia.Shared.xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ HotkeyBox.axaml
+
+
+ %(Filename)
+
+
diff --git a/src/Artemis.UI.Shared/Controls/DraggableNumberBox.axaml.cs b/src/Artemis.UI.Shared/Controls/DraggableNumberBox.axaml.cs
index 653b829f9..3df5ab087 100644
--- a/src/Artemis.UI.Shared/Controls/DraggableNumberBox.axaml.cs
+++ b/src/Artemis.UI.Shared/Controls/DraggableNumberBox.axaml.cs
@@ -1,5 +1,4 @@
using System;
-using System.Diagnostics;
using Avalonia;
using Avalonia.Controls;
using Avalonia.Data;
@@ -12,99 +11,60 @@ using FluentAvalonia.UI.Controls;
namespace Artemis.UI.Shared.Controls;
-public partial class DraggableNumberBox : UserControl
+///
+/// Represents a number box that can be mutated by dragging over it horizontally
+///
+public class DraggableNumberBox : UserControl
{
///
- /// Gets or sets the value of the number box.
+ /// Defines the property.
///
public static readonly StyledProperty ValueProperty = AvaloniaProperty.Register(nameof(Value), defaultBindingMode: BindingMode.TwoWay);
///
- /// Gets or sets the value of the number box.
- ///
- public double Value
- {
- get => GetValue(ValueProperty);
- set => SetValue(ValueProperty, value);
- }
-
- ///
- /// Gets or sets the minimum of the number box.
+ /// Defines the property.
///
public static readonly StyledProperty MinimumProperty = AvaloniaProperty.Register(nameof(Minimum), double.MinValue);
///
- /// Gets or sets the minimum of the number box.
- ///
- public double Minimum
- {
- get => GetValue(MinimumProperty);
- set => SetValue(MinimumProperty, value);
- }
-
- ///
- /// Gets or sets the maximum of the number box.
+ /// Defines the property.
///
public static readonly StyledProperty MaximumProperty = AvaloniaProperty.Register(nameof(Maximum), double.MaxValue);
///
- /// Gets or sets the maximum of the number box.
+ /// Defines the property.
///
- public double Maximum
- {
- get => GetValue(MaximumProperty);
- set => SetValue(MaximumProperty, value);
- }
-
public static readonly StyledProperty LargeChangeProperty = AvaloniaProperty.Register(nameof(LargeChange));
- public double LargeChange
- {
- get => GetValue(LargeChangeProperty);
- set => SetValue(LargeChangeProperty, value);
- }
-
+ ///
+ /// Defines the property.
+ ///
public static readonly StyledProperty SmallChangeProperty = AvaloniaProperty.Register(nameof(SmallChange));
- public double SmallChange
- {
- get => GetValue(SmallChangeProperty);
- set => SetValue(SmallChangeProperty, value);
- }
-
+ ///
+ /// Defines the property.
+ ///
public static readonly StyledProperty SimpleNumberFormatProperty = AvaloniaProperty.Register(nameof(SimpleNumberFormat));
- public string SimpleNumberFormat
- {
- get => GetValue(SimpleNumberFormatProperty);
- set => SetValue(SimpleNumberFormatProperty, value);
- }
+ ///
+ /// Defines the property.
+ ///
+ public static readonly StyledProperty PrefixProperty = AvaloniaProperty.Register(nameof(Prefix));
- public static readonly StyledProperty PrefixProperty = AvaloniaProperty.Register(nameof(Prefix));
-
- public string Prefix
- {
- get => GetValue(PrefixProperty);
- set => SetValue(PrefixProperty, value);
- }
-
- public static readonly StyledProperty SuffixProperty = AvaloniaProperty.Register(nameof(Suffix));
-
- public string Suffix
- {
- get => GetValue(SuffixProperty);
- set => SetValue(SuffixProperty, value);
- }
-
- public event TypedEventHandler? DragStarted;
- public event TypedEventHandler? DragFinished;
+ ///
+ /// Defines the property.
+ ///
+ public static readonly StyledProperty SuffixProperty = AvaloniaProperty.Register(nameof(Suffix));
private readonly NumberBox _numberBox;
private TextBox? _inputTextBox;
- private bool _moved;
private double _lastX;
+ private bool _moved;
private double _startX;
+ ///
+ /// Creates a new instance of the class.
+ ///
public DraggableNumberBox()
{
InitializeComponent();
@@ -117,6 +77,88 @@ public partial class DraggableNumberBox : UserControl
AddHandler(KeyUpEvent, HandleKeyUp, RoutingStrategies.Direct | RoutingStrategies.Tunnel | RoutingStrategies.Bubble, true);
}
+ ///
+ /// Gets or sets the value of the number box.
+ ///
+ public double Value
+ {
+ get => GetValue(ValueProperty);
+ set => SetValue(ValueProperty, value);
+ }
+
+ ///
+ /// Gets or sets the minimum of the number box.
+ ///
+ public double Minimum
+ {
+ get => GetValue(MinimumProperty);
+ set => SetValue(MinimumProperty, value);
+ }
+
+ ///
+ /// Gets or sets the maximum of the number box.
+ ///
+ public double Maximum
+ {
+ get => GetValue(MaximumProperty);
+ set => SetValue(MaximumProperty, value);
+ }
+
+ ///
+ /// Gets or sets the amount with which to increase/decrease the value when dragging.
+ ///
+ public double LargeChange
+ {
+ get => GetValue(LargeChangeProperty);
+ set => SetValue(LargeChangeProperty, value);
+ }
+
+ ///
+ /// Gets or sets the amount with which to increase/decrease the value when dragging and holding down shift.
+ ///
+ public double SmallChange
+ {
+ get => GetValue(SmallChangeProperty);
+ set => SetValue(SmallChangeProperty, value);
+ }
+
+ ///
+ /// Gets or sets the number format string used to format the value into a display value.
+ ///
+ public string SimpleNumberFormat
+ {
+ get => GetValue(SimpleNumberFormatProperty);
+ set => SetValue(SimpleNumberFormatProperty, value);
+ }
+
+ ///
+ /// Gets or sets the prefix to show before the value.
+ ///
+ public string? Prefix
+ {
+ get => GetValue(PrefixProperty);
+ set => SetValue(PrefixProperty, value);
+ }
+
+ ///
+ /// Gets or sets the affix to show behind the value.
+ ///
+ public string? Suffix
+ {
+ get => GetValue(SuffixProperty);
+ set => SetValue(SuffixProperty, value);
+ }
+
+ ///
+ /// Occurs when the user starts dragging over the control.
+ ///
+ public event TypedEventHandler? DragStarted;
+
+ ///
+ /// Occurs when the user finishes dragging over the control.
+ ///
+ public event TypedEventHandler? DragFinished;
+
private void HandleKeyUp(object? sender, KeyEventArgs e)
{
if (e.Key == Key.Enter || e.Key == Key.Escape)
@@ -184,7 +226,9 @@ public partial class DraggableNumberBox : UserControl
private void OnPointerReleased(object? sender, PointerReleasedEventArgs e)
{
if (!_moved)
+ {
_inputTextBox?.Focus();
+ }
else
{
_moved = false;
diff --git a/src/Artemis.UI.Shared/Controls/Flyouts/GradientPickerFlyout.cs b/src/Artemis.UI.Shared/Controls/Flyouts/GradientPickerFlyout.cs
index 30258306d..8020e21a7 100644
--- a/src/Artemis.UI.Shared/Controls/Flyouts/GradientPickerFlyout.cs
+++ b/src/Artemis.UI.Shared/Controls/Flyouts/GradientPickerFlyout.cs
@@ -1,4 +1,5 @@
-using Avalonia.Controls;
+using Artemis.UI.Shared.Controls.GradientPicker;
+using Avalonia.Controls;
namespace Artemis.UI.Shared.Flyouts;
@@ -7,17 +8,17 @@ namespace Artemis.UI.Shared.Flyouts;
///
public sealed class GradientPickerFlyout : Flyout
{
- private GradientPicker.GradientPicker? _picker;
+ private GradientPicker? _picker;
///
/// Gets the gradient picker that this flyout hosts.
///
- public GradientPicker.GradientPicker GradientPicker => _picker ??= new GradientPicker.GradientPicker();
+ public GradientPicker GradientPicker => _picker ??= new GradientPicker();
///
protected override Control CreatePresenter()
{
- _picker ??= new GradientPicker.GradientPicker();
+ _picker ??= new GradientPicker();
FlyoutPresenter presenter = new() {Content = GradientPicker};
return presenter;
}
diff --git a/src/Artemis.UI.Shared/Controls/GradientPicker/GradientPicker.cs b/src/Artemis.UI.Shared/Controls/GradientPicker/GradientPicker.cs
index a50b90110..248530108 100644
--- a/src/Artemis.UI.Shared/Controls/GradientPicker/GradientPicker.cs
+++ b/src/Artemis.UI.Shared/Controls/GradientPicker/GradientPicker.cs
@@ -16,7 +16,7 @@ using FluentAvalonia.UI.Media;
using ReactiveUI;
using Button = Avalonia.Controls.Button;
-namespace Artemis.UI.Shared.GradientPicker;
+namespace Artemis.UI.Shared.Controls.GradientPicker;
///
/// Represents a gradient picker that can be used to edit a gradient.
diff --git a/src/Artemis.UI.Shared/Controls/GradientPicker/GradientPickerButton.cs b/src/Artemis.UI.Shared/Controls/GradientPicker/GradientPickerButton.cs
index 6a2ae8265..f1a439ea5 100644
--- a/src/Artemis.UI.Shared/Controls/GradientPicker/GradientPickerButton.cs
+++ b/src/Artemis.UI.Shared/Controls/GradientPicker/GradientPickerButton.cs
@@ -13,7 +13,7 @@ using Avalonia.Media;
using FluentAvalonia.Core;
using Button = FluentAvalonia.UI.Controls.Button;
-namespace Artemis.UI.Shared.GradientPicker;
+namespace Artemis.UI.Shared.Controls.GradientPicker;
///
/// Represents a gradient picker box that can be used to edit a gradient
diff --git a/src/Artemis.UI.Shared/Controls/GradientPicker/GradientPickerColorStop.cs b/src/Artemis.UI.Shared/Controls/GradientPicker/GradientPickerColorStop.cs
index 832398f7e..28119d1c7 100644
--- a/src/Artemis.UI.Shared/Controls/GradientPicker/GradientPickerColorStop.cs
+++ b/src/Artemis.UI.Shared/Controls/GradientPicker/GradientPickerColorStop.cs
@@ -5,9 +5,9 @@ using Avalonia.Controls;
using Avalonia.Controls.Primitives;
using Avalonia.Input;
-namespace Artemis.UI.Shared.GradientPicker;
+namespace Artemis.UI.Shared.Controls.GradientPicker;
-public class GradientPickerColorStop : TemplatedControl
+internal class GradientPickerColorStop : TemplatedControl
{
private static ColorGradientStop? _draggingStop;
private static IPointer? _dragPointer;
diff --git a/src/Artemis.UI.Shared/Converters/ToStringConverter.cs b/src/Artemis.UI.Shared/Converters/ToStringConverter.cs
new file mode 100644
index 000000000..91237d9e7
--- /dev/null
+++ b/src/Artemis.UI.Shared/Converters/ToStringConverter.cs
@@ -0,0 +1,23 @@
+using System;
+using System.Globalization;
+using Avalonia.Data.Converters;
+
+namespace Artemis.UI.Shared.Converters;
+
+///
+/// Converts any object to string by calling its ToString implementation, seems Avalonia doesn't do this
+///
+public class ToStringConverter : IValueConverter
+{
+ ///
+ public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
+ {
+ return value?.ToString();
+ }
+
+ ///
+ public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
+ {
+ return value;
+ }
+}
\ No newline at end of file
diff --git a/src/Artemis.UI.Shared/DefaultTypes/DataModel/Display/SKColorDataModelDisplayView.axaml.cs b/src/Artemis.UI.Shared/DefaultTypes/DataModel/Display/SKColorDataModelDisplayView.axaml.cs
index 09dd86420..0762eb061 100644
--- a/src/Artemis.UI.Shared/DefaultTypes/DataModel/Display/SKColorDataModelDisplayView.axaml.cs
+++ b/src/Artemis.UI.Shared/DefaultTypes/DataModel/Display/SKColorDataModelDisplayView.axaml.cs
@@ -1,11 +1,18 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
+using SkiaSharp;
namespace Artemis.UI.Shared.DefaultTypes.DataModel.Display
{
+ ///
+ /// Represents a data model display view used to display values.
+ ///
public partial class SKColorDataModelDisplayView : UserControl
{
+ ///
+ /// Creates a new instance of the class.
+ ///
public SKColorDataModelDisplayView()
{
InitializeComponent();
diff --git a/src/Artemis.UI.Shared/Extensions/PointExtensions.cs b/src/Artemis.UI.Shared/Extensions/PointExtensions.cs
deleted file mode 100644
index eb822fbbd..000000000
--- a/src/Artemis.UI.Shared/Extensions/PointExtensions.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using Avalonia;
-
-namespace Artemis.UI.Shared.Extensions
-{
- public static class PointExtensions
- {
- public static Point Empty = new(0, 0);
- }
-}
\ No newline at end of file
diff --git a/src/Artemis.UI.Shared/Extensions/SKMatrixExtensions.cs b/src/Artemis.UI.Shared/Extensions/SKMatrixExtensions.cs
index 492fab1dd..924d37d5b 100644
--- a/src/Artemis.UI.Shared/Extensions/SKMatrixExtensions.cs
+++ b/src/Artemis.UI.Shared/Extensions/SKMatrixExtensions.cs
@@ -3,8 +3,16 @@ using SkiaSharp;
namespace Artemis.UI.Shared.Extensions;
+///
+/// Provides utility methods when working with SkiaSharp matrices.
+///
public static class SKMatrixExtensions
{
+ ///
+ /// Converts the matrix to an Avalonia .
+ ///
+ /// The matrix to convert.
+ /// The resulting Avalonia .
public static Matrix ToMatrix(this SKMatrix matrix)
{
return new Matrix(
diff --git a/src/Artemis.UI.Shared/Extensions/SKRectExtensions.cs b/src/Artemis.UI.Shared/Extensions/SKRectExtensions.cs
index 777f885d9..b823589e5 100644
--- a/src/Artemis.UI.Shared/Extensions/SKRectExtensions.cs
+++ b/src/Artemis.UI.Shared/Extensions/SKRectExtensions.cs
@@ -3,13 +3,26 @@ using SkiaSharp;
namespace Artemis.UI.Shared.Extensions;
+///
+/// Provides utility methods when working with SkiaSharp rectangles.
+///
public static class SKRectExtensions
{
+ ///
+ /// Converts the rectangle to an Avalonia .
+ ///
+ /// The rectangle to convert.
+ /// The resulting Avalonia .
public static Rect ToRect(this SKRect rect)
{
return new Rect(rect.Left, rect.Top, rect.Width, rect.Height);
}
+ ///
+ /// Converts the integer rectangle to an Avalonia .
+ ///
+ /// The integer rectangle to convert.
+ /// The resulting Avalonia .
public static Rect ToRect(this SKRectI rect)
{
return new Rect(rect.Left, rect.Top, rect.Width, rect.Height);
diff --git a/src/Artemis.UI.Shared/Services/Builders/OpenFileDialogBuilder.cs b/src/Artemis.UI.Shared/Services/Builders/OpenFileDialogBuilder.cs
index a89fdedb8..02f3f47ec 100644
--- a/src/Artemis.UI.Shared/Services/Builders/OpenFileDialogBuilder.cs
+++ b/src/Artemis.UI.Shared/Services/Builders/OpenFileDialogBuilder.cs
@@ -1,4 +1,5 @@
using System;
+using System.Collections.Generic;
using System.Threading.Tasks;
using Avalonia.Controls;
@@ -65,6 +66,8 @@ namespace Artemis.UI.Shared.Services.Builders
{
FileDialogFilterBuilder builder = new();
configure(builder);
+
+ _openFileDialog.Filters ??= new List();
_openFileDialog.Filters.Add(builder.Build());
return this;
diff --git a/src/Artemis.UI.Shared/Services/Builders/SaveFileDialogBuilder.cs b/src/Artemis.UI.Shared/Services/Builders/SaveFileDialogBuilder.cs
index 71d48c440..84021ab6c 100644
--- a/src/Artemis.UI.Shared/Services/Builders/SaveFileDialogBuilder.cs
+++ b/src/Artemis.UI.Shared/Services/Builders/SaveFileDialogBuilder.cs
@@ -1,4 +1,5 @@
using System;
+using System.Collections.Generic;
using System.Threading.Tasks;
using Avalonia.Controls;
@@ -65,6 +66,8 @@ namespace Artemis.UI.Shared.Services.Builders
{
FileDialogFilterBuilder builder = new();
configure(builder);
+
+ _saveFileDialog.Filters ??= new List();
_saveFileDialog.Filters.Add(builder.Build());
return this;
diff --git a/src/Artemis.UI.Shared/Services/GradientPickerService.cs b/src/Artemis.UI.Shared/Services/GradientPickerService.cs
deleted file mode 100644
index f5bf94942..000000000
--- a/src/Artemis.UI.Shared/Services/GradientPickerService.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-namespace Artemis.UI.Shared.Services;
-
-public class GradientPickerService : IGradientPickerService
-{
-}
-
-public interface IGradientPickerService : IArtemisSharedUIService
-{
-}
\ No newline at end of file
diff --git a/src/Artemis.UI.Shared/Services/NodeEditor/INodeEditorService.cs b/src/Artemis.UI.Shared/Services/NodeEditor/INodeEditorService.cs
index c75302de6..e8373feb8 100644
--- a/src/Artemis.UI.Shared/Services/NodeEditor/INodeEditorService.cs
+++ b/src/Artemis.UI.Shared/Services/NodeEditor/INodeEditorService.cs
@@ -4,6 +4,9 @@ using Artemis.UI.Shared.Services.ProfileEditor;
namespace Artemis.UI.Shared.Services.NodeEditor;
+///
+/// Represents a service that can be used to execute editor commands on node scripts.
+///
public interface INodeEditorService : IArtemisSharedUIService
{
///
diff --git a/src/Artemis.UI.Shared/Services/NodeEditor/NodeEditorHistory.cs b/src/Artemis.UI.Shared/Services/NodeEditor/NodeEditorHistory.cs
index 006e4adeb..6498aeb3f 100644
--- a/src/Artemis.UI.Shared/Services/NodeEditor/NodeEditorHistory.cs
+++ b/src/Artemis.UI.Shared/Services/NodeEditor/NodeEditorHistory.cs
@@ -9,6 +9,9 @@ using ReactiveUI;
namespace Artemis.UI.Shared.Services.NodeEditor;
+///
+/// Represents the command history of a node script.
+///
public class NodeEditorHistory
{
private readonly Subject _canRedo = new();
@@ -16,6 +19,10 @@ public class NodeEditorHistory
private readonly Stack _redoCommands = new();
private readonly Stack _undoCommands = new();
+ ///
+ /// Creates a new instance of the class.
+ ///
+ /// The node script the history relates to.
public NodeEditorHistory(INodeScript nodeScript)
{
NodeScript = nodeScript;
@@ -25,14 +32,39 @@ public class NodeEditorHistory
Redo = ReactiveCommand.Create(ExecuteRedo, CanRedo);
}
+ ///
+ /// Gets the node script the history relates to.
+ ///
public INodeScript NodeScript { get; }
+
+ ///
+ /// Gets an observable sequence containing a boolean value indicating whether history can be undone.
+ ///
public IObservable CanUndo => _canUndo.AsObservable().DistinctUntilChanged();
+
+ ///
+ /// Gets an observable sequence containing a boolean value indicating whether history can be redone.
+ ///
public IObservable CanRedo => _canRedo.AsObservable().DistinctUntilChanged();
+ ///
+ /// Gets a reactive command that can be executed to execute an instance of a and puts it in history.
+ ///
public ReactiveCommand Execute { get; }
+
+ ///
+ /// Gets a reactive command that can be executed to undo history.
+ ///
public ReactiveCommand Undo { get; }
+
+ ///
+ /// Gets a reactive command that can be executed to redo history.
+ ///
public ReactiveCommand Redo { get; }
+ ///
+ /// Clears the history.
+ ///
public void Clear()
{
ClearRedo();
@@ -40,6 +72,10 @@ public class NodeEditorHistory
UpdateSubjects();
}
+ ///
+ /// Executes the provided and puts it in history.
+ ///
+ /// The command to execute
public void ExecuteEditorCommand(INodeEditorCommand command)
{
command.Execute();
diff --git a/src/Artemis.UI.Shared/Services/ProfileEditor/ProfileEditorHistory.cs b/src/Artemis.UI.Shared/Services/ProfileEditor/ProfileEditorHistory.cs
index 109714044..41f81fed6 100644
--- a/src/Artemis.UI.Shared/Services/ProfileEditor/ProfileEditorHistory.cs
+++ b/src/Artemis.UI.Shared/Services/ProfileEditor/ProfileEditorHistory.cs
@@ -9,6 +9,9 @@ using ReactiveUI;
namespace Artemis.UI.Shared.Services.ProfileEditor;
+///
+/// Represents the command history of a profile configuration.
+///
public class ProfileEditorHistory
{
private readonly Subject _canRedo = new();
@@ -16,6 +19,10 @@ public class ProfileEditorHistory
private readonly Stack _redoCommands = new();
private readonly Stack _undoCommands = new();
+ ///
+ /// Creates a new instance of the class.
+ ///
+ /// The profile configuration the history relates to.
public ProfileEditorHistory(ProfileConfiguration profileConfiguration)
{
ProfileConfiguration = profileConfiguration;
@@ -25,14 +32,39 @@ public class ProfileEditorHistory
Redo = ReactiveCommand.Create(ExecuteRedo, CanRedo);
}
+ ///
+ /// Gets the profile configuration the history relates to.
+ ///
public ProfileConfiguration ProfileConfiguration { get; }
+
+ ///
+ /// Gets an observable sequence containing a boolean value indicating whether history can be undone.
+ ///
public IObservable CanUndo => _canUndo.AsObservable().DistinctUntilChanged();
+
+ ///
+ /// Gets an observable sequence containing a boolean value indicating whether history can be redone.
+ ///
public IObservable CanRedo => _canRedo.AsObservable().DistinctUntilChanged();
+ ///
+ /// Gets a reactive command that can be executed to execute an instance of a and puts it in history.
+ ///
public ReactiveCommand Execute { get; }
+
+ ///
+ /// Gets a reactive command that can be executed to undo history.
+ ///
public ReactiveCommand Undo { get; }
+
+ ///
+ /// Gets a reactive command that can be executed to redo history.
+ ///
public ReactiveCommand Redo { get; }
+ ///
+ /// Clears the history.
+ ///
public void Clear()
{
ClearRedo();
@@ -40,6 +72,10 @@ public class ProfileEditorHistory
UpdateSubjects();
}
+ ///
+ /// Executes the provided and puts it in history.
+ ///
+ /// The command to execute
public void ExecuteEditorCommand(IProfileEditorCommand command)
{
command.Execute();
@@ -52,8 +88,10 @@ public class ProfileEditorHistory
private void ClearRedo()
{
foreach (IProfileEditorCommand profileEditorCommand in _redoCommands)
+ {
if (profileEditorCommand is IDisposable disposable)
disposable.Dispose();
+ }
_redoCommands.Clear();
}
@@ -61,8 +99,10 @@ public class ProfileEditorHistory
private void ClearUndo()
{
foreach (IProfileEditorCommand profileEditorCommand in _undoCommands)
+ {
if (profileEditorCommand is IDisposable disposable)
disposable.Dispose();
+ }
_undoCommands.Clear();
}
diff --git a/src/Artemis.UI.Shared/Services/PropertyInput/PropertyInputViewModel.cs b/src/Artemis.UI.Shared/Services/PropertyInput/PropertyInputViewModel.cs
index 742675c7e..c7f62eed5 100644
--- a/src/Artemis.UI.Shared/Services/PropertyInput/PropertyInputViewModel.cs
+++ b/src/Artemis.UI.Shared/Services/PropertyInput/PropertyInputViewModel.cs
@@ -3,6 +3,7 @@ using System.Diagnostics.CodeAnalysis;
using System.Reactive.Disposables;
using System.Reactive.Linq;
using Artemis.Core;
+using Artemis.UI.Shared.Controls;
using Artemis.UI.Shared.Services.ProfileEditor;
using Artemis.UI.Shared.Services.ProfileEditor.Commands;
using Avalonia.Threading;
@@ -79,7 +80,7 @@ public abstract class PropertyInputViewModel : PropertyInputViewModel
///
/// Gets or boolean indicating whether the current input is being previewed, the value won't be applied until
///
- /// Only applicable when using something like a , see
+ /// Only applicable when using something like a , see
/// and
///
///
diff --git a/src/Artemis.UI.Shared/Styles/Condensed.axaml b/src/Artemis.UI.Shared/Styles/Condensed.axaml
index 34665c6cc..62a6c8fb9 100644
--- a/src/Artemis.UI.Shared/Styles/Condensed.axaml
+++ b/src/Artemis.UI.Shared/Styles/Condensed.axaml
@@ -1,10 +1,10 @@
+ xmlns:controls2="clr-namespace:Artemis.UI.Shared.Controls"
+ xmlns:gradientPicker="clr-namespace:Artemis.UI.Shared.Controls.GradientPicker">
diff --git a/src/Artemis.UI.Shared/Styles/Controls/DataModelPickerButton.axaml b/src/Artemis.UI.Shared/Styles/Controls/DataModelPickerButton.axaml
index 45885f134..cd5bc317e 100644
--- a/src/Artemis.UI.Shared/Styles/Controls/DataModelPickerButton.axaml
+++ b/src/Artemis.UI.Shared/Styles/Controls/DataModelPickerButton.axaml
@@ -2,7 +2,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
xmlns:dataModelPicker="clr-namespace:Artemis.UI.Shared.DataModelPicker"
- xmlns:gradientPicker="clr-namespace:Artemis.UI.Shared.GradientPicker">
+ xmlns:gradientPicker="clr-namespace:Artemis.UI.Shared.Controls.GradientPicker">
diff --git a/src/Artemis.UI.Shared/Styles/Controls/GradientPicker.axaml b/src/Artemis.UI.Shared/Styles/Controls/GradientPicker.axaml
index d10a9fd21..aa096987b 100644
--- a/src/Artemis.UI.Shared/Styles/Controls/GradientPicker.axaml
+++ b/src/Artemis.UI.Shared/Styles/Controls/GradientPicker.axaml
@@ -4,7 +4,7 @@
xmlns:core="clr-namespace:Artemis.Core;assembly=Artemis.Core"
xmlns:fluent="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
xmlns:converters="clr-namespace:Artemis.UI.Shared.Converters"
- xmlns:gradientPicker="clr-namespace:Artemis.UI.Shared.GradientPicker">
+ xmlns:gradientPicker="clr-namespace:Artemis.UI.Shared.Controls.GradientPicker">
diff --git a/src/Artemis.UI.Shared/Styles/Controls/GradientPickerButton.axaml b/src/Artemis.UI.Shared/Styles/Controls/GradientPickerButton.axaml
index 48abf0abe..33d8eb500 100644
--- a/src/Artemis.UI.Shared/Styles/Controls/GradientPickerButton.axaml
+++ b/src/Artemis.UI.Shared/Styles/Controls/GradientPickerButton.axaml
@@ -1,7 +1,7 @@
+ xmlns:gradientPicker="clr-namespace:Artemis.UI.Shared.Controls.GradientPicker">
diff --git a/src/Artemis.UI.Shared/nuget.config b/src/Artemis.UI.Shared/nuget.config
index 6c273ab3d..6a3e3c056 100644
--- a/src/Artemis.UI.Shared/nuget.config
+++ b/src/Artemis.UI.Shared/nuget.config
@@ -5,7 +5,7 @@
-->
-
-
-
+
+
+
diff --git a/src/Artemis.UI.Windows/Artemis.UI.Windows.csproj b/src/Artemis.UI.Windows/Artemis.UI.Windows.csproj
index 706465564..abf8d3029 100644
--- a/src/Artemis.UI.Windows/Artemis.UI.Windows.csproj
+++ b/src/Artemis.UI.Windows/Artemis.UI.Windows.csproj
@@ -1,42 +1,42 @@
-
- WinExe
- net6.0-windows
- enable
- x64
- x64
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ WinExe
+ net6.0-windows
+ enable
+ x64
+ x64
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Artemis.UI.Windows/SkiaSharp/Vulkan/VkContext.cs b/src/Artemis.UI.Windows/SkiaSharp/Vulkan/VkContext.cs
index d31012447..7a8c7fb81 100644
--- a/src/Artemis.UI.Windows/SkiaSharp/Vulkan/VkContext.cs
+++ b/src/Artemis.UI.Windows/SkiaSharp/Vulkan/VkContext.cs
@@ -1,4 +1,6 @@
-using System;
+#nullable disable
+
+using System;
using SharpVk;
using SharpVk.Khronos;
using SkiaSharp;
diff --git a/src/Artemis.UI/Artemis.UI.csproj b/src/Artemis.UI/Artemis.UI.csproj
index 5e86dc5ee..e0d731829 100644
--- a/src/Artemis.UI/Artemis.UI.csproj
+++ b/src/Artemis.UI/Artemis.UI.csproj
@@ -1,80 +1,80 @@
-
- Library
- net6.0
- enable
- bin\
- x64
- x64
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- StringPropertyInputView.xaml
-
-
- PropertiesView.axaml
-
-
- LayerShapeVisualizerView.axaml
-
-
- DragCableView.axaml
-
-
- NodeScriptWindowView.axaml
-
-
- LayerEffectRenameView.axaml
- Code
-
-
- SidebarCategoryEditView.axaml
- Code
-
-
-
-
- MSBuild:Compile
-
-
+
+ Library
+ net6.0
+ enable
+ bin\
+ x64
+ x64
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ StringPropertyInputView.xaml
+
+
+ PropertiesView.axaml
+
+
+ LayerShapeVisualizerView.axaml
+
+
+ DragCableView.axaml
+
+
+ NodeScriptWindowView.axaml
+
+
+ LayerEffectRenameView.axaml
+ Code
+
+
+ SidebarCategoryEditView.axaml
+ Code
+
+
+
+
+ MSBuild:Compile
+
+
\ No newline at end of file
diff --git a/src/Artemis.UI/DefaultTypes/PropertyInput/ColorGradientPropertyInputView.axaml b/src/Artemis.UI/DefaultTypes/PropertyInput/ColorGradientPropertyInputView.axaml
index 6a2041784..e3394db0a 100644
--- a/src/Artemis.UI/DefaultTypes/PropertyInput/ColorGradientPropertyInputView.axaml
+++ b/src/Artemis.UI/DefaultTypes/PropertyInput/ColorGradientPropertyInputView.axaml
@@ -3,7 +3,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:propertyInput="clr-namespace:Artemis.UI.DefaultTypes.PropertyInput"
- xmlns:gradientPicker="clr-namespace:Artemis.UI.Shared.GradientPicker;assembly=Artemis.UI.Shared"
+ xmlns:gradientPicker="clr-namespace:Artemis.UI.Shared.Controls.GradientPicker;assembly=Artemis.UI.Shared"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="Artemis.UI.DefaultTypes.PropertyInput.ColorGradientPropertyInputView"
x:DataType="propertyInput:ColorGradientPropertyInputViewModel">
diff --git a/src/Artemis.UI/DefaultTypes/PropertyInput/ColorGradientPropertyInputView.axaml.cs b/src/Artemis.UI/DefaultTypes/PropertyInput/ColorGradientPropertyInputView.axaml.cs
index b14a38ca4..2288a4821 100644
--- a/src/Artemis.UI/DefaultTypes/PropertyInput/ColorGradientPropertyInputView.axaml.cs
+++ b/src/Artemis.UI/DefaultTypes/PropertyInput/ColorGradientPropertyInputView.axaml.cs
@@ -1,5 +1,5 @@
using System;
-using Artemis.UI.Shared.GradientPicker;
+using Artemis.UI.Shared.Controls.GradientPicker;
using Avalonia.Markup.Xaml;
using Avalonia.ReactiveUI;
diff --git a/src/Artemis.UI/Screens/Device/DevicePropertiesView.axaml b/src/Artemis.UI/Screens/Device/DevicePropertiesView.axaml
index fed6b9938..8c386fa11 100644
--- a/src/Artemis.UI/Screens/Device/DevicePropertiesView.axaml
+++ b/src/Artemis.UI/Screens/Device/DevicePropertiesView.axaml
@@ -51,19 +51,12 @@
-
+
-
-
-
-
-
-
-
diff --git a/src/Artemis.UI/Screens/Device/Tabs/DeviceInfoTabView.axaml b/src/Artemis.UI/Screens/Device/Tabs/DeviceInfoTabView.axaml
index e95d9c6a6..7d62cb3dc 100644
--- a/src/Artemis.UI/Screens/Device/Tabs/DeviceInfoTabView.axaml
+++ b/src/Artemis.UI/Screens/Device/Tabs/DeviceInfoTabView.axaml
@@ -5,81 +5,84 @@
xmlns:avalonia="clr-namespace:Material.Icons.Avalonia;assembly=Material.Icons.Avalonia"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="Artemis.UI.Screens.Device.DeviceInfoTabView">
-
-
-
-
- Device name
-
-
+
+
+
+
+
+ Device name
+
+
- Manufacturer
-
-
+ Manufacturer
+
+
- Device type
-
-
+ Device type
+
+
-
- Physical layout
-
+
+ Physical layout
+
+
-
-
+
-
-
- Size (1px = 1mm)
-
-
+
+
+ Size (1px = 1mm)
+
+
- Location (1px = 1mm)
-
-
+ Location (1px = 1mm)
+
+
- Rotation (degrees)
-
-
+ Rotation (degrees)
+
+
-
- Logical layout
-
+
+ Logical layout
+
+
-
-
+
-
-
-
-
- Default layout file path
-
-
-
-
+
+
+
+
+ Default layout file path
+
+
+
+
+
+
+ Image file path
+
+
+
+
+
+
+
-
- Image file path
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/Artemis.UI/Screens/Device/Tabs/DeviceLedsTabLedViewModel.cs b/src/Artemis.UI/Screens/Device/Tabs/DeviceLedsTabLedViewModel.cs
new file mode 100644
index 000000000..90eaf145f
--- /dev/null
+++ b/src/Artemis.UI/Screens/Device/Tabs/DeviceLedsTabLedViewModel.cs
@@ -0,0 +1,46 @@
+using System.Collections.ObjectModel;
+using Artemis.Core;
+using Artemis.UI.Shared;
+using RGB.NET.Core;
+
+namespace Artemis.UI.Screens.Device;
+
+public class DeviceLedsTabLedViewModel : ViewModelBase
+{
+ private readonly ObservableCollection _selectedLeds;
+ private bool _isSelected;
+
+ public DeviceLedsTabLedViewModel(ArtemisLed artemisLed, ObservableCollection selectedLeds)
+ {
+ _selectedLeds = selectedLeds;
+ ArtemisLed = artemisLed;
+
+ Update();
+ }
+
+ public ArtemisLed ArtemisLed { get; }
+
+ public bool IsSelected
+ {
+ get => _isSelected;
+ set
+ {
+ if (!RaiseAndSetIfChanged(ref _isSelected, value))
+ return;
+ Apply();
+ }
+ }
+
+ public void Update()
+ {
+ IsSelected = _selectedLeds.Contains(ArtemisLed);
+ }
+
+ public void Apply()
+ {
+ if (IsSelected && !_selectedLeds.Contains(ArtemisLed))
+ _selectedLeds.Add(ArtemisLed);
+ else if (!IsSelected && _selectedLeds.Contains(ArtemisLed))
+ _selectedLeds.Remove(ArtemisLed);
+ }
+}
\ No newline at end of file
diff --git a/src/Artemis.UI/Screens/Device/Tabs/DeviceLedsTabView.axaml b/src/Artemis.UI/Screens/Device/Tabs/DeviceLedsTabView.axaml
index ed5016814..10c134302 100644
--- a/src/Artemis.UI/Screens/Device/Tabs/DeviceLedsTabView.axaml
+++ b/src/Artemis.UI/Screens/Device/Tabs/DeviceLedsTabView.axaml
@@ -2,7 +2,27 @@
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:device="clr-namespace:Artemis.UI.Screens.Device"
+ xmlns:converters="clr-namespace:Artemis.UI.Converters"
+ xmlns:shared="clr-namespace:Artemis.UI.Shared.Converters;assembly=Artemis.UI.Shared"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
- x:Class="Artemis.UI.Screens.Device.DeviceLedsTabView">
- Welcome to Avalonia!
-
+ x:Class="Artemis.UI.Screens.Device.DeviceLedsTabView"
+ x:DataType="device:DeviceLedsTabViewModel">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Artemis.UI/Screens/Device/Tabs/DeviceLedsTabViewModel.cs b/src/Artemis.UI/Screens/Device/Tabs/DeviceLedsTabViewModel.cs
index bb30a4238..a68a109b2 100644
--- a/src/Artemis.UI/Screens/Device/Tabs/DeviceLedsTabViewModel.cs
+++ b/src/Artemis.UI/Screens/Device/Tabs/DeviceLedsTabViewModel.cs
@@ -39,44 +39,4 @@ namespace Artemis.UI.Screens.Device
deviceLedsTabLedViewModel.Update();
}
}
-
- public class DeviceLedsTabLedViewModel : ViewModelBase
- {
- private readonly ObservableCollection _selectedLeds;
- private bool _isSelected;
-
- public DeviceLedsTabLedViewModel(ArtemisLed artemisLed, ObservableCollection selectedLeds)
- {
- _selectedLeds = selectedLeds;
- ArtemisLed = artemisLed;
-
- Update();
- }
-
- public ArtemisLed ArtemisLed { get; }
-
- public bool IsSelected
- {
- get => _isSelected;
- set
- {
- if (!RaiseAndSetIfChanged(ref _isSelected, value))
- return;
- Apply();
- }
- }
-
- public void Update()
- {
- IsSelected = _selectedLeds.Contains(ArtemisLed);
- }
-
- public void Apply()
- {
- if (IsSelected && !_selectedLeds.Contains(ArtemisLed))
- _selectedLeds.Add(ArtemisLed);
- else if (!IsSelected && _selectedLeds.Contains(ArtemisLed))
- _selectedLeds.Remove(ArtemisLed);
- }
- }
}
\ No newline at end of file
diff --git a/src/Artemis.UI/Screens/Device/Tabs/DevicePropertiesTabView.axaml b/src/Artemis.UI/Screens/Device/Tabs/DevicePropertiesTabView.axaml
index 556a94ee3..9ab42b07b 100644
--- a/src/Artemis.UI/Screens/Device/Tabs/DevicePropertiesTabView.axaml
+++ b/src/Artemis.UI/Screens/Device/Tabs/DevicePropertiesTabView.axaml
@@ -15,185 +15,187 @@
-
-
-
-
-
- Categories
-
-
- Artemis uses categories to determine where the layers of imported profiles are applied to.
-
-
- You can hover over a category for a more detailed description.
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+ Categories
+
+
+ Artemis uses categories to determine where the layers of imported profiles are applied to.
+
+
+ You can hover over a category for a more detailed description.
+
+
+
+
+
+
+
+
-
-
-
- Surface properties
-
+
+
+
+ Surface properties
+
- X-coordinate
-
- mm
+ X-coordinate
+
+ mm
- Y-coordinate
-
- mm
+ Y-coordinate
+
+ mm
- Scale
-
- times
+ Scale
+
+ times
- Rotation
-
- deg
+ Rotation
+
+ deg
+
+
+
+
+
+
+ Color calibration
+
+
+
+ Use the sliders below to adjust the colors of your device so that it matches your other devices.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+ Layout
+
+
+ The device layout is used to determine the position of LEDs and to create the visual representation of the device you see on the left side of this window.
+
-
-
- Color calibration
-
+
+
+
+ Don't load default layout
+
+
+
+
-
- Use the sliders below to adjust the colors of your device so that it matches your other devices.
-
+
+
+
+
-
-
-
-
+
+ Learn more about layouts on the wiki
+
+
-
-
-
+
+
+
-
-
-
-
-
-
-
+
+
+
-
-
-
- Layout
-
-
- The device layout is used to determine the position of LEDs and to create the visual representation of the device you see on the left side of this window.
-
-
-
-
-
- Don't load default layout
-
-
-
-
-
-
-
-
-
-
-
- Learn more about layouts on the wiki
-
-
-
-
-
-
-
-
-
-
-
-
+
\ No newline at end of file
diff --git a/src/Artemis.UI/Screens/Device/Tabs/InputMappingsTabView.axaml b/src/Artemis.UI/Screens/Device/Tabs/InputMappingsTabView.axaml
index 704a9b52b..6a1c2a4ff 100644
--- a/src/Artemis.UI/Screens/Device/Tabs/InputMappingsTabView.axaml
+++ b/src/Artemis.UI/Screens/Device/Tabs/InputMappingsTabView.axaml
@@ -7,68 +7,65 @@
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="Artemis.UI.Screens.Device.InputMappingsTabView"
x:DataType="device:InputMappingsTabViewModel">
-
-
-
-
-
-
-
-
- Introduction
-
-
- In some cases you may want Artemis to map key presses to different LEDs.
-
-
- This is useful when your logical layout swaps keys around (like Hungarian layouts where the Z and Y keys are swapped). In this tab you can set up these custom input mappings, simply click on a LED and press a key, Artemis will from then on consider that LED pressed whenever you press the same key again.
-
-
-
-
- Select a LED in the preview on the left side to get started...
-
-
-
-
- Current target LED:
-
+
+
+
+
+ Introduction
+
+
+ In some cases you may want Artemis to map key presses to different LEDs.
+
+
+ This is useful when your logical layout swaps keys around (like Hungarian layouts where the Z and Y keys are swapped). In this tab you can set up these custom input mappings, simply click on a LED and press a key, Artemis will from then on consider that LED pressed whenever you press the same key again.
+
-
- Press the key you want to remap
-
- to ...
+
+
+ Select a LED in the preview on the left side to get started...
+
+
+
+
+ Current target LED:
+
+
+
+ Press the key you want to remap
+
+ to ...
+
-
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Artemis.UI/Screens/Workshop/WorkshopView.axaml b/src/Artemis.UI/Screens/Workshop/WorkshopView.axaml
index 339c7af90..d93224a50 100644
--- a/src/Artemis.UI/Screens/Workshop/WorkshopView.axaml
+++ b/src/Artemis.UI/Screens/Workshop/WorkshopView.axaml
@@ -7,8 +7,8 @@
xmlns:attachedProperties="clr-namespace:Artemis.UI.Shared.AttachedProperties;assembly=Artemis.UI.Shared"
xmlns:workshop="clr-namespace:Artemis.UI.Screens.Workshop"
xmlns:shared="clr-namespace:Artemis.UI.Shared;assembly=Artemis.UI.Shared"
- xmlns:gradientPicker="clr-namespace:Artemis.UI.Shared.GradientPicker;assembly=Artemis.UI.Shared"
xmlns:controls="clr-namespace:Artemis.UI.Shared.Controls;assembly=Artemis.UI.Shared"
+ xmlns:gradientPicker="clr-namespace:Artemis.UI.Shared.Controls.GradientPicker;assembly=Artemis.UI.Shared"
mc:Ignorable="d" d:DesignWidth="800"
x:Class="Artemis.UI.Screens.Workshop.WorkshopView"
x:DataType="workshop:WorkshopViewModel">
diff --git a/src/Artemis.VisualScripting/Artemis.VisualScripting.csproj b/src/Artemis.VisualScripting/Artemis.VisualScripting.csproj
index 11ca67f9b..8d46adae9 100644
--- a/src/Artemis.VisualScripting/Artemis.VisualScripting.csproj
+++ b/src/Artemis.VisualScripting/Artemis.VisualScripting.csproj
@@ -1,38 +1,38 @@
-
- net6.0
- enable
- enable
- x64
-
+
+ net6.0
+ enable
+ enable
+ x64
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
-
-
- EasingTypeNodeEasingView.axaml
-
-
- StaticStringValueNodeCustomView.axaml
-
-
- DataModelNodeCustomView.axaml
-
-
+
+
+ EasingTypeNodeEasingView.axaml
+
+
+ StaticStringValueNodeCustomView.axaml
+
+
+ DataModelNodeCustomView.axaml
+
+
diff --git a/src/Directory.Build.props b/src/Directory.Build.props
index f5c250a95..8893fa48f 100644
--- a/src/Directory.Build.props
+++ b/src/Directory.Build.props
@@ -1,6 +1,6 @@
-
- true
- true
-
+
+ true
+ true
+
\ No newline at end of file