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); }
public override bool Move(ListMove move, int itemIndex) { var moved = base.Move(move, itemIndex); GenDataBase.Changed |= moved; return(moved); }
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); }
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); }
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)); }
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"); } }
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); }
/// <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)); }
/// <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); }