예제 #1
0
        static public void RemoveConnectionEntry(BaseProxyServer ps)
        {
            string       name             = ps.GetConnectionName();
            RasPhoneBook rasPhoneBook1    = new RasPhoneBook();
            string       rasPhoneBookPath = null;

            rasPhoneBookPath = RasPhoneBook.GetPhoneBookPath(RasPhoneBookType.User);
            rasPhoneBook1.Open(rasPhoneBookPath);
            RasEntry entryFound = null;

            foreach (RasEntry entry1 in rasPhoneBook1.Entries)
            {
                if (entry1.Name.Equals(name))
                {
                    entryFound = entry1;
                    break;
                }
            }
            if (entryFound != null)
            {
                entryFound.Remove();
            }
        }