mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 19:36:28 +00:00
Conditions - Finished migration to new API
Conditions UI - Updated for new API, needs simplifying before I'm happy with it
This commit is contained in:
1 parent
725bb2a128
commit
805cdc6782
10 files changed
+91
-75
No files matched your search
+11
-15
@@ -117,10 +117,12 @@ namespace Artemis.UI.Screens.ProfileEditor.Conditions
|
||||
|
||||
if (!_isPrimitiveList)
|
||||
{
|
||||
LeftSideSelectionViewModel.FilterTypes = _supportedInputTypes.ToArray();
|
||||
// Lists use a different color
|
||||
LeftSideSelectionViewModel.ButtonBrush = new SolidColorBrush(Color.FromRgb(71, 108, 188));
|
||||
LeftSideSelectionViewModel.SelectedPropertyViewModel = LeftSideSelectionViewModel.DataModelViewModel.GetChildByPath(
|
||||
listDataModelGuid.Value, DataModelConditionListPredicate.DataModelConditionList.ListPath.Path
|
||||
LeftSideSelectionViewModel.FilterTypes = _supportedInputTypes.ToArray();
|
||||
LeftSideSelectionViewModel.PopulateSelectedPropertyViewModel(
|
||||
DataModelConditionListPredicate.LeftPath?.Target,
|
||||
DataModelConditionListPredicate.LeftPath?.Path
|
||||
);
|
||||
}
|
||||
|
||||
@@ -141,9 +143,8 @@ namespace Artemis.UI.Screens.ProfileEditor.Conditions
|
||||
}
|
||||
|
||||
// Ensure the right side has the proper VM
|
||||
if ((DataModelConditionListPredicate.PredicateType == ListRightSideType.Dynamic ||
|
||||
DataModelConditionListPredicate.PredicateType == ListRightSideType.DynamicList) &&
|
||||
SelectedOperator.SupportsRightSide)
|
||||
ListRightSideType type = DataModelConditionListPredicate.PredicateType;
|
||||
if ((type == ListRightSideType.Dynamic || type == ListRightSideType.DynamicList) && SelectedOperator.SupportsRightSide)
|
||||
{
|
||||
DisposeRightSideStatic();
|
||||
if (RightSideSelectionViewModel == null)
|
||||
@@ -157,15 +158,10 @@ namespace Artemis.UI.Screens.ProfileEditor.Conditions
|
||||
}
|
||||
|
||||
RightSideSelectionViewModel.FilterTypes = new[] {leftSideType};
|
||||
if (DataModelConditionListPredicate.PredicateType == ListRightSideType.Dynamic)
|
||||
RightSideSelectionViewModel.PopulateSelectedPropertyViewModel(
|
||||
DataModelConditionListPredicate.RightPath?.Target,
|
||||
DataModelConditionListPredicate.RightPath?.Path
|
||||
);
|
||||
else
|
||||
RightSideSelectionViewModel.SelectedPropertyViewModel = RightSideSelectionViewModel.DataModelViewModel.GetChildByPath(
|
||||
listDataModelGuid.Value, DataModelConditionListPredicate.RightPath?.Path
|
||||
);
|
||||
RightSideSelectionViewModel.PopulateSelectedPropertyViewModel(
|
||||
DataModelConditionListPredicate.RightPath?.Target,
|
||||
DataModelConditionListPredicate.RightPath?.Path
|
||||
);
|
||||
}
|
||||
else if (SelectedOperator.SupportsRightSide)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user