/// <summary> /// Selects the columns. /// </summary> /// <param name="columns">The columns.</param> public void SelectColumns(params string[] columns) { foreach (var column in columns) { SelectedColumns.Add(column); } }
/// <summary> /// Add column to "selected" list (and remove from "available" list) /// </summary> /// <param name="column"></param> private void AddColumn(GuiGridColumn column) { SelectedColumns.Add(column); AvailableColumns.Remove(column); SelectedSelectedColumn = column; SelectedAvailableColumn = null; }
/// <summary> /// Move selected values form 'Columns' list box to 'Selected Columns' list box /// </summary> private void MoveFromColumnsToSelectedColumnsAction() { for (int i = 0; i < _selectedInColumns.Count;) { SelectedColumns.Add(_selectedInColumns.ElementAt(i)); Columns.Remove(_selectedInColumns.ElementAt(i)); } }
/// <summary> /// Move all values from 'Columns' list box to 'Selected Columns' list box /// </summary> private void MoveAllFromColumnsToSelectedColumnsAction() { for (int i = 0; i < Columns.Count;) { SelectedColumns.Add(Columns.ElementAt(i)); Columns.RemoveAt(i); } }
/// <inheritdoc /> public ISelectStringBuilder AddSelect(params string[] columnNames) { foreach (var column in columnNames) { SelectedColumns.Add(column); } return(this); }
public void Add() { var selected = AvailableColumns.Where(c => c.IsSelected).ToArray(); foreach (var item in selected) { AvailableColumns.Remove(item); item.IsSelected = false; SelectedColumns.Add(item); } }
public void Reset() { while (SelectedColumns.Count > 0) { AvailableColumns.Add(SelectedColumns[0]); SelectedColumns.RemoveAt(0); } foreach (var column in DefaultColumns) { AvailableColumns.Remove(column); SelectedColumns.Add(column); } }
/// <summary> /// Selects the column. /// </summary> /// <param name="column">The column.</param> public void SelectColumn(string column) { SelectedColumns.Clear(); SelectedColumns.Add(column); }
/// <summary> /// Adds a single SelectColumn to the list of output columns /// from the command. /// </summary> /// <param name="col"></param> /// <remarks> /// Note that at this point the the information in the given /// SelectColumn may not be completely qualified. /// </remarks> public void SelectSingleColumn(SelectColumn col) { SelectedColumns.Add(col); }