mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 03:48:56 +00:00
Conditions - Removed old systems
Data bindings - Removed old systems Data bindings - Implemented node system
This commit is contained in:
1 parent
32d4ec2812
commit
5675d1895b
157 files changed
+784
-8802
No files matched your search
@@ -1,46 +0,0 @@
|
||||
using System.Linq;
|
||||
using Artemis.Core;
|
||||
using Artemis.UI.Shared.Services;
|
||||
|
||||
namespace Artemis.UI.Shared
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides extensions for special data model wrappers used by events and list conditions
|
||||
/// </summary>
|
||||
public static class DataModelWrapperExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates a view model for a <see cref="EventPredicateWrapperDataModel" />
|
||||
/// </summary>
|
||||
/// <param name="wrapper">The wrapper to create the view model for</param>
|
||||
/// <param name="dataModelUIService">The data model UI service to be used by the view model</param>
|
||||
/// <param name="configuration">The update configuration to be used by the view model</param>
|
||||
/// <returns>The created view model</returns>
|
||||
public static DataModelPropertiesViewModel CreateViewModel(this EventPredicateWrapperDataModel wrapper, IDataModelUIService dataModelUIService, DataModelUpdateConfiguration configuration)
|
||||
{
|
||||
DataModelPropertiesViewModel viewModel = new(wrapper, null, new DataModelPath(wrapper));
|
||||
viewModel.Update(dataModelUIService, configuration);
|
||||
viewModel.UpdateRequested += (sender, args) => viewModel.Update(dataModelUIService, configuration);
|
||||
viewModel.Children.First().IsVisualizationExpanded = true;
|
||||
|
||||
return viewModel;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a view model for a <see cref="ListPredicateWrapperDataModel" />
|
||||
/// </summary>
|
||||
/// <param name="wrapper">The wrapper to create the view model for</param>
|
||||
/// <param name="dataModelUIService">The data model UI service to be used by the view model</param>
|
||||
/// <param name="configuration">The update configuration to be used by the view model</param>
|
||||
/// <returns>The created view model</returns>
|
||||
public static DataModelPropertiesViewModel CreateViewModel(this ListPredicateWrapperDataModel wrapper, IDataModelUIService dataModelUIService, DataModelUpdateConfiguration configuration)
|
||||
{
|
||||
DataModelPropertiesViewModel viewModel = new(wrapper, null, new DataModelPath(wrapper));
|
||||
viewModel.Update(dataModelUIService, configuration);
|
||||
viewModel.UpdateRequested += (sender, args) => viewModel.Update(dataModelUIService, configuration);
|
||||
viewModel.Children.First().IsVisualizationExpanded = true;
|
||||
|
||||
return viewModel;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user