Exemple #1
0
        protected override void MoveRow(GraphElement selectedElement, SortableExpandableRow insertTargetElement, bool insertAtEnd)
        {
            if (!(selectedElement is ComponentRow componentRow) || !(insertTargetElement is ComponentRow insertComponentRowElement))
            {
                m_ParentElement.SetDragIndicatorVisible(false);
                return;
            }

            var targetComponent = insertComponentRowElement.Component;

            if (targetComponent == null)
            {
                return;
            }

            var component = componentRow.Component;

            if (component == targetComponent)
            {
                return;
            }

            Assert.That(GraphElementModel is ComponentQueryDeclarationModel);
            Store.Dispatch(new MoveComponentInQueryAction((ComponentQueryDeclarationModel)GraphElementModel, component, targetComponent, insertAtEnd));
        }
        public override void DuplicateRow(GraphElement selectedElement, SortableExpandableRow insertTargetElement, bool insertAtEnd)
        {
            var insertCriteriaModelRow   = insertTargetElement as CriteriaModelRow;
            var insertCriteriaSubSection = insertTargetElement as CriteriaSubSection;

            if (!(selectedElement is CriteriaModelRow criteriaModelRow) || insertCriteriaModelRow == null && insertCriteriaSubSection == null)
            {
                m_ParentElement.SetDragIndicatorVisible(false);
                return;
            }

            if (insertCriteriaModelRow != null)
            {
                var targetCriteriaModel = insertCriteriaModelRow.CriteriaModel;
                if (targetCriteriaModel == null)
                {
                    return;
                }

                Store.Dispatch(new DuplicateCriteriaModelAction((ICriteriaModelContainer)criteriaModelRow.GraphElementModel,
                                                                criteriaModelRow.CriteriaModel,
                                                                (ICriteriaModelContainer)insertCriteriaModelRow.GraphElementModel,
                                                                targetCriteriaModel,
                                                                insertAtEnd));
                return;
            }

            var criteriaModel = criteriaModelRow.CriteriaModel;

            Store.Dispatch(new DuplicateCriteriaModelAction((ICriteriaModelContainer)criteriaModelRow.GraphElementModel,
                                                            criteriaModel,
                                                            (ICriteriaModelContainer)insertCriteriaSubSection.GraphElementModel,
                                                            targetCriteriaModel: null,
                                                            insertAtEnd: true));
        }
Exemple #3
0
        protected override void MoveRow(GraphElement selectedElement, SortableExpandableRow insertTargetElement, bool insertAtEnd)
        {
            if (!(selectedElement is CriterionRow criterionRow) || !(insertTargetElement is CriterionRow insertCriterionRow))
            {
                m_ParentElement.SetDragIndicatorVisible(false);
                return;
            }

            var targetCriterion = insertCriterionRow.Criterion;

            if (targetCriterion == null)
            {
                return;
            }

            if (criterionRow.Criterion == targetCriterion)
            {
                return;
            }

            Store.Dispatch(new MoveCriterionAction((ICriteriaModelContainer)GraphElementModel, criterionRow.CriteriaModel, criterionRow.Criterion, targetCriterion, insertAtEnd));
        }
 protected override void MoveRow(GraphElement selectedElement, SortableExpandableRow insertTargetElement, bool insertAtEnd)
 {
 }
 public override void DuplicateRow(GraphElement selectedElement, SortableExpandableRow insertTargetElement, bool insertAtEnd)
 {
 }
Exemple #6
0
 public override void DuplicateRow(GraphElement selectedElement, SortableExpandableRow insertTargetElement, bool insertAtEnd)
 {
     throw new NotImplementedException("This row cannot be duplicated");
 }
Exemple #7
0
 protected override void MoveRow(GraphElement selectedElement, SortableExpandableRow insertTargetElement, bool insertAtEnd)
 {
     throw new NotImplementedException("This row cannot be moved");
 }