private ComicsItem Move(ComicsParentId id) { ComicsItem current = GetCurrntItem(); ComicsItem side = null; switch (id) { case ComicsParentId.LeftComics: _leftStack.Push(current); side = _rightStack.Pop(); break; case ComicsParentId.RightComics: _rightStack.Push(current); side = _leftStack.Pop(); break; } current.Move(_parentDic[id]); side.Move(_parentDic[ComicsParentId.CurrentComics]); return(side); }
private ComicsItem moveStack(ComicsParentId id) { ComicsItem currentItem = getCurrentItem(); ComicsItem returnItem = null; switch (id) { case ComicsParentId.LeftComics: _leftStack.Push(currentItem); returnItem = _rightStack.Pop(); break; case ComicsParentId.RightComics: _rightStack.Push(currentItem); returnItem = _leftStack.Pop(); break; } currentItem.moveToParent(_parentDic[id]); returnItem.moveToParent(_parentDic[ComicsParentId.CurrentComics]); return(returnItem); }