1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-13 05:48:35 +00:00

Nodes - Save data binding node scripts

This commit is contained in:
Robert 2021-08-25 15:32:58 +02:00
parent 3874078f16
commit bd3bf20d92
6 changed files with 27 additions and 26 deletions

View File

@ -211,6 +211,8 @@ namespace Artemis.Core
{ {
if (_disposed) if (_disposed)
throw new ObjectDisposedException("DataBinding"); throw new ObjectDisposedException("DataBinding");
IsEnabled = Entity.IsEnabled;
} }
/// <inheritdoc /> /// <inheritdoc />
@ -229,6 +231,7 @@ namespace Artemis.Core
throw new ObjectDisposedException("DataBinding"); throw new ObjectDisposedException("DataBinding");
Script.Save(); Script.Save();
Entity.IsEnabled = IsEnabled;
Entity.NodeScript = Script?.Entity; Entity.NodeScript = Script?.Entity;
} }

View File

@ -468,7 +468,7 @@ namespace Artemis.Core
Entity = entity ?? throw new ArgumentNullException(nameof(entity)); Entity = entity ?? throw new ArgumentNullException(nameof(entity));
PropertyDescription = description ?? throw new ArgumentNullException(nameof(description)); PropertyDescription = description ?? throw new ArgumentNullException(nameof(description));
IsLoadedFromStorage = fromStorage; IsLoadedFromStorage = fromStorage;
DataBinding = new DataBinding<T>(this); DataBinding = Entity.DataBinding != null ? new DataBinding<T>(this, Entity.DataBinding) : new DataBinding<T>(this);
if (PropertyDescription.DisableKeyframes) if (PropertyDescription.DisableKeyframes)
KeyframesSupported = false; KeyframesSupported = false;

View File

@ -71,7 +71,7 @@ namespace Artemis.Core.Services
private void UtilitiesOnShutdownRequested(object? sender, EventArgs e) private void UtilitiesOnShutdownRequested(object? sender, EventArgs e)
{ {
IsRenderPaused = true; SetRenderPaused(true);
} }
private void SurfaceOnLayoutChanged(SurfaceLayoutChangedEventArgs args) private void SurfaceOnLayoutChanged(SurfaceLayoutChangedEventArgs args)

View File

@ -31,6 +31,8 @@ namespace Artemis.Core
DataBindingExitNode = new DataBindingExitNode<TLayerProperty>(dataBinding); DataBindingExitNode = new DataBindingExitNode<TLayerProperty>(dataBinding);
ExitNode = DataBindingExitNode; ExitNode = DataBindingExitNode;
AddNode(ExitNode); AddNode(ExitNode);
Load();
} }
} }
} }

View File

@ -5,6 +5,7 @@ namespace Artemis.Storage.Entities.Profile.DataBindings
public class DataBindingEntity public class DataBindingEntity
{ {
public string Identifier { get; set; } public string Identifier { get; set; }
public bool IsEnabled { get; set; }
public NodeScriptEntity NodeScript { get; set; } public NodeScriptEntity NodeScript { get; set; }
} }
} }

View File

