private void _nav_MoveNavigator(object sender, EvA_MoveNavigator e) { PicItem pic = mIC.pCurrentItem as PicItem; if (pic != null) { pic.pImage = pImage; pic.pText = _txt.Text; pic.pState = _curState; } switch (e.pDirection) { case eDirection.First: mIC.GoFirst(); break; case eDirection.Last: mIC.GoLast(); break; case eDirection.Next: mIC.GoNext(); break; case eDirection.Prev: mIC.GoPrev(); break; case eDirection.Position: mIC.pCurrentIndex = e.pPosition - 1; break; } pic = mIC.pCurrentItem as PicItem; if (pic != null) { pImage = pic.pImage; _txt.Text = pic.pText; _curState = pic.pState; pStatusBarText = ImageTools.ImageInformation(pImage); } if (CollectionCurrentItemChange != null) CollectionCurrentItemChange(this, new EventArgs()); }
private void DoMoveNavigator(object sender, EvA_MoveNavigator e) { _dgr.CurrentRowIndex = _mn.pPosition - 1; switch (e.pDirection) { case eDirection.First: _dgr.CurrentRowIndex = 0; break; case eDirection.Prev: if (_dgr.CurrentRowIndex > 0) _dgr.CurrentRowIndex--; break; case eDirection.Next: if (_dgr.CurrentRowIndex < _dt.Rows.Count-1) _dgr.CurrentRowIndex ++; break; case eDirection.Last: _dgr.CurrentRowIndex = _dt.Rows.Count-1; break; case eDirection.Position: break; } }