RevitLookup.Snoop.Forms.Objects.CommonInit C# (CSharp) 메소드

CommonInit() 보호된 메소드

protected CommonInit ( IEnumerable objs ) : void
objs IEnumerable
리턴 void
        protected void CommonInit( IEnumerable objs )
        {
            m_tvObjs.BeginUpdate();

              AddObjectsToTree( objs );

              // if the tree isn't well populated, expand it and select the first item
              // so its not a pain for the user when there is only one relevant item in the tree
              if( m_tvObjs.Nodes.Count == 1 )
              {
            m_tvObjs.Nodes[0].Expand();
            if( m_tvObjs.Nodes[0].Nodes.Count == 0 )
              m_tvObjs.SelectedNode = m_tvObjs.Nodes[0];
            else
              m_tvObjs.SelectedNode = m_tvObjs.Nodes[0].Nodes[0];
              }

              m_tvObjs.EndUpdate();
        }