public void BringToFrontView(int uid) { foreach (Object view in ViewList) { if (view is ViewBox) { ViewBox viewType = (ViewBox)view; if (viewType.Uid == uid) { viewType.BringToFront(); break; } } if (view is ViewCupboard) { ViewCupboard viewType = (ViewCupboard)view; if (viewType.Uid == uid) { viewType.RefreshView(); viewType.Show(); viewType.BringToFront(); break; } } } }
public void AddViewBox(int uidCupboard, int uid, Box box) { ViewBox viewBox = new ViewBox(uidCupboard, uid, box, this); viewBox.Dock = DockStyle.Fill; ViewList.Add(viewBox); viewBox.BringToFront(); }