Ejemplo n.º 1
0
        public void OneClick()
        {
            setStatus("Set default DNS to google's DNS...");
            HightLevelNetworkControll.setGoogleDNS();

            setStatus("Getting hosts file data...");
            string WriteData = HostFile.ReadDataWithoughtanstring("facebook") + Environment.NewLine;

            setStatus("Resolving IP Address...");
            WriteData += HightLevelNetworkControll.ResolvedData();

            setStatus("Restoring default DNS...");
            HightLevelNetworkControll.RestoreDNS();

            setStatus("Writing data to hosts file...");
            HostFile.WriteHostData(WriteData);
        }