Ejemplo n.º 1
0
            public IEnumerator <string> GetEnumerator()
            {
                ShellItem folder          = new ShellItem((Environment.SpecialFolder)CSIDL.NETWORK);
                IEnumerator <ShellItem> e = folder.GetEnumerator(SHCONTF.FOLDERS);

                while (e.MoveNext())
                {
                    yield return(e.Current.ParsingName);
                }
            }
Ejemplo n.º 2
0
        /// <summary>
        /// Loads all the available Pervasive connections
        /// </summary>
        public PsqlServerContext()
        {
            //loads all computers on network as pervasive engine pcc.exe connects to computer name instead of ip
            ShellItem folder          = new ShellItem((Environment.SpecialFolder)CSIDL.NETWORK);
            IEnumerator <ShellItem> e = folder.GetEnumerator(SHCONTF.FOLDERS);

            ServerInstances = new List <IServerInstance>();
            while (e.MoveNext())
            {
                //TODO:add testing to see if valid pervasive engine is running on target network computer by trying to connect first
                ServerInstances.Add(new PsqlServerInstance(e.Current.DisplayName));
            }
        }
Ejemplo n.º 3
0
 IEnumerator<ShellItem> GetFolderEnumerator(ShellItem folder)
 {
     SHCONTF filter = SHCONTF.FOLDERS;
     if (ShouldShowHidden()) filter |= SHCONTF.INCLUDEHIDDEN;
     return folder.GetEnumerator(filter);
 }
Ejemplo n.º 4
0
        void CreateItems(ShellItem folder, int indent)
        {
            IEnumerator<ShellItem> e = folder.GetEnumerator(
                SHCONTF.FOLDERS | SHCONTF.INCLUDEHIDDEN);

            while (e.MoveNext())
            {
                if (ShouldCreateItem(e.Current))
                {
                    CreateItem(e.Current, indent);
                }
            }
        }