Esempio n. 1
0
 /// <summary>
 /// Basic Constructor, initializes this node to start at the root of the first drive found on the disk. ONLY USE THIS FOR ROOT NODES
 /// </summary>
 public ConxNode(ConxGroupNode Dad, ConnectionInfo Conx)
 {
     parent = Dad;
     szDisplayName = Conx.Name;
     ThisConx = Conx;
 }
Esempio n. 2
0
        /// <summary>
        /// Updates the contents of this node.
        /// </summary>
        public void UpdateNode()
        {
            try
            {
                //if we have not allocated our children yet
                //get sub-folders for this folder
                List<ConnectionGroup> Groups = Globals.GetConnections(MainForm.ConDataFileName);

                if (children != null)
                {
                    for (int i = 0; i < this.children.Length; i++)
                        this.children.SetValue(null, i);

                    this.children = null;
                }

                if(Groups == null)
                {
                    return;
                }
                else
                    children = new ConxGroupNode[Groups.Count];

                for (int i = 0; i < Groups.Count; i++)
                {
                    children[i] = new ConxGroupNode(this, Groups[i]);
                }
            }
            catch (System.Exception ioex)
            {
                //write a message to stderr
                System.Console.Error.WriteLine(ioex.Message);
            }
        }