コード例 #1
0
        /// <summary>
        ///
        /// </summary>
        private void DoClearProxySetting()
        {
            UncheckMenus(MenuKey.PROXY);

            // 프록시서버사용여부체크해제
            GetMenuByName("M00").Checked = false;

            InternetSetting.ClearProxySetting();
        }
コード例 #2
0
        /// <summary>
        ///
        /// </summary>
        private void DoToggleProxyEnable()
        {
            ToolStripMenuItem proxyToggle = GetMenuByName("M00");

            bool enable = !proxyToggle.Checked;

            proxyToggle.Checked = enable;

            InternetSetting.SetProxyEnable(enable);
        }
コード例 #3
0
        /// <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();
        }
コード例 #4
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="menuItem"></param>
        private void DoExchangeProxy(ToolStripMenuItem menuItem)
        {
            UncheckMenus(MenuKey.PROXY);

            MenuKey menukey = (MenuKey)menuItem.Tag;

            if (menukey != null)
            {
                // 프록시서버사용여부체크
                GetMenuByName("M00").Checked = true;

                // 클릭한프록시서버체크
                menuItem.Checked = true;

                int   proxyIndex = menukey.index;
                Proxy proxy      = proxyList[proxyIndex];

                InternetSetting.SetProxySetting(proxy);
            }
        }