private void xdhelper(DisplayPanel p, bool b) { p.Size = ClientRectangle.Size; p.Visible = b; }
private void xdlambda(DisplayPanel p, bool b) { if (p.InvokeRequired) { p.Invoke(new Action(() => xdhelper(p, b))); } else { xdhelper(p, b); } }
public void transitionTo(DisplayPanel p) { if (activePanel != null) { xdlambda(activePanel, false); } activePanel = p; xdlambda(p, true); clearFocus(); Invalidate(); }