@ -344,13 +344,10 @@
}, },
"Serilog.Sinks.Console": { "Serilog.Sinks.Console": {
"type": "Transitive", "type": "Transitive",
"resolved": "3.1.1", "resolved": "4.0.0",
"contentHash": "56mI5AqvyF/i/c2451nvV71kq370XOCE4Uu5qiaJ295sOhMb9q3BWwG7mWLOVSnmpWiq0SBT3SXfgRXGNP6vzA==", "contentHash": "yJQit9sTJ4xGLKgCujqDJsaGqBNJwGB/H898z+xYlMG06twy4//6LLnSrsmpduZxcHIG4im7cv+JmXLzXz2EkQ==",
"dependencies": { "dependencies": {
"Serilog": "2.5.0", "Serilog": "2.10.0"
"System.Console": "4.3.0",
"System.Runtime.InteropServices": "4.3.0",
"System.Runtime.InteropServices.RuntimeInformation": "4.3.0"
} }
}, },
"Serilog.Sinks.Debug": { "Serilog.Sinks.Debug": {
@ -363,13 +360,10 @@
}, },
"Serilog.Sinks.File": { "Serilog.Sinks.File": {
"type": "Transitive", "type": "Transitive",
"resolved": "4.1.0", "resolved": "5.0.0",
"contentHash": "U0b34w+ZikbqWEZ3ui7BdzxY/19zwrdhLtI3o6tfmLdD3oXxg7n2TZJjwCCTlKPgRuYic9CBWfrZevbb70mTaw==", "contentHash": "uwV5hdhWPwUH1szhO8PJpFiahqXmzPzJT/sOijH/kFgUx+cyoDTMM8MHD0adw9+Iem6itoibbUXHYslzXsLEAg==",
"dependencies": { "dependencies": {
"Serilog": "2.5.0", "Serilog": "2.10.0"
"System.IO.FileSystem": "4.0.1",
"System.Text.Encoding.Extensions": "4.0.11",
"System.Threading.Timer": "4.0.1"
} }
}, },
"SharpVectors.Reloaded": { "SharpVectors.Reloaded": {
@ -379,19 +373,20 @@
}, },
"SkiaSharp.Views.Desktop.Common": { "SkiaSharp.Views.Desktop.Common": {
"type": "Transitive", "type": "Transitive",
"resolved": "2.80.2", "resolved": "2.80.3",
"contentHash": "0vBvweMysgl1wgjuTQUhdJMD5z5nBjtYqmnHPeX+qHfkc336Wj2L3jEqwmGb0YP+RV47gFGz0EzMAW6szZch9w==", "contentHash": "CMQu9fr3BxGRsRryDC6lkYbYaSI2CI+RqisFX0WIdbOdbigUOLhqchmKIMb4EdFAZk13vk862qiE9v97iDZS7g==",
"dependencies": { "dependencies": {
"SkiaSharp": "2.80.2" "SkiaSharp": "2.80.3",
"System.Drawing.Common": "4.5.1"
} }
}, },
"SkiaSharp.Views.WPF": { "SkiaSharp.Views.WPF": {
"type": "Transitive", "type": "Transitive",
"resolved": "2.80.2", "resolved": "2.80.3",
"contentHash": "Fzo2+MNwHDh9Cob8sk7OO26kp3bhofjXMwlEK8IncF1ehu9hi3sH9iQDJrue9a88VEJJ+yyLISPUFcmXlGHSyQ==", "contentHash": "oKUMm7WzFeoie6rW5nnwSGKZ94misyRsAc1wU6SEqgd6ssW17nyfohHxHuBHtmpLtIRwvjhfAu3cMLrpX/oNcw==",
"dependencies": { "dependencies": {
"SkiaSharp": "2.80.2", "SkiaSharp": "2.80.3",
"SkiaSharp.Views.Desktop.Common": "2.80.2" "SkiaSharp.Views.Desktop.Common": "2.80.3"
} }
}, },
"System.AppContext": { "System.AppContext": {
@ -1299,10 +1294,10 @@
"Ninject.Extensions.ChildKernel": "3.3.0", "Ninject.Extensions.ChildKernel": "3.3.0",
"Ninject.Extensions.Conventions": "3.3.0", "Ninject.Extensions.Conventions": "3.3.0",
"Serilog": "2.10.0", "Serilog": "2.10.0",
"Serilog.Sinks.Console": "3.1.1", "Serilog.Sinks.Console": "4.0.0",
"Serilog.Sinks.Debug": "2.0.0", "Serilog.Sinks.Debug": "2.0.0",
"Serilog.Sinks.File": "4.1.0", "Serilog.Sinks.File": "5.0.0",
"SkiaSharp": "2.80.2", "SkiaSharp": "2.80.3",
"System.Buffers": "4.5.1", "System.Buffers": "4.5.1",
"System.IO.FileSystem.AccessControl": "5.0.0", "System.IO.FileSystem.AccessControl": "5.0.0",
"System.Numerics.Vectors": "4.5.0", "System.Numerics.Vectors": "4.5.0",
@ -1328,8 +1323,8 @@
"Ninject": "3.3.4", "Ninject": "3.3.4",
"Ninject.Extensions.Conventions": "3.3.0", "Ninject.Extensions.Conventions": "3.3.0",
"SharpVectors.Reloaded": "1.7.5", "SharpVectors.Reloaded": "1.7.5",
"SkiaSharp": "2.80.2", "SkiaSharp": "2.80.3",
"SkiaSharp.Views.WPF": "2.80.2", "SkiaSharp.Views.WPF": "2.80.3",
"Stylet": "1.3.6", "Stylet": "1.3.6",
"System.Buffers": "4.5.1", "System.Buffers": "4.5.1",
"System.Numerics.Vectors": "4.5.0" "System.Numerics.Vectors": "4.5.0"