Пример #1
0
 public void RemoveColumn(string columnName)
 {
     if (Visible.Contains(columnName))
     {
         Visible.Remove(columnName);
         ColumnRemoved?.Invoke(this, columnName);
     }
 }
Пример #2
0
        public void RemoveColumn(ChatColumn column)
        {
            var index = columns.FindIndex(x => x == column);

            if (index == -1)
            {
                throw new ArgumentException("\"widget\" is not a widget in this column.");
            }

            columns.RemoveAt(index);

            ColumnRemoved?.Invoke(this, new ValueEventArgs <ChatColumn>(column));
        }
Пример #3
0
        public void RemoveColumn(Column column)
        {
            if (!RootRow.RowValues.ContainsKey(column))
            {
                throw new InvalidOperationException("Column not added to outline.");
            }

            var removedValues = new Dictionary <Row, object>();

            foreach (var row in EachRow.Concat(new[] { RootRow }))
            {
                removedValues.Add(row, row[column]);
                row.RowValues.Remove(column);
            }
            ColumnRemoved?.Invoke(this, new ColumnRemovedEventArgs(column, removedValues));
        }
Пример #4
0
 private void btnRemoveColumn_Click(object sender, EventArgs e)
 {
     ColumnRemoved?.Invoke(this, null);
 }