예제 #1
0
        ////////////////////////////////////////////////////////////////////////

        #region Remove

        public bool RemoveColumn(string _name)
        {
            ITableColumn _column = GetColumn(_name);

            if (_column != null)
            {
                OnColumnRemoved?.Invoke(null, new TableArgs(_column));
                columns.RemoveAt(_column.Index);

                #if UNITY_EDITOR
                string _msg = string.Format("Removed column with name: {0}", _name);
                OnLogUpdate?.Invoke(null, new LogArgs(_msg, true));
                #endif

                return(true);
            }

            #if UNITY_EDITOR
            string _message = string.Format("Column with name: {0} doesn't exist!", _name);
            Debug.LogError(_message);
            OnLogUpdate?.Invoke(null, new LogArgs(_message, false));
            #endif

            ReIndexColumns();

            return(false);
        }
예제 #2
0
        public void RemoveColumn(ITableColumn _column)
        {
            if (_column.Index >= columns.Count || _column.Index < 0)
            {
                #if UNITY_EDITOR
                string _message = string.Format("Can't remove column. Index: {0} is out of bounds!", _column);
                Debug.LogError(_message);
                OnLogUpdate?.Invoke(null, new LogArgs(_message, false));
                #endif

                return;
            }

            columns.RemoveAt(_column.Index);
            OnColumnRemoved?.Invoke(null, new TableArgs(_column));

            #if UNITY_EDITOR
            string _msg = string.Format("Removed column with name: {0}, index: {1}", _column.ColumnName, _column.Index);
            OnLogUpdate?.Invoke(null, new LogArgs(_msg, true));
            #endif

            ReIndexColumns();
        }
예제 #3
0
 public new void RemoveAt(int index)
 {
     List.RemoveAt(index);
     OnColumnRemoved?.Invoke(this, EventArgs.Empty);
 }
예제 #4
0
 public void Remove(RichTreeViewColumn item)
 {
     List.Remove(item);
     OnColumnRemoved?.Invoke(this, EventArgs.Empty);
 }