Tinkr2/4.2/AphelionCore/AphelionCommonControls/Controls/Treeview.cs
/// <summary>
/// Removes a node from a specific point in the array
/// </summary>
/// <param name="index"></param>
Removes a node from a specific point in the array
Removes a node from a specific point in the array
public void RemoveNodeAt(int index)
      {
         if (_nodes == null)
            return;
         if (_nodes.Length == 1)
            _nodes = null;
         else
         {
            var tmp = new TreeviewNode[_nodes.Length];
            int c = 0;
            for (int i = 0; i < _nodes.Length; i++)
            {
               if (i != index)
                  tmp[c++] = _nodes[i];
            }
            _nodes = tmp;
         }
         Invalidate();
      }
public void RemoveNodeAt ( int index ) { if ( _nodes == null ) return ; if ( _nodes . Length == 1 ) _nodes = null ; else { var tmp = new TreeviewNode [ _nodes . Length ] ; int c = 0 ; for ( int i = 0 ; i < _nodes . Length ; i ++ ) { if ( i != index ) tmp [ c ++ ] = _nodes [ i ] ; } _nodes = tmp ; } Invalidate ( ) ; }
Removes a node from a specific point in the array
Removes a node from a specific point in the array
index
int
None