Example #1
0
        public MainWnd()
        {
            InitializeComponent();
            this.WriteOut("初始化...");

            try
            {
                UIListener globalOut = new MainUIOutListener(this);
                dnsLoader     = new DnsConfigLoader(globalOut);
                dnsController = new DnsController(dnsLoader);
            }catch (Exception e)
            {
                this.WriteOut(e.Message);
            }
        }
Example #2
0
        protected bool UpdateDnsSystem(DnsConfigLoader dnsInfo)
        {
            List <DnsConfigLoader.DnsItem> LDns = dnsInfo.GetDnsList();

            {
                //Log.Logger.Instance.WriteLog("no dns driver object:MicrosoftDNS !");
                UpdateRecordsToCacheFile(LDns);
                uint verifyCode = VerifyCode.MakeFileVerifyCode(strSysHosts);
                if (verifyCode == 0)
                {
                    dnsloader.uiListener.WriteOut("Make host file verycode==0!");
                }
                else
                {
                    VerifyCode.WriteFileVerifyCode(verifyCode, "hostsverifycode");
                }
            }

            return(true);
        }
Example #3
0
 public DnsController(DnsConfigLoader dnsloader)
 {
     this.dnsloader = dnsloader;
 }