private void AddPropertiesForSelectedColumns() { if (_currentCslaObject == null) { return; } if (SelectedColumnsCount == 0) { MessageBox.Show(this, @"You must first select a column to add.", @"Warning"); return; } List <IColumnInfo> columns = new List <IColumnInfo>(); for (int i = 0; i < SelectedColumns.Count; i++) { columns.Add((IColumnInfo)dbColumns1.ListColumns.SelectedItems[i]); } IDataBaseObject dbObject = GetCurrentDBObject(); IResultSet resultSet = GetCurrentResultSet(); _currentFactory.AddProperties(_currentCslaObject, dbObject, resultSet, columns, true, false); }