/// <summary> /// /// </summary> /// <param name="menuItem"></param> private void DoConnectionIPSetting(ToolStripMenuItem menuItem) { UncheckMenus(MenuKey.IPSETTING); MenuKey menukey = (MenuKey)menuItem.Tag; if (menukey != null) { // 클릭한연결주소설정체크 menuItem.Checked = true; int ipsetIndex = menukey.index; IPSetting ipset = ipsetList[ipsetIndex]; ConnectionSetting.SetIPSetting(ipset.Conn, ipset); } }
/// <summary> /// /// </summary> private void InitMenuStatus() { // 현재사용중인항목 foreach (ToolStripItem item in menu.Items) { MenuKey menukey = (MenuKey)item.Tag; if (menukey != null) { bool menucheck = false; // 연결주소 if (menukey.type == MenuKey.IPSETTING) { IPSetting ipset = ipsetList[menukey.index]; string curip = ConnectionSetting.getCurrentIP(ipset.Conn.Name); if ((curip == ConnectionSetting.DHCP && ipset.AddrDHCP) || (curip != null && curip.Length > 0 && curip == ipset.Ipaddr)) { menucheck = true; } } // 프록시서버 else if (menukey.type == MenuKey.PROXY) { Proxy proxy = proxyList[menukey.index]; string pss = InternetSetting.GenProxyServerString(proxy); string currpss = InternetSetting.GetProxyServer(); if (currpss != null && currpss.Length > 0 && currpss == pss) { menucheck = true; } } if (menucheck) { ((ToolStripMenuItem)item).Checked = true; } } } // 프록시서버사용여부 GetMenuByName("M00").Checked = InternetSetting.GetProxyEnable(); }