mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Meta - Update RGB.NET
Meta - Fixed warnings
This commit is contained in:
parent
ef5a9fa88d
commit
166cb888c1
@ -44,9 +44,9 @@
|
||||
<PackageReference Include="Ninject" Version="3.3.6" />
|
||||
<PackageReference Include="Ninject.Extensions.ChildKernel" Version="3.3.0" />
|
||||
<PackageReference Include="Ninject.Extensions.Conventions" Version="3.3.0" />
|
||||
<PackageReference Include="RGB.NET.Core" Version="1.0.0-prerelease.46" />
|
||||
<PackageReference Include="RGB.NET.Layout" Version="1.0.0-prerelease.46" />
|
||||
<PackageReference Include="RGB.NET.Presets" Version="1.0.0-prerelease.46" />
|
||||
<PackageReference Include="RGB.NET.Core" Version="1.0.0" />
|
||||
<PackageReference Include="RGB.NET.Layout" Version="1.0.0" />
|
||||
<PackageReference Include="RGB.NET.Presets" Version="1.0.0" />
|
||||
<PackageReference Include="Serilog" Version="2.11.0" />
|
||||
<PackageReference Include="Serilog.Sinks.Console" Version="4.0.1" />
|
||||
<PackageReference Include="Serilog.Sinks.Debug" Version="2.0.0" />
|
||||
|
||||
@ -62,8 +62,8 @@ public static class Constants
|
||||
/// <summary>
|
||||
/// The current API version for plugins
|
||||
/// </summary>
|
||||
public static readonly int PluginApiVersion = int.Parse(CoreAssembly.GetCustomAttributes<AssemblyMetadataAttribute>()
|
||||
.First(a => a.Key == "PluginApiVersion").Value);
|
||||
public static readonly int PluginApiVersion = int.Parse(CoreAssembly.GetCustomAttributes<AssemblyMetadataAttribute>().First(a => a.Key == "PluginApiVersion").Value ??
|
||||
throw new InvalidOperationException("Cannot find PluginApiVersion metadata in assembly"));
|
||||
|
||||
/// <summary>
|
||||
/// The plugin info used by core components of Artemis
|
||||
|
||||
@ -10,9 +10,9 @@ namespace Artemis.Core.JsonConverters
|
||||
/// </summary>
|
||||
internal class ForgivingVersionConverter : VersionConverter
|
||||
{
|
||||
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
|
||||
public override object? ReadJson(JsonReader reader, Type objectType, object? existingValue, JsonSerializer serializer)
|
||||
{
|
||||
object obj = base.ReadJson(reader, objectType, existingValue, serializer);
|
||||
object? obj = base.ReadJson(reader, objectType, existingValue, serializer);
|
||||
if (obj is not Version v)
|
||||
return obj;
|
||||
|
||||
|
||||
@ -18,7 +18,6 @@ namespace Artemis.Core;
|
||||
public class PluginFeatureInfo : CorePropertyChanged, IPrerequisitesSubject
|
||||
{
|
||||
private string? _description;
|
||||
private string? _icon;
|
||||
private PluginFeature? _instance;
|
||||
private Exception? _loadException;
|
||||
private string _name = null!;
|
||||
|
||||
@ -8,7 +8,10 @@ namespace Artemis.Core.Services;
|
||||
/// </summary>
|
||||
public abstract class InputProvider : IDisposable
|
||||
{
|
||||
public InputProvider()
|
||||
/// <summary>
|
||||
/// Creates a new instance of the <see cref="InputProvider"/> class.
|
||||
/// </summary>
|
||||
protected InputProvider()
|
||||
{
|
||||
ProviderName = GetType().FullName ?? throw new InvalidOperationException("Input provider must have a type with a name");
|
||||
}
|
||||
|
||||
@ -97,7 +97,7 @@ public interface INode : INotifyPropertyChanged, IBreakableModel
|
||||
void TryEvaluate();
|
||||
|
||||
/// <summary>
|
||||
/// Resets the node causing all pins to re-evaluate the next time <see cref="Evaluate" /> is called
|
||||
/// Resets the node causing all pins to re-evaluate the next time <see cref="TryEvaluate" /> is called
|
||||
/// </summary>
|
||||
void Reset();
|
||||
}
|
||||
@ -20,7 +20,7 @@
|
||||
<PackageReference Include="Material.Icons.Avalonia" Version="1.1.10" />
|
||||
<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.46" />
|
||||
<PackageReference Include="RGB.NET.Core" Version="1.0.0" />
|
||||
<PackageReference Include="SkiaSharp" Version="2.88.1-preview.108" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@ -317,7 +317,7 @@ public class DeviceVisualizer : Control
|
||||
|
||||
Dispatcher.UIThread.Post(InvalidateMeasure);
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (Exception)
|
||||
{
|
||||
// ignored
|
||||
}
|
||||
|
||||
@ -18,7 +18,7 @@ namespace Artemis.UI.Shared.DataModelVisualization.Shared;
|
||||
/// </summary>
|
||||
public abstract class DataModelVisualizationViewModel : ReactiveObject, IDisposable
|
||||
{
|
||||
private const int MaxDepth = 4;
|
||||
private const int MAX_DEPTH = 4;
|
||||
private ObservableCollection<DataModelVisualizationViewModel> _children;
|
||||
private DataModel? _dataModel;
|
||||
private bool _isMatchingFilteredTypes;
|
||||
@ -47,6 +47,9 @@ public abstract class DataModelVisualizationViewModel : ReactiveObject, IDisposa
|
||||
PropertyDescription = DataModelPath?.GetPropertyDescription() ?? DataModel?.DataModelDescription;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Copies the path of the data model to the clipboard.
|
||||
/// </summary>
|
||||
public ReactiveCommand<Unit, Unit> CopyPath { get; }
|
||||
|
||||
/// <summary>
|
||||
@ -337,7 +340,7 @@ public abstract class DataModelVisualizationViewModel : ReactiveObject, IDisposa
|
||||
{
|
||||
if (DataModel == null)
|
||||
throw new ArtemisSharedUIException("Cannot create a data model visualization child VM for a parent without a data model");
|
||||
if (depth > MaxDepth)
|
||||
if (depth > MAX_DEPTH)
|
||||
return null;
|
||||
|
||||
DataModelPath dataModelPath = new(DataModel, path);
|
||||
|
||||
@ -19,6 +19,9 @@ namespace Artemis.UI.Shared;
|
||||
/// <typeparam name="TViewModel">ViewModel type.</typeparam>
|
||||
public class ReactiveCoreWindow<TViewModel> : CoreWindow, IViewFor<TViewModel> where TViewModel : class
|
||||
{
|
||||
/// <summary>
|
||||
/// The ViewModel.
|
||||
/// </summary>
|
||||
public static readonly StyledProperty<TViewModel?> ViewModelProperty = AvaloniaProperty
|
||||
.Register<ReactiveCoreWindow<TViewModel>, TViewModel?>(nameof(ViewModel));
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@ using Artemis.Core;
|
||||
namespace Artemis.UI.Shared.Services.ProfileEditor.Commands;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a profile editor command that can be used to update a layer property of type <typeparamref name="T" />.
|
||||
/// Represents a profile editor command that can be used to update a color gradient.
|
||||
/// </summary>
|
||||
public class UpdateColorGradient : IProfileEditorCommand
|
||||
{
|
||||
|
||||
@ -29,8 +29,8 @@
|
||||
<PackageReference Include="Material.Icons.Avalonia" Version="1.1.10" />
|
||||
<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.46" />
|
||||
<PackageReference Include="RGB.NET.Layout" Version="1.0.0-prerelease.46" />
|
||||
<PackageReference Include="RGB.NET.Core" Version="1.0.0" />
|
||||
<PackageReference Include="RGB.NET.Layout" Version="1.0.0" />
|
||||
<PackageReference Include="SkiaSharp" Version="2.88.1-preview.108" />
|
||||
<PackageReference Include="Splat.Ninject" Version="14.4.1" />
|
||||
</ItemGroup>
|
||||
|
||||
@ -92,7 +92,7 @@ public class RootViewModel : ActivatableViewModelBase, IScreen, IMainWindowProvi
|
||||
|
||||
private void CurrentMainWindowOnClosing(object? sender, EventArgs e)
|
||||
{
|
||||
WindowSizeSetting.Save();
|
||||
WindowSizeSetting?.Save();
|
||||
_lifeTime.MainWindow = null;
|
||||
SidebarViewModel = null;
|
||||
Router.NavigateAndReset.Execute(new EmptyViewModel(this, "blank")).Subscribe();
|
||||
|
||||
@ -139,7 +139,6 @@ public class ProfileConfigurationEditViewModel : DialogViewModelBase<ProfileConf
|
||||
public ReactiveCommand<Unit, Unit> OpenConditionEditor { get; }
|
||||
public ReactiveCommand<Unit, Unit> BrowseBitmapFile { get; }
|
||||
public ReactiveCommand<Unit, Unit> Confirm { get; }
|
||||
public ReactiveCommand<Unit, Unit> Import { get; }
|
||||
public ReactiveCommand<Unit, Unit> Delete { get; }
|
||||
public ReactiveCommand<Unit, Unit> Cancel { get; }
|
||||
|
||||
|
||||
@ -117,7 +117,7 @@ public class LayerPropertyNode : Node<LayerPropertyNodeEntity, LayerPropertyNode
|
||||
/// The bucket might grow a bit over time as the user edits the node but pins won't get lost, enabling undo/redo in the
|
||||
/// editor.
|
||||
/// </summary>
|
||||
private void CreateOrAddOutputPin(Type valueType, string displayName)
|
||||
private new void CreateOrAddOutputPin(Type valueType, string displayName)
|
||||
{
|
||||
// Grab the first pin from the bucket that isn't on the node yet
|
||||
OutputPin? pin = _pinBucket.FirstOrDefault(p => !Pins.Contains(p));
|
||||
|
||||
@ -9,7 +9,7 @@ namespace Artemis.VisualScripting.Nodes.List;
|
||||
public class ListOperatorPredicateNode : Node<ListOperatorEntity, ListOperatorPredicateNodeCustomViewModel>, IDisposable
|
||||
{
|
||||
private readonly object _scriptLock = new();
|
||||
private ListOperatorPredicateStartNode _startNode;
|
||||
private readonly ListOperatorPredicateStartNode _startNode;
|
||||
|
||||
public ListOperatorPredicateNode()
|
||||
{
|
||||
@ -65,7 +65,7 @@ public class ListOperatorPredicateNode : Node<ListOperatorEntity, ListOperatorPr
|
||||
|
||||
private bool EvaluateItem(object item)
|
||||
{
|
||||
if (Script == null || _startNode == null)
|
||||
if (Script == null)
|
||||
return false;
|
||||
|
||||
_startNode.Item = item;
|
||||
@ -100,7 +100,6 @@ public class ListOperatorPredicateNode : Node<ListOperatorEntity, ListOperatorPr
|
||||
{
|
||||
Script?.Dispose();
|
||||
Script = null;
|
||||
_startNode = null;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user