mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Device dialog - Added LEDs tab
General - Resolved lots of compile warnings (XML comments)
This commit is contained in:
1 parent
021f17aef4
commit
65837e671a
44 files changed
+1015
-761
No files matched your search
@@ -6,26 +6,36 @@
|
||||
<members>
|
||||
<member name="F:Artemis.UI.Avalonia.Shared.Controls.ArtemisIcon.IconProperty">
|
||||
<summary>
|
||||
Gets or sets the currently displayed icon as either a <see cref="T:Material.Icons.MaterialIconKind" /> or an <see cref="T:System.Uri" /> pointing
|
||||
Gets or sets the currently displayed icon as either a
|
||||
<see cref="T:Material.Icons.MaterialIconKind"/>
|
||||
or an
|
||||
<see cref="T:System.Uri"/>
|
||||
pointing
|
||||
to an SVG
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Artemis.UI.Avalonia.Shared.Controls.ArtemisIcon.Icon">
|
||||
<summary>
|
||||
Gets or sets the currently displayed icon as either a <see cref="T:Material.Icons.MaterialIconKind" /> or an <see cref="T:System.Uri" /> pointing
|
||||
Gets or sets the currently displayed icon as either a
|
||||
<see cref="T:Material.Icons.MaterialIconKind"/>
|
||||
or an
|
||||
<see cref="T:System.Uri"/>
|
||||
pointing
|
||||
to an SVG
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Artemis.UI.Avalonia.Shared.Controls.DeviceVisualizer">
|
||||
<summary>
|
||||
Visualizes an <see cref="T:Artemis.Core.ArtemisDevice" /> with optional per-LED colors
|
||||
Visualizes an
|
||||
<see cref="T:Artemis.Core.ArtemisDevice"/>
|
||||
with optional per-LED colors
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Artemis.UI.Avalonia.Shared.Controls.DeviceVisualizer.#ctor">
|
||||
<inheritdoc />
|
||||
<inheritdoc/>
|
||||
</member>
|
||||
<member name="M:Artemis.UI.Avalonia.Shared.Controls.DeviceVisualizer.Render(Avalonia.Media.DrawingContext)">
|
||||
<inheritdoc />
|
||||
<inheritdoc/>
|
||||
</member>
|
||||
<member name="E:Artemis.UI.Avalonia.Shared.Controls.DeviceVisualizer.LedClicked">
|
||||
<summary>
|
||||
@@ -34,23 +44,29 @@
|
||||
</member>
|
||||
<member name="M:Artemis.UI.Avalonia.Shared.Controls.DeviceVisualizer.OnLedClicked(Artemis.UI.Avalonia.Shared.Events.LedClickedEventArgs)">
|
||||
<summary>
|
||||
Invokes the <see cref="E:Artemis.UI.Avalonia.Shared.Controls.DeviceVisualizer.LedClicked" /> event
|
||||
Invokes the
|
||||
<see cref="E:Artemis.UI.Avalonia.Shared.Controls.DeviceVisualizer.LedClicked"/>
|
||||
event
|
||||
</summary>
|
||||
<param name="e"></param>
|
||||
</member>
|
||||
<member name="F:Artemis.UI.Avalonia.Shared.Controls.DeviceVisualizer.DeviceProperty">
|
||||
<summary>
|
||||
Gets or sets the <see cref="T:Artemis.Core.ArtemisDevice" /> to display
|
||||
Gets or sets the
|
||||
<see cref="T:Artemis.Core.ArtemisDevice"/>
|
||||
to display
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Artemis.UI.Avalonia.Shared.Controls.DeviceVisualizer.Device">
|
||||
<summary>
|
||||
Gets or sets the <see cref="T:Artemis.Core.ArtemisDevice" /> to display
|
||||
Gets or sets the
|
||||
<see cref="T:Artemis.Core.ArtemisDevice"/>
|
||||
to display
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:Artemis.UI.Avalonia.Shared.Controls.DeviceVisualizer.ShowColorsProperty">
|
||||
<summary>
|
||||
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
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Artemis.UI.Avalonia.Shared.Controls.DeviceVisualizer.ShowColors">
|
||||
@@ -69,13 +85,13 @@
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Artemis.UI.Avalonia.Shared.Controls.DeviceVisualizer.OnAttachedToLogicalTree(Avalonia.LogicalTree.LogicalTreeAttachmentEventArgs)">
|
||||
<inheritdoc />
|
||||
<inheritdoc/>
|
||||
</member>
|
||||
<member name="M:Artemis.UI.Avalonia.Shared.Controls.DeviceVisualizer.OnDetachedFromLogicalTree(Avalonia.LogicalTree.LogicalTreeAttachmentEventArgs)">
|
||||
<inheritdoc />
|
||||
<inheritdoc/>
|
||||
</member>
|
||||
<member name="M:Artemis.UI.Avalonia.Shared.Controls.DeviceVisualizer.MeasureOverride(Avalonia.Size)">
|
||||
<inheritdoc />
|
||||
<inheritdoc/>
|
||||
</member>
|
||||
<member name="F:Artemis.UI.Avalonia.Shared.Controls.EnumComboBox.ValueProperty">
|
||||
<summary>
|
||||
@@ -88,48 +104,62 @@
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Artemis.UI.Avalonia.Shared.Controls.EnumComboBox.OnAttachedToLogicalTree(Avalonia.LogicalTree.LogicalTreeAttachmentEventArgs)">
|
||||
<inheritdoc />
|
||||
<inheritdoc/>
|
||||
</member>
|
||||
<member name="M:Artemis.UI.Avalonia.Shared.Controls.EnumComboBox.OnDetachedFromLogicalTree(Avalonia.LogicalTree.LogicalTreeAttachmentEventArgs)">
|
||||
<inheritdoc />
|
||||
<inheritdoc/>
|
||||
</member>
|
||||
<member name="F:Artemis.UI.Avalonia.Shared.Controls.ProfileConfigurationIcon.ConfigurationIconProperty">
|
||||
<summary>
|
||||
Gets or sets the <see cref="T:Artemis.Core.ProfileConfigurationIcon" /> to display
|
||||
Gets or sets the
|
||||
<see cref="T:Artemis.Core.ProfileConfigurationIcon"/>
|
||||
to display
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Artemis.UI.Avalonia.Shared.Controls.ProfileConfigurationIcon.ConfigurationIcon">
|
||||
<summary>
|
||||
Gets or sets the <see cref="T:Artemis.Core.ProfileConfigurationIcon" /> to display
|
||||
Gets or sets the
|
||||
<see cref="T:Artemis.Core.ProfileConfigurationIcon"/>
|
||||
to display
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Artemis.UI.Avalonia.Shared.Controls.SelectionRectangle">
|
||||
<summary>
|
||||
Visualizes an <see cref="T:Artemis.Core.ArtemisDevice" /> with optional per-LED colors
|
||||
Visualizes an
|
||||
<see cref="T:Artemis.Core.ArtemisDevice"/>
|
||||
with optional per-LED colors
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:Artemis.UI.Avalonia.Shared.Controls.SelectionRectangle.BackgroundProperty">
|
||||
<summary>
|
||||
Defines the <see cref="P:Artemis.UI.Avalonia.Shared.Controls.SelectionRectangle.Background" /> property.
|
||||
Defines the
|
||||
<see cref="P:Artemis.UI.Avalonia.Shared.Controls.SelectionRectangle.Background"/>
|
||||
property.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:Artemis.UI.Avalonia.Shared.Controls.SelectionRectangle.BorderBrushProperty">
|
||||
<summary>
|
||||
Defines the <see cref="P:Artemis.UI.Avalonia.Shared.Controls.SelectionRectangle.BorderBrush" /> property.
|
||||
Defines the
|
||||
<see cref="P:Artemis.UI.Avalonia.Shared.Controls.SelectionRectangle.BorderBrush"/>
|
||||
property.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:Artemis.UI.Avalonia.Shared.Controls.SelectionRectangle.BorderThicknessProperty">
|
||||
<summary>
|
||||
Defines the <see cref="P:Artemis.UI.Avalonia.Shared.Controls.SelectionRectangle.BorderBrush" /> property.
|
||||
Defines the
|
||||
<see cref="P:Artemis.UI.Avalonia.Shared.Controls.SelectionRectangle.BorderBrush"/>
|
||||
property.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:Artemis.UI.Avalonia.Shared.Controls.SelectionRectangle.InputElementProperty">
|
||||
<summary>
|
||||
Defines the <see cref="M:Artemis.UI.Avalonia.Shared.Controls.SelectionRectangle.get_InputElement" /> property.
|
||||
Defines the
|
||||
<see cref="M:Artemis.UI.Avalonia.Shared.Controls.SelectionRectangle.get_InputElement"/>
|
||||
property.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Artemis.UI.Avalonia.Shared.Controls.SelectionRectangle.#ctor">
|
||||
<inheritdoc />
|
||||
<inheritdoc/>
|
||||
</member>
|
||||
<member name="P:Artemis.UI.Avalonia.Shared.Controls.SelectionRectangle.Background">
|
||||
<summary>
|
||||
@@ -147,36 +177,41 @@
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Artemis.UI.Avalonia.Shared.Controls.SelectionRectangle.OnAttachedToVisualTree(Avalonia.VisualTreeAttachmentEventArgs)">
|
||||
<inheritdoc />
|
||||
<inheritdoc/>
|
||||
</member>
|
||||
<member name="M:Artemis.UI.Avalonia.Shared.Controls.SelectionRectangle.OnDetachedFromVisualTree(Avalonia.VisualTreeAttachmentEventArgs)">
|
||||
<inheritdoc />
|
||||
<inheritdoc/>
|
||||
</member>
|
||||
<member name="T:Artemis.UI.Avalonia.Shared.Converters.ColorToSKColorConverter">
|
||||
<summary>
|
||||
Converts <see cref="T:Avalonia.Media.Color" /> into <see cref="T:SkiaSharp.SKColor" />.
|
||||
Converts
|
||||
<see cref="T:Avalonia.Media.Color"/>
|
||||
into<see cref="T:SkiaSharp.SKColor"/>.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Artemis.UI.Avalonia.Shared.Converters.ColorToSKColorConverter.Convert(System.Object,System.Type,System.Object,System.Globalization.CultureInfo)">
|
||||
<inheritdoc />
|
||||
<inheritdoc/>
|
||||
</member>
|
||||
<member name="M:Artemis.UI.Avalonia.Shared.Converters.ColorToSKColorConverter.ConvertBack(System.Object,System.Type,System.Object,System.Globalization.CultureInfo)">
|
||||
<inheritdoc />
|
||||
<inheritdoc/>
|
||||
</member>
|
||||
<member name="T:Artemis.UI.Avalonia.Shared.Converters.SKColorToColorConverter">
|
||||
<summary>
|
||||
Converts <see cref="T:SkiaSharp.SKColor" /> into <see cref="T:Avalonia.Media.Color" />.
|
||||
Converts
|
||||
<see cref="T:SkiaSharp.SKColor"/>
|
||||
into<see cref="T:Avalonia.Media.Color"/>.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Artemis.UI.Avalonia.Shared.Converters.SKColorToColorConverter.Convert(System.Object,System.Type,System.Object,System.Globalization.CultureInfo)">
|
||||
<inheritdoc />
|
||||
<inheritdoc/>
|
||||
</member>
|
||||
<member name="M:Artemis.UI.Avalonia.Shared.Converters.SKColorToColorConverter.ConvertBack(System.Object,System.Type,System.Object,System.Globalization.CultureInfo)">
|
||||
<inheritdoc />
|
||||
<inheritdoc/>
|
||||
</member>
|
||||
<member name="T:Artemis.UI.Avalonia.Shared.Events.DataModelInputDynamicEventArgs">
|
||||
<summary>
|
||||
Provides data about selection events raised by <see cref="!:DataModelDynamicViewModel" />
|
||||
Provides data about selection events raised by
|
||||
<see cref="!:DataModelDynamicViewModel"/>
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Artemis.UI.Avalonia.Shared.Events.DataModelInputDynamicEventArgs.DataModelPath">
|
||||
@@ -186,7 +221,8 @@
|
||||
</member>
|
||||
<member name="T:Artemis.UI.Avalonia.Shared.Events.DataModelInputStaticEventArgs">
|
||||
<summary>
|
||||
Provides data about submit events raised by <see cref="!:DataModelStaticViewModel" />
|
||||
Provides data about submit events raised by
|
||||
<see cref="!:DataModelStaticViewModel"/>
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Artemis.UI.Avalonia.Shared.Events.DataModelInputStaticEventArgs.Value">
|
||||
@@ -246,17 +282,19 @@
|
||||
</member>
|
||||
<member name="T:Artemis.UI.Avalonia.Shared.Ninject.SharedUIModule">
|
||||
<summary>
|
||||
The main <see cref="T:Ninject.Modules.NinjectModule" /> of the Artemis Shared UI toolkit that binds all services
|
||||
The main
|
||||
<see cref="T:Ninject.Modules.NinjectModule"/>
|
||||
of the Artemis Shared UI toolkit that binds all services
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Artemis.UI.Avalonia.Shared.Ninject.SharedUIModule.Load">
|
||||
<inheritdoc />
|
||||
<inheritdoc/>
|
||||
</member>
|
||||
<member name="T:Artemis.UI.Avalonia.Shared.PluginConfigurationDialog`1">
|
||||
<inheritdoc />
|
||||
<inheritdoc/>
|
||||
</member>
|
||||
<member name="P:Artemis.UI.Avalonia.Shared.PluginConfigurationDialog`1.Type">
|
||||
<inheritdoc />
|
||||
<inheritdoc/>
|
||||
</member>
|
||||
<member name="T:Artemis.UI.Avalonia.Shared.PluginConfigurationDialog">
|
||||
<summary>
|
||||
@@ -264,7 +302,7 @@
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Artemis.UI.Avalonia.Shared.PluginConfigurationDialog.Type">
|
||||
<inheritdoc />
|
||||
<inheritdoc/>
|
||||
</member>
|
||||
<member name="T:Artemis.UI.Avalonia.Shared.PluginConfigurationViewModel">
|
||||
<summary>
|
||||
@@ -273,7 +311,9 @@
|
||||
</member>
|
||||
<member name="M:Artemis.UI.Avalonia.Shared.PluginConfigurationViewModel.#ctor(Artemis.Core.Plugin)">
|
||||
<summary>
|
||||
Creates a new instance of the <see cref="T:Artemis.UI.Avalonia.Shared.PluginConfigurationViewModel" /> class
|
||||
Creates a new instance of the
|
||||
<see cref="T:Artemis.UI.Avalonia.Shared.PluginConfigurationViewModel"/>
|
||||
class
|
||||
</summary>
|
||||
<param name="plugin"></param>
|
||||
</member>
|
||||
@@ -294,7 +334,7 @@
|
||||
</member>
|
||||
<member name="T:Artemis.UI.Avalonia.Shared.Services.Builders.FileDialogFilterBuilder">
|
||||
<summary>
|
||||
Represents a builder that can create a <see cref="T:Avalonia.Controls.FileDialogFilter" />.
|
||||
Represents a builder that can create a<see cref="T:Avalonia.Controls.FileDialogFilter"/>.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Artemis.UI.Avalonia.Shared.Services.Builders.FileDialogFilterBuilder.WithName(System.String)">
|
||||
@@ -314,7 +354,7 @@
|
||||
</member>
|
||||
<member name="T:Artemis.UI.Avalonia.Shared.Services.Builders.OpenFileDialogBuilder">
|
||||
<summary>
|
||||
Represents a builder that can create a <see cref="T:Avalonia.Controls.OpenFileDialog" />.
|
||||
Represents a builder that can create a<see cref="T:Avalonia.Controls.OpenFileDialog"/>.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Artemis.UI.Avalonia.Shared.Services.Builders.OpenFileDialogBuilder.WithAllowMultiple">
|
||||
@@ -353,7 +393,7 @@
|
||||
</member>
|
||||
<member name="T:Artemis.UI.Avalonia.Shared.Services.Builders.SaveFileDialogBuilder">
|
||||
<summary>
|
||||
Represents a builder that can create a <see cref="T:Avalonia.Controls.SaveFileDialog" />.
|
||||
Represents a builder that can create a<see cref="T:Avalonia.Controls.SaveFileDialog"/>.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Artemis.UI.Avalonia.Shared.Services.Builders.SaveFileDialogBuilder.WithTitle(System.String)">
|
||||
@@ -397,59 +437,74 @@
|
||||
</member>
|
||||
<member name="M:Artemis.UI.Avalonia.Shared.Services.Interfaces.IWindowService.ShowWindow``1(System.ValueTuple{System.String,System.Object}[])">
|
||||
<summary>
|
||||
Creates a view model instance of type <typeparamref name="TViewModel" /> and shows its corresponding View as a window
|
||||
Creates a view model instance of type
|
||||
<typeparamref name="TViewModel"/>
|
||||
and shows its corresponding View as a window
|
||||
</summary>
|
||||
<typeparam name="TViewModel">The type of view model to create</typeparam>
|
||||
<returns>The created view model</returns>
|
||||
</member>
|
||||
<member name="M:Artemis.UI.Avalonia.Shared.Services.Interfaces.IWindowService.ShowWindow(System.Object)">
|
||||
<summary>
|
||||
Given a ViewModel, show its corresponding View as a window
|
||||
Given a ViewModel, show its corresponding View as a window
|
||||
</summary>
|
||||
<param name="viewModel">ViewModel to show the View for</param>
|
||||
</member>
|
||||
<member name="M:Artemis.UI.Avalonia.Shared.Services.Interfaces.IWindowService.ShowExceptionDialog(System.String,System.Exception)">
|
||||
<summary>
|
||||
Shows a dialog displaying the given exception
|
||||
Shows a dialog displaying the given exception
|
||||
</summary>
|
||||
<param name="title">The title of the dialog</param>
|
||||
<param name="exception">The exception to display</param>
|
||||
</member>
|
||||
<member name="M:Artemis.UI.Avalonia.Shared.Services.Interfaces.IWindowService.ShowDialogAsync``1(Artemis.UI.Avalonia.Shared.DialogViewModelBase{``0})">
|
||||
<summary>
|
||||
Given an existing ViewModel, show its corresponding View as a Dialog
|
||||
Given an existing ViewModel, show its corresponding View as a Dialog
|
||||
</summary>
|
||||
<typeparam name="TResult">The return type</typeparam>
|
||||
<param name="viewModel">ViewModel to show the View for</param>
|
||||
<returns>A task containing the return value of type <typeparamref name="TResult" /></returns>
|
||||
<returns>A task containing the return value of type
|
||||
<typeparamref name="TResult"/>
|
||||
</returns>
|
||||
</member>
|
||||
<member name="M:Artemis.UI.Avalonia.Shared.Services.Interfaces.IWindowService.ShowDialogAsync``2(System.ValueTuple{System.String,System.Object}[])">
|
||||
<summary>
|
||||
Creates a view model instance of type <typeparamref name="TViewModel"/> and shows its corresponding View as a Dialog
|
||||
Creates a view model instance of type
|
||||
<typeparamref name="TViewModel"/>
|
||||
and shows its corresponding View as a Dialog
|
||||
</summary>
|
||||
<typeparam name="TViewModel">The view model type</typeparam>
|
||||
<typeparam name="TResult">The return type</typeparam>
|
||||
<returns>A task containing the return value of type <typeparamref name="TResult" /></returns>
|
||||
<returns>A task containing the return value of type
|
||||
<typeparamref name="TResult"/>
|
||||
</returns>
|
||||
</member>
|
||||
<member name="M:Artemis.UI.Avalonia.Shared.Services.Interfaces.IWindowService.ShowConfirmContentDialog(System.String,System.String,System.String,System.String)">
|
||||
<summary>
|
||||
Shows a content dialog asking the user to confirm an action
|
||||
Shows a content dialog asking the user to confirm an action
|
||||
</summary>
|
||||
<param name="title">The title of the dialog</param>
|
||||
<param name="message">The message of the dialog</param>
|
||||
<param name="confirm">The text of the confirm button</param>
|
||||
<param name="cancel">The text of the cancel button, if <see langword="null"/> the cancel button will not be shown</param>
|
||||
<returns>A task containing the result of the dialog, <see langword="true"/> if confirmed; otherwise <see langword="false"/></returns>
|
||||
<param name="cancel">The text of the cancel button, if
|
||||
<see langword="null"/>
|
||||
the cancel button will not be shown
|
||||
</param>
|
||||
<returns>A task containing the result of the dialog,
|
||||
<see langword="true"/>
|
||||
if confirmed; otherwise
|
||||
<see langword="false"/>
|
||||
</returns>
|
||||
</member>
|
||||
<member name="M:Artemis.UI.Avalonia.Shared.Services.Interfaces.IWindowService.CreateOpenFileDialog">
|
||||
<summary>
|
||||
Creates an open file dialog, use the fluent API to configure it
|
||||
Creates an open file dialog, use the fluent API to configure it
|
||||
</summary>
|
||||
<returns>The builder that can be used to configure the dialog</returns>
|
||||
</member>
|
||||
<member name="M:Artemis.UI.Avalonia.Shared.Services.Interfaces.IWindowService.CreateSaveFileDialog">
|
||||
<summary>
|
||||
Creates a save file dialog, use the fluent API to configure it
|
||||
Creates a save file dialog, use the fluent API to configure it
|
||||
</summary>
|
||||
<returns>The builder that can be used to configure the dialog</returns>
|
||||
</member>
|
||||
@@ -469,22 +524,24 @@
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Artemis.UI.Avalonia.Shared.ActivatableViewModelBase.#ctor">
|
||||
<inheritdoc />
|
||||
<inheritdoc/>
|
||||
</member>
|
||||
<member name="M:Artemis.UI.Avalonia.Shared.ActivatableViewModelBase.Dispose(System.Boolean)">
|
||||
<summary>
|
||||
Releases the unmanaged resources used by the object and optionally releases the managed resources.
|
||||
</summary>
|
||||
<param name="disposing">
|
||||
<see langword="true" /> to release both managed and unmanaged resources;
|
||||
<see langword="false" /> to release only unmanaged resources.
|
||||
<see langword="true"/>
|
||||
to release both managed and unmanaged resources;
|
||||
<see langword="false"/>
|
||||
to release only unmanaged resources.
|
||||
</param>
|
||||
</member>
|
||||
<member name="P:Artemis.UI.Avalonia.Shared.ActivatableViewModelBase.Activator">
|
||||
<inheritdoc />
|
||||
<inheritdoc/>
|
||||
</member>
|
||||
<member name="M:Artemis.UI.Avalonia.Shared.ActivatableViewModelBase.Dispose">
|
||||
<inheritdoc />
|
||||
<inheritdoc/>
|
||||
</member>
|
||||
<member name="T:Artemis.UI.Avalonia.Shared.DialogViewModelBase`1">
|
||||
<summary>
|
||||
@@ -493,7 +550,8 @@
|
||||
</member>
|
||||
<member name="M:Artemis.UI.Avalonia.Shared.DialogViewModelBase`1.Close(`0)">
|
||||
<summary>
|
||||
Closes the dialog with the given <paramref name="result" />
|
||||
Closes the dialog with the given
|
||||
<paramref name="result"/>
|
||||
</summary>
|
||||
<param name="result">The result of the dialog</param>
|
||||
</member>
|
||||
|
||||
@@ -1,41 +1,41 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<OutputType>Library</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ApplicationIcon />
|
||||
<StartupObject />
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<Platforms>x64</Platforms>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<DocumentationFile>bin\Artemis.UI.Avalonia.Shared.xml</DocumentationFile>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Avalonia" Version="0.10.15" />
|
||||
<PackageReference Include="Avalonia.Diagnostics" Version="0.10.15" />
|
||||
<PackageReference Include="Avalonia.ReactiveUI" Version="0.10.15" />
|
||||
<PackageReference Include="Avalonia.Xaml.Behaviors" Version="0.10.14" />
|
||||
<PackageReference Include="DynamicData" Version="7.8.6" />
|
||||
<PackageReference Include="FluentAvaloniaUI" Version="1.4.0" />
|
||||
<PackageReference Include="Material.Icons.Avalonia" Version="1.0.2" />
|
||||
<PackageReference Include="ReactiveUI" Version="17.1.50" />
|
||||
<PackageReference Include="ReactiveUI.Validation" Version="2.2.1" />
|
||||
<PackageReference Include="RGB.NET.Core" Version="1.0.0-prerelease.32" />
|
||||
<PackageReference Include="SkiaSharp" Version="2.88.1-preview.1" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Artemis.Core\Artemis.Core.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Update="Controls\HotkeyBox.axaml.cs">
|
||||
<DependentUpon>HotkeyBox.axaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Update="Services\Window\ExceptionDialogView.axaml.cs">
|
||||
<DependentUpon>%(Filename)</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<OutputType>Library</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ApplicationIcon />
|
||||
<StartupObject />
|
||||
<OutputPath>bin\</OutputPath>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<Platforms>x64</Platforms>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<DocumentationFile>bin\Artemis.UI.Avalonia.Shared.xml</DocumentationFile>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Avalonia" Version="0.10.15" />
|
||||
<PackageReference Include="Avalonia.Diagnostics" Version="0.10.15" />
|
||||
<PackageReference Include="Avalonia.ReactiveUI" Version="0.10.15" />
|
||||
<PackageReference Include="Avalonia.Xaml.Behaviors" Version="0.10.14" />
|
||||
<PackageReference Include="DynamicData" Version="7.8.6" />
|
||||
<PackageReference Include="FluentAvaloniaUI" Version="1.4.0" />
|
||||
<PackageReference Include="Material.Icons.Avalonia" Version="1.0.2" />
|
||||
<PackageReference Include="ReactiveUI" Version="17.1.50" />
|
||||
<PackageReference Include="ReactiveUI.Validation" Version="2.2.1" />
|
||||
<PackageReference Include="RGB.NET.Core" Version="1.0.0-prerelease.32" />
|
||||
<PackageReference Include="SkiaSharp" Version="2.88.1-preview.1" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Artemis.Core\Artemis.Core.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Update="Controls\HotkeyBox.axaml.cs">
|
||||
<DependentUpon>HotkeyBox.axaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Update="Services\Window\ExceptionDialogView.axaml.cs">
|
||||
<DependentUpon>%(Filename)</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -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
|
||||
/// <summary>
|
||||
/// Represents a number box that can be mutated by dragging over it horizontally
|
||||
/// </summary>
|
||||
public class DraggableNumberBox : UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the number box.
|
||||
/// Defines the <see cref="Value" /> property.
|
||||
/// </summary>
|
||||
public static readonly StyledProperty<double> ValueProperty = AvaloniaProperty.Register<DraggableNumberBox, double>(nameof(Value), defaultBindingMode: BindingMode.TwoWay);
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the number box.
|
||||
/// </summary>
|
||||
public double Value
|
||||
{
|
||||
get => GetValue(ValueProperty);
|
||||
set => SetValue(ValueProperty, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the minimum of the number box.
|
||||
/// Defines the <see cref="Minimum" /> property.
|
||||
/// </summary>
|
||||
public static readonly StyledProperty<double> MinimumProperty = AvaloniaProperty.Register<DraggableNumberBox, double>(nameof(Minimum), double.MinValue);
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the minimum of the number box.
|
||||
/// </summary>
|
||||
public double Minimum
|
||||
{
|
||||
get => GetValue(MinimumProperty);
|
||||
set => SetValue(MinimumProperty, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the maximum of the number box.
|
||||
/// Defines the <see cref="Maximum" /> property.
|
||||
/// </summary>
|
||||
public static readonly StyledProperty<double> MaximumProperty = AvaloniaProperty.Register<DraggableNumberBox, double>(nameof(Maximum), double.MaxValue);
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the maximum of the number box.
|
||||
/// Defines the <see cref="LargeChange" /> property.
|
||||
/// </summary>
|
||||
public double Maximum
|
||||
{
|
||||
get => GetValue(MaximumProperty);
|
||||
set => SetValue(MaximumProperty, value);
|
||||
}
|
||||
|
||||
public static readonly StyledProperty<double> LargeChangeProperty = AvaloniaProperty.Register<DraggableNumberBox, double>(nameof(LargeChange));
|
||||
|
||||
public double LargeChange
|
||||
{
|
||||
get => GetValue(LargeChangeProperty);
|
||||
set => SetValue(LargeChangeProperty, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Defines the <see cref="SmallChange" /> property.
|
||||
/// </summary>
|
||||
public static readonly StyledProperty<double> SmallChangeProperty = AvaloniaProperty.Register<DraggableNumberBox, double>(nameof(SmallChange));
|
||||
|
||||
public double SmallChange
|
||||
{
|
||||
get => GetValue(SmallChangeProperty);
|
||||
set => SetValue(SmallChangeProperty, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Defines the <see cref="SimpleNumberFormat" /> property.
|
||||
/// </summary>
|
||||
public static readonly StyledProperty<string> SimpleNumberFormatProperty = AvaloniaProperty.Register<DraggableNumberBox, string>(nameof(SimpleNumberFormat));
|
||||
|
||||
public string SimpleNumberFormat
|
||||
{
|
||||
get => GetValue(SimpleNumberFormatProperty);
|
||||
set => SetValue(SimpleNumberFormatProperty, value);
|
||||
}
|
||||
/// <summary>
|
||||
/// Defines the <see cref="Prefix" /> property.
|
||||
/// </summary>
|
||||
public static readonly StyledProperty<string?> PrefixProperty = AvaloniaProperty.Register<DraggableNumberBox, string?>(nameof(Prefix));
|
||||
|
||||
public static readonly StyledProperty<string> PrefixProperty = AvaloniaProperty.Register<DraggableNumberBox, string>(nameof(Prefix));
|
||||
|
||||
public string Prefix
|
||||
{
|
||||
get => GetValue(PrefixProperty);
|
||||
set => SetValue(PrefixProperty, value);
|
||||
}
|
||||
|
||||
public static readonly StyledProperty<string> SuffixProperty = AvaloniaProperty.Register<DraggableNumberBox, string>(nameof(Suffix));
|
||||
|
||||
public string Suffix
|
||||
{
|
||||
get => GetValue(SuffixProperty);
|
||||
set => SetValue(SuffixProperty, value);
|
||||
}
|
||||
|
||||
public event TypedEventHandler<DraggableNumberBox, EventArgs>? DragStarted;
|
||||
public event TypedEventHandler<DraggableNumberBox, EventArgs>? DragFinished;
|
||||
/// <summary>
|
||||
/// Defines the <see cref="Suffix" /> property.
|
||||
/// </summary>
|
||||
public static readonly StyledProperty<string?> SuffixProperty = AvaloniaProperty.Register<DraggableNumberBox, string?>(nameof(Suffix));
|
||||
|
||||
private readonly NumberBox _numberBox;
|
||||
private TextBox? _inputTextBox;
|
||||
private bool _moved;
|
||||
private double _lastX;
|
||||
private bool _moved;
|
||||
private double _startX;
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new instance of the <see cref="DraggableNumberBox" /> class.
|
||||
/// </summary>
|
||||
public DraggableNumberBox()
|
||||
{
|
||||
InitializeComponent();
|
||||
@@ -117,6 +77,88 @@ public partial class DraggableNumberBox : UserControl
|
||||
AddHandler(KeyUpEvent, HandleKeyUp, RoutingStrategies.Direct | RoutingStrategies.Tunnel | RoutingStrategies.Bubble, true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the number box.
|
||||
/// </summary>
|
||||
public double Value
|
||||
{
|
||||
get => GetValue(ValueProperty);
|
||||
set => SetValue(ValueProperty, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the minimum of the number box.
|
||||
/// </summary>
|
||||
public double Minimum
|
||||
{
|
||||
get => GetValue(MinimumProperty);
|
||||
set => SetValue(MinimumProperty, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the maximum of the number box.
|
||||
/// </summary>
|
||||
public double Maximum
|
||||
{
|
||||
get => GetValue(MaximumProperty);
|
||||
set => SetValue(MaximumProperty, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the amount with which to increase/decrease the value when dragging.
|
||||
/// </summary>
|
||||
public double LargeChange
|
||||
{
|
||||
get => GetValue(LargeChangeProperty);
|
||||
set => SetValue(LargeChangeProperty, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the amount with which to increase/decrease the value when dragging and holding down shift.
|
||||
/// </summary>
|
||||
public double SmallChange
|
||||
{
|
||||
get => GetValue(SmallChangeProperty);
|
||||
set => SetValue(SmallChangeProperty, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the number format string used to format the value into a display value.
|
||||
/// </summary>
|
||||
public string SimpleNumberFormat
|
||||
{
|
||||
get => GetValue(SimpleNumberFormatProperty);
|
||||
set => SetValue(SimpleNumberFormatProperty, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the prefix to show before the value.
|
||||
/// </summary>
|
||||
public string? Prefix
|
||||
{
|
||||
get => GetValue(PrefixProperty);
|
||||
set => SetValue(PrefixProperty, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the affix to show behind the value.
|
||||
/// </summary>
|
||||
public string? Suffix
|
||||
{
|
||||
get => GetValue(SuffixProperty);
|
||||
set => SetValue(SuffixProperty, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Occurs when the user starts dragging over the control.
|
||||
/// </summary>
|
||||
public event TypedEventHandler<DraggableNumberBox, EventArgs>? DragStarted;
|
||||
|
||||
/// <summary>
|
||||
/// Occurs when the user finishes dragging over the control.
|
||||
/// </summary>
|
||||
public event TypedEventHandler<DraggableNumberBox, EventArgs>? 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;
|
||||
|
||||
@@ -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;
|
||||
/// </summary>
|
||||
public sealed class GradientPickerFlyout : Flyout
|
||||
{
|
||||
private GradientPicker.GradientPicker? _picker;
|
||||
private GradientPicker? _picker;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the gradient picker that this flyout hosts.
|
||||
/// </summary>
|
||||
public GradientPicker.GradientPicker GradientPicker => _picker ??= new GradientPicker.GradientPicker();
|
||||
public GradientPicker GradientPicker => _picker ??= new GradientPicker();
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override Control CreatePresenter()
|
||||
{
|
||||
_picker ??= new GradientPicker.GradientPicker();
|
||||
_picker ??= new GradientPicker();
|
||||
FlyoutPresenter presenter = new() {Content = GradientPicker};
|
||||
return presenter;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a gradient picker that can be used to edit a gradient.
|
||||
|
||||
@@ -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;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a gradient picker box that can be used to edit a gradient
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using Avalonia.Data.Converters;
|
||||
|
||||
namespace Artemis.UI.Shared.Converters;
|
||||
|
||||
/// <summary>
|
||||
/// Converts any object to string by calling its ToString implementation, seems Avalonia doesn't do this
|
||||
/// </summary>
|
||||
public class ToStringConverter : IValueConverter
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
|
||||
{
|
||||
return value?.ToString();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
|
||||
{
|
||||
return value;
|
||||
}
|
||||
}
|
||||
+7
@@ -1,11 +1,18 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using SkiaSharp;
|
||||
|
||||
namespace Artemis.UI.Shared.DefaultTypes.DataModel.Display
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a data model display view used to display <see cref="SKColor" /> values.
|
||||
/// </summary>
|
||||
public partial class SKColorDataModelDisplayView : UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates a new instance of the <see cref="SKColorDataModelDisplayView"/> class.
|
||||
/// </summary>
|
||||
public SKColorDataModelDisplayView()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -3,8 +3,16 @@ using SkiaSharp;
|
||||
|
||||
namespace Artemis.UI.Shared.Extensions;
|
||||
|
||||
/// <summary>
|
||||
/// Provides utility methods when working with SkiaSharp matrices.
|
||||
/// </summary>
|
||||
public static class SKMatrixExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Converts the matrix to an Avalonia <see cref="Matrix" />.
|
||||
/// </summary>
|
||||
/// <param name="matrix">The matrix to convert.</param>
|
||||
/// <returns>The resulting Avalonia <see cref="Matrix" />.</returns>
|
||||
public static Matrix ToMatrix(this SKMatrix matrix)
|
||||
{
|
||||
return new Matrix(
|
||||
|
||||
@@ -3,13 +3,26 @@ using SkiaSharp;
|
||||
|
||||
namespace Artemis.UI.Shared.Extensions;
|
||||
|
||||
/// <summary>
|
||||
/// Provides utility methods when working with SkiaSharp rectangles.
|
||||
/// </summary>
|
||||
public static class SKRectExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Converts the rectangle to an Avalonia <see cref="Rect" />.
|
||||
/// </summary>
|
||||
/// <param name="rect">The rectangle to convert.</param>
|
||||
/// <returns>The resulting Avalonia <see cref="Rect" />.</returns>
|
||||
public static Rect ToRect(this SKRect rect)
|
||||
{
|
||||
return new Rect(rect.Left, rect.Top, rect.Width, rect.Height);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts the integer rectangle to an Avalonia <see cref="Rect" />.
|
||||
/// </summary>
|
||||
/// <param name="rect">The integer rectangle to convert.</param>
|
||||
/// <returns>The resulting Avalonia <see cref="Rect" />.</returns>
|
||||
public static Rect ToRect(this SKRectI rect)
|
||||
{
|
||||
return new Rect(rect.Left, rect.Top, rect.Width, rect.Height);
|
||||
|
||||
@@ -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<FileDialogFilter>();
|
||||
_openFileDialog.Filters.Add(builder.Build());
|
||||
|
||||
return this;
|
||||
|
||||
@@ -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<FileDialogFilter>();
|
||||
_saveFileDialog.Filters.Add(builder.Build());
|
||||
|
||||
return this;
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
namespace Artemis.UI.Shared.Services;
|
||||
|
||||
public class GradientPickerService : IGradientPickerService
|
||||
{
|
||||
}
|
||||
|
||||
public interface IGradientPickerService : IArtemisSharedUIService
|
||||
{
|
||||
}
|
||||
@@ -4,6 +4,9 @@ using Artemis.UI.Shared.Services.ProfileEditor;
|
||||
|
||||
namespace Artemis.UI.Shared.Services.NodeEditor;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a service that can be used to execute editor commands on node scripts.
|
||||
/// </summary>
|
||||
public interface INodeEditorService : IArtemisSharedUIService
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -9,6 +9,9 @@ using ReactiveUI;
|
||||
|
||||
namespace Artemis.UI.Shared.Services.NodeEditor;
|
||||
|
||||
/// <summary>
|
||||
/// Represents the command history of a node script.
|
||||
/// </summary>
|
||||
public class NodeEditorHistory
|
||||
{
|
||||
private readonly Subject<bool> _canRedo = new();
|
||||
@@ -16,6 +19,10 @@ public class NodeEditorHistory
|
||||
private readonly Stack<INodeEditorCommand> _redoCommands = new();
|
||||
private readonly Stack<INodeEditorCommand> _undoCommands = new();
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new instance of the <see cref="NodeEditorHistory" /> class.
|
||||
/// </summary>
|
||||
/// <param name="nodeScript">The node script the history relates to.</param>
|
||||
public NodeEditorHistory(INodeScript nodeScript)
|
||||
{
|
||||
NodeScript = nodeScript;
|
||||
@@ -25,14 +32,39 @@ public class NodeEditorHistory
|
||||
Redo = ReactiveCommand.Create(ExecuteRedo, CanRedo);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the node script the history relates to.
|
||||
/// </summary>
|
||||
public INodeScript NodeScript { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets an observable sequence containing a boolean value indicating whether history can be undone.
|
||||
/// </summary>
|
||||
public IObservable<bool> CanUndo => _canUndo.AsObservable().DistinctUntilChanged();
|
||||
|
||||
/// <summary>
|
||||
/// Gets an observable sequence containing a boolean value indicating whether history can be redone.
|
||||
/// </summary>
|
||||
public IObservable<bool> CanRedo => _canRedo.AsObservable().DistinctUntilChanged();
|
||||
|
||||
/// <summary>
|
||||
/// Gets a reactive command that can be executed to execute an instance of a <see cref="INodeEditorCommand" /> and puts it in history.
|
||||
/// </summary>
|
||||
public ReactiveCommand<INodeEditorCommand, Unit> Execute { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a reactive command that can be executed to undo history.
|
||||
/// </summary>
|
||||
public ReactiveCommand<Unit, INodeEditorCommand?> Undo { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a reactive command that can be executed to redo history.
|
||||
/// </summary>
|
||||
public ReactiveCommand<Unit, INodeEditorCommand?> Redo { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Clears the history.
|
||||
/// </summary>
|
||||
public void Clear()
|
||||
{
|
||||
ClearRedo();
|
||||
@@ -40,6 +72,10 @@ public class NodeEditorHistory
|
||||
UpdateSubjects();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Executes the provided <paramref name="command" /> and puts it in history.
|
||||
/// </summary>
|
||||
/// <param name="command">The command to execute</param>
|
||||
public void ExecuteEditorCommand(INodeEditorCommand command)
|
||||
{
|
||||
command.Execute();
|
||||
|
||||
@@ -9,6 +9,9 @@ using ReactiveUI;
|
||||
|
||||
namespace Artemis.UI.Shared.Services.ProfileEditor;
|
||||
|
||||
/// <summary>
|
||||
/// Represents the command history of a profile configuration.
|
||||
/// </summary>
|
||||
public class ProfileEditorHistory
|
||||
{
|
||||
private readonly Subject<bool> _canRedo = new();
|
||||
@@ -16,6 +19,10 @@ public class ProfileEditorHistory
|
||||
private readonly Stack<IProfileEditorCommand> _redoCommands = new();
|
||||
private readonly Stack<IProfileEditorCommand> _undoCommands = new();
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new instance of the <see cref="ProfileEditorHistory" /> class.
|
||||
/// </summary>
|
||||
/// <param name="profileConfiguration">The profile configuration the history relates to.</param>
|
||||
public ProfileEditorHistory(ProfileConfiguration profileConfiguration)
|
||||
{
|
||||
ProfileConfiguration = profileConfiguration;
|
||||
@@ -25,14 +32,39 @@ public class ProfileEditorHistory
|
||||
Redo = ReactiveCommand.Create(ExecuteRedo, CanRedo);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the profile configuration the history relates to.
|
||||
/// </summary>
|
||||
public ProfileConfiguration ProfileConfiguration { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets an observable sequence containing a boolean value indicating whether history can be undone.
|
||||
/// </summary>
|
||||
public IObservable<bool> CanUndo => _canUndo.AsObservable().DistinctUntilChanged();
|
||||
|
||||
/// <summary>
|
||||
/// Gets an observable sequence containing a boolean value indicating whether history can be redone.
|
||||
/// </summary>
|
||||
public IObservable<bool> CanRedo => _canRedo.AsObservable().DistinctUntilChanged();
|
||||
|
||||
/// <summary>
|
||||
/// Gets a reactive command that can be executed to execute an instance of a <see cref="IProfileEditorCommand" /> and puts it in history.
|
||||
/// </summary>
|
||||
public ReactiveCommand<IProfileEditorCommand, Unit> Execute { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a reactive command that can be executed to undo history.
|
||||
/// </summary>
|
||||
public ReactiveCommand<Unit, IProfileEditorCommand?> Undo { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a reactive command that can be executed to redo history.
|
||||
/// </summary>
|
||||
public ReactiveCommand<Unit, IProfileEditorCommand?> Redo { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Clears the history.
|
||||
/// </summary>
|
||||
public void Clear()
|
||||
{
|
||||
ClearRedo();
|
||||
@@ -40,6 +72,10 @@ public class ProfileEditorHistory
|
||||
UpdateSubjects();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Executes the provided <paramref name="command" /> and puts it in history.
|
||||
/// </summary>
|
||||
/// <param name="command">The command to execute</param>
|
||||
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();
|
||||
}
|
||||
|
||||
@@ -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<T> : PropertyInputViewModel
|
||||
/// <summary>
|
||||
/// Gets or boolean indicating whether the current input is being previewed, the value won't be applied until
|
||||
/// <para>
|
||||
/// Only applicable when using something like a <see cref="DraggableFloat" />, see
|
||||
/// Only applicable when using something like a <see cref="DraggableNumberBox" />, see
|
||||
/// <see cref="StartPreview" /> and <see cref="ApplyPreview" />
|
||||
/// </para>
|
||||
/// </summary>
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<Styles xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
|
||||
xmlns:gradientPicker="clr-namespace:Artemis.UI.Shared.GradientPicker"
|
||||
xmlns:dataModelPicker="clr-namespace:Artemis.UI.Shared.DataModelPicker"
|
||||
xmlns:controls1="clr-namespace:Artemis.UI.Shared"
|
||||
xmlns:controls2="clr-namespace:Artemis.UI.Shared.Controls">
|
||||
xmlns:controls2="clr-namespace:Artemis.UI.Shared.Controls"
|
||||
xmlns:gradientPicker="clr-namespace:Artemis.UI.Shared.Controls.GradientPicker">
|
||||
<Design.PreviewWith>
|
||||
<Border Padding="50">
|
||||
<StackPanel Spacing="5">
|
||||
|
||||
@@ -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">
|
||||
<Design.PreviewWith>
|
||||
<Border Padding="20" Width="200">
|
||||
<StackPanel Spacing="5">
|
||||
|
||||
@@ -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">
|
||||
<Styles.Resources>
|
||||
<VisualBrush x:Key="LightCheckerboardBrush" TileMode="Tile" Stretch="Uniform" DestinationRect="3,0,10,10">
|
||||
<VisualBrush.Visual>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<Styles xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
|
||||
xmlns:gradientPicker="clr-namespace:Artemis.UI.Shared.GradientPicker">
|
||||
xmlns:gradientPicker="clr-namespace:Artemis.UI.Shared.Controls.GradientPicker">
|
||||
<Design.PreviewWith>
|
||||
<Border Padding="20" Width="200">
|
||||
<StackPanel Spacing="5">
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
-->
|
||||
|
||||
<configuration>
|
||||
<packageSources>
|
||||
<add key="AvaloniaCI" value="https://www.myget.org/F/avalonia-ci/api/v2" />
|
||||
</packageSources>
|
||||
<packageSources>
|
||||
<add key="AvaloniaCI" value="https://www.myget.org/F/avalonia-ci/api/v2"/>
|
||||
</packageSources>
|
||||
</configuration>
|
||||
Reference in new issue
Block a user