public void AddSplit(Split split = null) { var controls = splitsPanel.Controls; var control = new SheepoSplitControl(this, controls.Count); if (split != null) { control.Refresh(split); } var y = controls.Count == 0 ? 0 : controls[controls.Count - 1].Bottom; control.Location = new Point(0, y); controls.Add(control); control.Up.Enabled = controls.Count > 1; RefreshSplitCount(); }
private void ToggleButtons(SheepoSplitControl split) { split.Up.Enabled = split.Index > 0; split.Down.Enabled = split.Index < splitsPanel.Controls.Count - 1; }