internal void SetParameters(List <IParameter> parameters) { this.pnlParameters.Controls.Clear(); foreach (var parameter in parameters) { var up = new UcParameter(); up.Parameter = parameter; up.Dock = DockStyle.Top; up.GotFocus += Up_GotFocus; this.pnlParameters.Controls.Add(up); } }
private void Up_GotFocus(object sender, EventArgs e) { if (sender is UcParameter up) { if (up != last) { last?.LostUserFocus(); last = up; up.GetUserFocus(); current = up; } } }