mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 19:36:28 +00:00
Dynamic data models - Rewrote the visualization to use leverage new core APIs
This commit is contained in:
1 parent
26db794467
commit
8f552d0f71
22 files changed
+463
-374
No files matched your search
+4
-4
@@ -135,7 +135,7 @@ namespace Artemis.UI.Screens.ProfileEditor.Conditions
|
||||
|
||||
var leftSideType = _isPrimitiveList
|
||||
? DataModelConditionListPredicate.DataModelConditionList.ListType
|
||||
: LeftSideSelectionViewModel.SelectedPropertyViewModel?.PropertyInfo?.PropertyType;
|
||||
: LeftSideSelectionViewModel.SelectedPropertyViewModel?.DataModelPath?.GetPropertyType();
|
||||
|
||||
// Get the supported operators
|
||||
Operators.Clear();
|
||||
@@ -192,7 +192,7 @@ namespace Artemis.UI.Screens.ProfileEditor.Conditions
|
||||
|
||||
public void ApplyLeftSide()
|
||||
{
|
||||
DataModelConditionListPredicate.UpdateLeftSide(LeftSideSelectionViewModel.SelectedPropertyViewModel.PropertyPath);
|
||||
DataModelConditionListPredicate.UpdateLeftSide(LeftSideSelectionViewModel.SelectedPropertyViewModel.Path);
|
||||
_profileEditorService.UpdateSelectedProfileElement();
|
||||
|
||||
SelectedOperator = DataModelConditionListPredicate.Operator;
|
||||
@@ -205,12 +205,12 @@ namespace Artemis.UI.Screens.ProfileEditor.Conditions
|
||||
{
|
||||
DataModelConditionListPredicate.UpdateRightSideDynamic(
|
||||
RightSideSelectionViewModel.SelectedPropertyViewModel.DataModel,
|
||||
RightSideSelectionViewModel.SelectedPropertyViewModel.PropertyPath
|
||||
RightSideSelectionViewModel.SelectedPropertyViewModel.Path
|
||||
);
|
||||
}
|
||||
else if (DataModelConditionListPredicate.PredicateType == ListRightSideType.DynamicList)
|
||||
{
|
||||
DataModelConditionListPredicate.UpdateRightSideDynamic(RightSideSelectionViewModel.SelectedPropertyViewModel.PropertyPath);
|
||||
DataModelConditionListPredicate.UpdateRightSideDynamic(RightSideSelectionViewModel.SelectedPropertyViewModel.Path);
|
||||
}
|
||||
|
||||
_profileEditorService.UpdateSelectedProfileElement();
|
||||
|
||||
@@ -97,7 +97,7 @@ namespace Artemis.UI.Screens.ProfileEditor.Conditions
|
||||
{
|
||||
DataModelConditionList.UpdateList(
|
||||
TargetSelectionViewModel.SelectedPropertyViewModel.DataModel,
|
||||
TargetSelectionViewModel.SelectedPropertyViewModel.PropertyPath
|
||||
TargetSelectionViewModel.SelectedPropertyViewModel.Path
|
||||
);
|
||||
_profileEditorService.UpdateSelectedProfileElement();
|
||||
|
||||
|
||||
+4
-4
@@ -120,7 +120,7 @@ namespace Artemis.UI.Screens.ProfileEditor.Conditions
|
||||
DataModelConditionPredicate.LeftDataModel,
|
||||
DataModelConditionPredicate.LeftPropertyPath
|
||||
);
|
||||
var leftSideType = LeftSideSelectionViewModel.SelectedPropertyViewModel?.PropertyInfo?.PropertyType;
|
||||
var leftSideType = LeftSideSelectionViewModel.SelectedPropertyViewModel?.DataModelPath?.GetPropertyType();
|
||||
|
||||
// Get the supported operators
|
||||
Operators.Clear();
|
||||
@@ -135,7 +135,7 @@ namespace Artemis.UI.Screens.ProfileEditor.Conditions
|
||||
}
|
||||
|
||||
// Ensure the right side has the proper VM
|
||||
var targetType = LeftSideSelectionViewModel?.SelectedPropertyViewModel?.PropertyInfo?.PropertyType;
|
||||
var targetType = LeftSideSelectionViewModel?.SelectedPropertyViewModel?.DataModelPath?.GetPropertyType();
|
||||
if (DataModelConditionPredicate.PredicateType == ProfileRightSideType.Dynamic && SelectedOperator.SupportsRightSide)
|
||||
{
|
||||
DisposeRightSideStatic();
|
||||
@@ -172,7 +172,7 @@ namespace Artemis.UI.Screens.ProfileEditor.Conditions
|
||||
{
|
||||
DataModelConditionPredicate.UpdateLeftSide(
|
||||
LeftSideSelectionViewModel.SelectedPropertyViewModel.DataModel,
|
||||
LeftSideSelectionViewModel.SelectedPropertyViewModel.PropertyPath
|
||||
LeftSideSelectionViewModel.SelectedPropertyViewModel.Path
|
||||
);
|
||||
_profileEditorService.UpdateSelectedProfileElement();
|
||||
|
||||
@@ -184,7 +184,7 @@ namespace Artemis.UI.Screens.ProfileEditor.Conditions
|
||||
{
|
||||
DataModelConditionPredicate.UpdateRightSide(
|
||||
RightSideSelectionViewModel.SelectedPropertyViewModel.DataModel,
|
||||
RightSideSelectionViewModel.SelectedPropertyViewModel.PropertyPath
|
||||
RightSideSelectionViewModel.SelectedPropertyViewModel.Path
|
||||
);
|
||||
_profileEditorService.UpdateSelectedProfileElement();
|
||||
|
||||
|
||||
+1
-1
@@ -104,7 +104,7 @@ namespace Artemis.UI.Screens.ProfileEditor.LayerProperties.DataBindings.DirectDa
|
||||
|
||||
private void ParameterSelectionViewModelOnPropertySelected(object sender, DataModelInputDynamicEventArgs e)
|
||||
{
|
||||
Modifier.UpdateParameter(e.DataModelVisualizationViewModel.DataModel, e.DataModelVisualizationViewModel.PropertyPath);
|
||||
Modifier.UpdateParameter(e.DataModelVisualizationViewModel.DataModel, e.DataModelVisualizationViewModel.Path);
|
||||
_profileEditorService.UpdateSelectedProfileElement();
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -111,7 +111,7 @@ namespace Artemis.UI.Screens.ProfileEditor.LayerProperties.DataBindings.DirectDa
|
||||
|
||||
private void TargetSelectionViewModelOnPropertySelected(object sender, DataModelInputDynamicEventArgs e)
|
||||
{
|
||||
DirectDataBinding.UpdateSource(e.DataModelVisualizationViewModel.DataModel, e.DataModelVisualizationViewModel.PropertyPath);
|
||||
DirectDataBinding.UpdateSource(e.DataModelVisualizationViewModel.DataModel, e.DataModelVisualizationViewModel.Path);
|
||||
Update();
|
||||
|
||||
_profileEditorService.UpdateSelectedProfileElement();
|
||||
|
||||
Reference in new issue
Block a user