Ejemplo n.º 1
0
        /// <summary>
        /// Adds all the "user"/"group" objects to the tree
        /// </summary>
        /// <param name="container"></param>
        /// <param name="parentPage"></param>
        /// <param name="plugin"></param>
        /// <param name="PageType"></param>
        public AddUsertoGroup(IPlugInContainer container, MPPage parentPage, ADUCPlugin plugin, int PageType)
            : this()
        {
            this.IPlugInContainer = container;
            _addplugin            = plugin;
            _aducRootnode         = _addplugin.GetPlugInNode();
            _PageType             = PageType;

            if (_aducRootnode.Nodes.Count > 0)
            {
                ADUCDirectoryNode rootNode =
                    ADUCDirectoryNode.GetDirectoryRoot(_addplugin.GetpluginContext(),
                                                       _addplugin.GetRootDN(),
                                                       Resources.ADUC, typeof(ADUCPage), _addplugin);

                if (rootNode != null)
                {
                    treeView1.Nodes.Add(rootNode);
                    rootNode.Refresh();
                    treeView1.ExpandAll();
                }
            }
            else
            {
                Logger.Log("The LWTreeView control does not have any nodes.");
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Adds all the "user"/"group" objects to the tree
 /// </summary>
 /// <param name="container"></param>
 /// <param name="parentPage"></param>
 /// <param name="plugin"></param>
 /// <param name="PageType"></param>
 public AddUsertoGroup(IPlugInContainer container, MPPage parentPage, ADUCPlugin plugin, int PageType)
 : this()
 {
     this.IPlugInContainer = container;
     _addplugin = plugin;
     _aducRootnode = _addplugin.GetPlugInNode();
     _PageType = PageType;
     
     if (_aducRootnode.Nodes.Count > 0)
     {
         ADUCDirectoryNode rootNode =
         ADUCDirectoryNode.GetDirectoryRoot(_addplugin.GetpluginContext(),            
         _addplugin.GetRootDN(),
         Resources.ADUC, typeof (ADUCPage), _addplugin);
         
         if (rootNode != null)
         {
             treeView1.Nodes.Add(rootNode);
             rootNode.Refresh();
             treeView1.ExpandAll();
         }
     }
     else
     {
         Logger.Log("The LWTreeView control does not have any nodes.");
     }
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Override constructor gets the Plugin node and all its childs
        /// Adds the all nodes to the treeview
        /// </summary>
        /// <param name="container"></param>
        /// <param name="parentPage"></param>
        /// <param name="plugin"></param>
        /// <param name="origTreeview"></param>
        public ADMoveObjectPage(IPlugInContainer container, StandardPage parentPage, ADUCPlugin plugin, LWTreeView origTreeview)
            : this()
        {
            this.IPlugInContainer = container;
            _addplugin            = plugin;

            _origLWTreeView = origTreeview;

            _aducRootnode = _addplugin.GetPlugInNode();

            if (_aducRootnode.Nodes.Count > 0)
            {
                /*TreeNode[] newTreeArray = new TreeNode[_aducRootnode.Nodes.Count];
                 * // Iterate through the root nodes in the Nodes property.
                 * _aducRootnode.Nodes.CopyTo(newTreeArray, 0);
                 * foreach (TreeNode node in newTreeArray)
                 * {
                 *  LACTreeNode lacnode = node as LACTreeNode;
                 *  //   treeView1.Nodes.Add(lacnode.DeepCopy() as TreeNode);
                 * }*/
                ADUCDirectoryNode rootNode =
                    ADUCDirectoryNode.GetDirectoryRoot(_addplugin.GetpluginContext(),
                                                       _addplugin.GetRootDN(),
                                                       Resources.ADUC, typeof(ADUCPage), _addplugin);

                if (rootNode != null)
                {
                    treeView1.Nodes.Add(rootNode);
                    ADUCDirectoryNode[] childNodes = rootNode.ListContainerChildren(rootNode);
                    if (childNodes != null)
                    {
                        rootNode.Nodes.AddRange(childNodes);
                    }
                    treeView1.ExpandAll();
                }
            }
            else
            {
                Logger.Log("The LWTreeView control does not have any nodes.");
            }
        }
Ejemplo n.º 4
0
    /// <summary>
    /// Override constructor gets the Plugin node and all its childs
    /// Adds the all nodes to the treeview
    /// </summary>
    /// <param name="container"></param>
    /// <param name="parentPage"></param>
    /// <param name="plugin"></param>
    /// <param name="origTreeview"></param>
    public ADMoveObjectPage(IPlugInContainer container, StandardPage parentPage, ADUCPlugin plugin, LWTreeView origTreeview)
    : this()
    {
        this.IPlugInContainer = container;
        _addplugin = plugin;
        
        _origLWTreeView = origTreeview;
        
        _aducRootnode = _addplugin.GetPlugInNode();
        
        if (_aducRootnode.Nodes.Count > 0)
        {
                /*TreeNode[] newTreeArray = new TreeNode[_aducRootnode.Nodes.Count];
                // Iterate through the root nodes in the Nodes property.
                _aducRootnode.Nodes.CopyTo(newTreeArray, 0);
                foreach (TreeNode node in newTreeArray)
                {
                    LACTreeNode lacnode = node as LACTreeNode;
                    //   treeView1.Nodes.Add(lacnode.DeepCopy() as TreeNode);
                }*/
            ADUCDirectoryNode rootNode =
            ADUCDirectoryNode.GetDirectoryRoot(_addplugin.GetpluginContext(),          
            _addplugin.GetRootDN(),
            Resources.ADUC, typeof (ADUCPage), _addplugin);

            if (rootNode != null)
            {
                treeView1.Nodes.Add(rootNode);
                ADUCDirectoryNode[] childNodes = rootNode.ListContainerChildren(rootNode);
                if (childNodes != null)
                    rootNode.Nodes.AddRange(childNodes);
                treeView1.ExpandAll();
            }
        }
        else
        {
            Logger.Log("The LWTreeView control does not have any nodes.");
        }
    }