internal void scrollToCard(int p) { if (!this.EnabledVertical) { return; } BaseCheckRepoatView preView = null; int scrollValue = this.vScroll.Value; int maxValue = this.vScroll.MaxValue; foreach (BaseCheckRepoatView view in panelItemList) { try { if (view.getKey() == p) { scrollValue = ((int)vDic[view.getKey()]) * this.vScroll.MaxValue / this.Bounds.Height; this.vScroll.Value = scrollValue; this.vScroll.Invalidate(); } preView = view; } catch (Exception ex) { this.ShowInfo(ex.Message); } } }
private void ReLocation() { if (panelItemList == null) { return; } BaseCheckRepoatView preView = null; foreach (BaseCheckRepoatView view in panelItemList) { if (preView != null) { view.Location = new Point(preView.Location.X, preView.Location.Y + preView.Height + 15); } preView = view; vDic.Add(view.getKey(), view.Location.Y); } this.Invalidate(); }