static void Binder() { LDControls.ListBoxContent(XListBox, XColumns.ToPrimitiveArray()); LDControls.ListBoxContent(SchemaListBox, Schema.ToPrimitiveArray()); LDControls.ListBoxContent(YListBox, YColumns.ToPrimitiveArray()); List <string> Columns = new List <string>(); Columns.AddRange(XColumns); Columns.AddRange(YColumns); Shapes.SetText(Inequality, $"{chart.MinColumns}≤{Columns.Count}≤{chart.MaxColumns}"); for (int i = 1; i <= LDControls.DataViewRowCount(DataView); i++) { string CurrentColumn = LDControls.DataViewGetValue(DataView, i, 1); if (Columns.Contains(CurrentColumn) == false) { LDControls.DataViewDeleteRow(DataView, i); } else { Columns.Remove(CurrentColumn); } } for (int i = 0; i < Columns.Count; i++) { LDControls.DataViewSetRow(DataView, LDControls.DataViewRowCount(DataView) + 1, string.Format("1={0};2=Text;", Columns[i])); } }