示例#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);
 }