예제 #1
0
 private static void MoveItem(Class c, ListMove move, int itemIndex, string order, bool changedExpected, string action)
 {
     c.GenObject.GenDataBase.Changed = false;
     c.SubClassList.Move(move, itemIndex);
     Assert.AreEqual(changedExpected, c.GenObject.GenDataBase.Changed, "Data changed flag");
     CheckOrder(c, order, action);
 }
예제 #2
0
        public override bool Move(ListMove move, int itemIndex)
        {
            var moved = base.Move(move, itemIndex);

            GenDataBase.Changed |= moved;
            return(moved);
        }
예제 #3
0
        protected static void MoveItem(GenDataBase d, ListMove move, int itemIndex, string order, string action)
        {
            var c  = GetFirstObject(d);
            var sc = c.GetSubClass("SubClass");

            sc.Move(move, itemIndex);
            CheckOrder(d, order, action);
        }
예제 #4
0
        private void MoveItem(ListMove move)
        {
            var myNode = DataNavigatorTreeView.SelectedNode as ClassTreeNode;

            if (myNode != null && myNode.MoveItem(move))
            {
                RaiseFocusChanged();
            }
        }
        public override bool Move(ListMove move, int itemIndex)
        {
            var moved = base.Move(move, itemIndex);

            if (moved)
            {
                PopulateNameDictionary();
            }
            return(moved);
        }
예제 #6
0
        public override bool Move(ListMove move, int itemIndex)
        {
            var item = this[itemIndex] as GenApplicationBase;

            if (item == null)
            {
                return(base.Move(move, itemIndex));
            }
            var genObject = item.GenObject as GenObject;

            if (genObject == null)
            {
                return(base.Move(move, itemIndex));
            }
            var genList = (GenSubClass)((GenObject)item.GenObject).ParentSubClass;

            genList.Move(move, itemIndex);

            return(base.Move(move, itemIndex));
        }
예제 #7
0
        public virtual bool Move(ListMove move, int itemIndex)
        {
            switch (move)
            {
            case ListMove.ToTop:
                return(MoveToTop(itemIndex));

            case ListMove.Up:
                return(MoveUp(itemIndex));

            case ListMove.Down:
                return(MoveDown(itemIndex));

            case ListMove.ToBottom:
                return(MoveToBottom(itemIndex));

            default:
                throw new ArgumentOutOfRangeException("move");
            }
        }
예제 #8
0
        internal bool MakeMove(ClassTreeNode node, ListMove move)
        {
            var nodeData = node.ViewModel;

            if (nodeData == null)
            {
                return(false);
            }
            var  index = Nodes.IndexOf(node);
            bool result;

            switch (move)
            {
            case ListMove.ToTop:
                result = MoveToTop(index, node);
                break;

            case ListMove.Up:
                result = MoveUp(index, node);
                break;

            case ListMove.Down:
                result = MoveDown(index, node);
                break;

            case ListMove.ToBottom:
                result = MoveToBottom(index, node);
                break;

            default:
                throw new ArgumentOutOfRangeException("move");
            }

            TreeView.SelectedNode = node;
            return(result);
        }
예제 #9
0
 /// <summary>
 /// Make the specified item move.
 /// </summary>
 /// <param name="move">The specified move.</param>
 public virtual bool MoveItem(ListMove move)
 {
     return(ParentNode.MakeMove(this, move));
 }
예제 #10
0
 /// <summary>
 /// Do nothing. Only Class nodes can be moved.
 /// </summary>
 /// <param name="move">The specified move.</param>
 public virtual bool MoveItem(ListMove move)
 {
     return(false);
 }