Example #1
0
 private void HandleColumnAdded(ColumnAdded columnAdded)
 {
     _hubContext
     .Clients
     .Group(columnAdded.BoardId)
     .SendAsync(nameof(ColumnAdded), columnAdded.Column);
 }
Example #2
0
 public void AddColumn(string columnName)
 {
     if (!Visible.Contains(columnName))
     {
         Visible.Add(columnName);
         ColumnAdded?.Invoke(this, columnName);
     }
 }
Example #3
0
            /// <summary>
            /// Adds an item to the collection</summary>
            /// <param name="item">Column to add</param>
            public void Add(Column item)
            {
                var ea = new CancelColumnEventArgs(item);

                bool cancelled = ColumnAdding.RaiseCancellable(this, ea);

                if (cancelled)
                {
                    return;
                }

                m_columns.Add(item);

                ColumnAdded.Raise(this, new ColumnEventArgs(item));
            }
Example #4
0
        /// <summary>
        /// Adds a column to this outline, with optional data.
        /// Generally, row data will be provided when we are undoing an operation that deleted a column, and we
        /// want to restore all of the old data before we notify listeners about the restored column.
        /// </summary>
        /// <param name="column"></param>
        /// <param name="rowValues"></param>
        public void AddColumn(Column column, IDictionary <Row, object> rowValues = null)
        {
            if (RootRow.RowValues.ContainsKey(column))
            {
                throw new InvalidOperationException("Column already added to outline.");
            }

            foreach (var row in EachRow.Concat(new[] { RootRow }))
            {
                row.RowValues.Add(column, column.DefaultValue);
                if (rowValues != null && rowValues.TryGetValue(row, out object value))
                {
                    row.RowValues[column] = value;
                }
            }
            ColumnAdded?.Invoke(this, new ColumnAddedEventArgs(column));
        }
Example #5
0
        public void InsertColumn(int index, ChatColumn column)
        {
            columns.Insert(index, column);

            ColumnAdded?.Invoke(this, new ValueEventArgs <ChatColumn>(column));
        }