Added Nuget feed and updated Avalonia to CI build for now

This commit is contained in:
Robert committed 2023-04-30 20:58:30 +02:00
1 parent ebe7f68e9d
commit 33f375e608
9 files changed
+39 -28

No files matched your search

@@ -6,8 +6,10 @@ using Artemis.Core;
using Artemis.Core.Services;
using Artemis.UI.Exceptions;
using Artemis.UI.Shared;
using HidSharp.Reports.Units;
using ReactiveUI;
using RGB.NET.Core;
using Unit = System.Reactive.Unit;
namespace Artemis.UI.Screens.Device;
@@ -30,13 +32,13 @@ public class InputMappingsTabViewModel : ActivatableViewModelBase
Device = device;
DisplayName = "Input Mappings";
InputMappings = new ObservableCollection<(ArtemisLed, ArtemisLed)>();
DeleteMapping = ReactiveCommand.Create<(ArtemisLed, ArtemisLed)>(ExecuteDeleteMapping);
this.WhenActivated(d =>
{
_selectedLeds.CollectionChanged += SelectedLedsOnCollectionChanged;
_inputService.KeyboardKeyUp += InputServiceOnKeyboardKeyUp;
UpdateInputMappings();
Disposable.Create(() =>
{
_selectedLeds.CollectionChanged -= SelectedLedsOnCollectionChanged;
@@ -46,6 +48,8 @@ public class InputMappingsTabViewModel : ActivatableViewModelBase
});
}
public ReactiveCommand<(ArtemisLed, ArtemisLed), Unit> DeleteMapping { get; }
public ArtemisDevice Device { get; }
public ArtemisLed? SelectedLed
@@ -56,7 +60,7 @@ public class InputMappingsTabViewModel : ActivatableViewModelBase
public ObservableCollection<(ArtemisLed, ArtemisLed)> InputMappings { get; }
public void DeleteMapping((ArtemisLed, ArtemisLed) inputMapping)
private void ExecuteDeleteMapping((ArtemisLed, ArtemisLed) inputMapping)
{
Device.InputMappings.Remove(inputMapping.Item1);
UpdateInputMappings();
@@ -50,7 +50,7 @@ public class DataBindingViewModel : ActivatableViewModelBase
.DisposeWith(d);
_profileEditorService.Playing.CombineLatest(_profileEditorService.SuspendedEditing).Subscribe(tuple => _playing = tuple.First || tuple.Second).DisposeWith(d);
DispatcherTimer updateTimer = new(TimeSpan.FromMilliseconds(25.0 / 1000), DispatcherPriority.Render, Update);
DispatcherTimer updateTimer = new(TimeSpan.FromMilliseconds(25.0 / 1000), DispatcherPriority.Background, Update);
// TODO: Remove in favor of saving each time a node editor command is executed
DispatcherTimer saveTimer = new(TimeSpan.FromMinutes(2), DispatcherPriority.Normal, Save);