/// <summary> /// Updates the content. /// </summary> private void UpdateContent() { clbColumns.Items.Clear(); foreach (int key in AllKeys) { IColumnSettings column = m_columns.First(x => x.Key == key); clbColumns.Items.Add(GetHeader(key), column.Visible); } }
/// <summary> /// When a checkbox state changed, we update the controls list. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void clbColumns_ItemCheck(object sender, ItemCheckEventArgs e) { bool isChecked = e.NewValue == CheckState.Checked; // Gets the key of the modified column string header = (string)clbColumns.Items[e.Index]; int key = AllKeys.First(x => GetHeader(x) == header); // Gets the column for this key IColumnSettings column = m_columns.First(x => x.Key == key); column.Visible = isChecked; }
/// <summary>Static getter for Items Per Row</summary> public static object GetItemsPerRow(IColumnSettings that) { return(that.GetPropertyValue("itemsPerRow")); }