mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Code style - Use file scoped namespaces
Code style - Ran code cleanup
This commit is contained in:
1 parent
e68e16df4d
commit
f6090dc296
691 files changed
+37301
-38119
No files matched your search
+12
-13
@@ -1,18 +1,17 @@
|
||||
using Avalonia.Markup.Xaml;
|
||||
using Avalonia.ReactiveUI;
|
||||
|
||||
namespace Artemis.VisualScripting.Nodes.Operators.Screens
|
||||
{
|
||||
public partial class EnumEqualsNodeCustomView : ReactiveUserControl<EnumEqualsNodeCustomViewModel>
|
||||
{
|
||||
public EnumEqualsNodeCustomView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
namespace Artemis.VisualScripting.Nodes.Operators.Screens;
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
AvaloniaXamlLoader.Load(this);
|
||||
}
|
||||
public class EnumEqualsNodeCustomView : ReactiveUserControl<EnumEqualsNodeCustomViewModel>
|
||||
{
|
||||
public EnumEqualsNodeCustomView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
AvaloniaXamlLoader.Load(this);
|
||||
}
|
||||
}
|
||||
+12
-13
@@ -8,7 +8,6 @@ using Artemis.UI.Shared.VisualScripting;
|
||||
using Avalonia.Controls.Mixins;
|
||||
using Avalonia.Threading;
|
||||
using DynamicData;
|
||||
using FluentAvalonia.Core;
|
||||
using Humanizer;
|
||||
using ReactiveUI;
|
||||
|
||||
@@ -43,6 +42,18 @@ public class EnumEqualsNodeCustomViewModel : CustomNodeViewModel
|
||||
});
|
||||
}
|
||||
|
||||
public ObservableCollection<(long, string)> EnumValues { get; } = new();
|
||||
|
||||
public (long, string) CurrentValue
|
||||
{
|
||||
get => EnumValues.FirstOrDefault(v => v.Item1 == _node.Storage);
|
||||
set
|
||||
{
|
||||
if (!Equals(_node.Storage, value.Item1))
|
||||
_nodeEditorService.ExecuteCommand(Script, new UpdateStorage<long>(_node, value.Item1));
|
||||
}
|
||||
}
|
||||
|
||||
private void AddEnumValues(Type type)
|
||||
{
|
||||
Dispatcher.UIThread.Post(() =>
|
||||
@@ -56,16 +67,4 @@ public class EnumEqualsNodeCustomViewModel : CustomNodeViewModel
|
||||
this.RaisePropertyChanged(nameof(CurrentValue));
|
||||
}, DispatcherPriority.Background);
|
||||
}
|
||||
|
||||
public ObservableCollection<(long, string)> EnumValues { get; } = new();
|
||||
|
||||
public (long, string) CurrentValue
|
||||
{
|
||||
get => EnumValues.FirstOrDefault(v => v.Item1 == _node.Storage);
|
||||
set
|
||||
{
|
||||
if (!Equals(_node.Storage, value.Item1))
|
||||
_nodeEditorService.ExecuteCommand(Script, new UpdateStorage<long>(_node, value.Item1));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user