public void PreviousLayout() { if (controls == null) { return; } int prev = controls.IndexOf(currentControlLayout) - 1; if (prev < 0) { prev = controls.Count - 1; } currentControlLayout = controls[prev]; currentControlLayout.Select(); }
public void NextLayout() { if (controls == null) { return; } int next = controls.IndexOf(currentControlLayout) + 1; if (next >= controls.Count) { next = 0; } currentControlLayout = controls[next]; currentControlLayout.Select(); }