private void LoadUcNet() { ADSLItem adsl = new ADSLItem(); adsl.EntryName = PwdSetConfig.Instance.ADSLName; adsl.Password = PwdSetConfig.Instance.ADSLPwd; adsl.User = PwdSetConfig.Instance.ADSLUser; ucAdsl = new UcAdsl(adsl, WowLogManager.Instance); ucAdsl.TestChanged += ucNetwork_TestChanged; RouterItem router = new RouterItem(); router.RouterType = PwdSetConfig.Instance.RouterType; router.IP = PwdSetConfig.Instance.RouterIP; router.Password = PwdSetConfig.Instance.RouterPwd; router.User = PwdSetConfig.Instance.RouterUser; ucRouter = new UcRouter(router, WowLogManager.Instance); ucRouter.TestChanged += ucNetwork_TestChanged; VPNFile vpn = new VPNFile(); vpn.EntryName = PwdSetConfig.Instance.VpnEntryName; vpn.File = PwdSetConfig.Instance.VpnFile; ucVpnList = new UcVpnList(vpn, WowLogManager.Instance); ucVpnList.TestChanged += ucNetwork_TestChanged; VPNItem vpnItem = new VPNItem(); vpnItem.EntryName = WowSetConfig.Instance.VpnEntryName; vpnItem.IP = WowSetConfig.Instance.VpnIP; vpnItem.User = WowSetConfig.Instance.VpnUser; vpnItem.Password = WowSetConfig.Instance.VpnPwd; ucVpn = new UcVpnItem(vpnItem, WowLogManager.Instance); ucVpn.TestChanged += ucNetwork_TestChanged; }
void Form1_Load(object sender, EventArgs e) { ADSLItem adsl = new ADSLItem(); adsl.EntryName = WowSetConfig.Instance.ADSLName; adsl.Password = WowSetConfig.Instance.ADSLPwd; adsl.User = WowSetConfig.Instance.ADSLUser; ucAdsl = new UcAdsl(adsl, WowLogManager.Instance); ucAdsl.TestChanged += ucNetwork_TestChanged; panel1.Controls.Add(ucAdsl); WowLogManager.Instance.LogEvent += LogManager_LogEvent; }