コード例 #1
0
ファイル: Profile.cs プロジェクト: c-jiang/ProxyManager
 public ProxyGroup(ProxyGroup pg)
 {
     m_szName         = pg.m_szName;
     m_isEnabled      = pg.m_isEnabled;
     m_iSelectedIndex = pg.m_iSelectedIndex;
     m_applyRule      = new ApplyRule(pg.m_applyRule);
     m_listProxyItems = new List <ProxyItem>(pg.m_listProxyItems);
 }
コード例 #2
0
ファイル: Profile.cs プロジェクト: c-jiang/ProxyManager
 public ProxyGroup()
 {
     m_szName         = String.Empty;
     m_isEnabled      = false;
     m_iSelectedIndex = 0;
     m_listProxyItems = new List <ProxyItem>();
     m_applyRule      = new ApplyRule();
 }
コード例 #3
0
ファイル: Profile.cs プロジェクト: c-jiang/ProxyManager
 public ApplyRule(ApplyRule ar)
 {
     m_bIdFilter         = ar.m_bIdFilter;
     m_szIdFilter        = ar.m_szIdFilter;
     m_bNameFilter       = ar.m_bNameFilter;
     m_szNameFilter      = ar.m_szNameFilter;
     m_bIpAddrFilter     = ar.m_bIpAddrFilter;
     m_szIpAddrFilter    = ar.m_szIpAddrFilter;
     m_bSubMaskFilter    = ar.m_bSubMaskFilter;
     m_szSubMaskFilter   = ar.m_szSubMaskFilter;
     m_bGatewayFilter    = ar.m_bGatewayFilter;
     m_szGatewayFilter   = ar.m_szGatewayFilter;
     m_bDnsAddrFilter    = ar.m_bDnsAddrFilter;
     m_szDnsAddrFilter   = ar.m_szDnsAddrFilter;
     m_bDnsSuffixFilter  = ar.m_bDnsSuffixFilter;
     m_szDnsSuffixFilter = ar.m_szDnsSuffixFilter;
 }
コード例 #4
0
ファイル: Profile.cs プロジェクト: c-jiang/ProxyManager
 public ApplyRule(ApplyRule ar)
 {
     m_bIdFilter = ar.m_bIdFilter;
     m_szIdFilter = ar.m_szIdFilter;
     m_bNameFilter = ar.m_bNameFilter;
     m_szNameFilter = ar.m_szNameFilter;
     m_bIpAddrFilter = ar.m_bIpAddrFilter;
     m_szIpAddrFilter = ar.m_szIpAddrFilter;
     m_bSubMaskFilter = ar.m_bSubMaskFilter;
     m_szSubMaskFilter = ar.m_szSubMaskFilter;
     m_bGatewayFilter = ar.m_bGatewayFilter;
     m_szGatewayFilter = ar.m_szGatewayFilter;
     m_bDnsAddrFilter = ar.m_bDnsAddrFilter;
     m_szDnsAddrFilter = ar.m_szDnsAddrFilter;
     m_bDnsSuffixFilter = ar.m_bDnsSuffixFilter;
     m_szDnsSuffixFilter = ar.m_szDnsSuffixFilter;
 }
コード例 #5
0
        private bool IsRuleMatched(ApplyRule rule)
        {
            bool ret = true;

            if (ret && rule.m_bIdFilter)
            {
                ret &= IsExpressionMatched(rule.m_szIdFilter,
                                           m_detector.ActiveNetworkId());
            }
            if (ret && rule.m_bNameFilter)
            {
                ret &= IsExpressionMatched(rule.m_szNameFilter,
                                           m_detector.ActiveNetworkName());
            }
            if (ret && rule.m_bIpAddrFilter)
            {
                ret &= IsExpressionMatched(rule.m_szIpAddrFilter,
                                           m_detector.ActiveNetworkIPAddress());
            }
            if (ret && rule.m_bSubMaskFilter)
            {
                ret &= IsExpressionMatched(rule.m_szSubMaskFilter,
                                           m_detector.ActiveNetworkSubMask());
            }
            if (ret && rule.m_bGatewayFilter)
            {
                ret &= IsExpressionMatched(rule.m_szGatewayFilter,
                                           m_detector.ActiveNetworkGateway());
            }
            if (ret && rule.m_bDnsAddrFilter)
            {
                ret &= IsExpressionMatched(rule.m_szDnsAddrFilter,
                                           m_detector.ActiveNetworkDnsAddress());
            }
            if (ret && rule.m_bDnsSuffixFilter)
            {
                ret &= IsExpressionMatched(rule.m_szDnsSuffixFilter,
                                           m_detector.ActiveNetworkDnsSuffix());
            }
            return(ret);
        }
コード例 #6
0
ファイル: Profile.cs プロジェクト: c-jiang/ProxyManager
 public ProxyGroup(ProxyGroup pg)
 {
     m_szName = pg.m_szName;
     m_isEnabled = pg.m_isEnabled;
     m_iSelectedIndex = pg.m_iSelectedIndex;
     m_applyRule = new ApplyRule(pg.m_applyRule);
     m_listProxyItems = new List<ProxyItem>(pg.m_listProxyItems);
 }
コード例 #7
0
ファイル: Profile.cs プロジェクト: c-jiang/ProxyManager
 public ProxyGroup()
 {
     m_szName = String.Empty;
     m_isEnabled = false;
     m_iSelectedIndex = 0;
     m_listProxyItems = new List<ProxyItem>();
     m_applyRule = new ApplyRule();
 }
コード例 #8
0
ファイル: AppManager.cs プロジェクト: c-jiang/ProxyManager
 private bool IsRuleMatched(ApplyRule rule)
 {
     bool ret = true;
     if (ret && rule.m_bIdFilter) {
         ret &= IsExpressionMatched(rule.m_szIdFilter,
             m_detector.ActiveNetworkId());
     }
     if (ret && rule.m_bNameFilter) {
         ret &= IsExpressionMatched(rule.m_szNameFilter,
             m_detector.ActiveNetworkName());
     }
     if (ret && rule.m_bIpAddrFilter) {
         ret &= IsExpressionMatched(rule.m_szIpAddrFilter,
             m_detector.ActiveNetworkIPAddress());
     }
     if (ret && rule.m_bSubMaskFilter) {
         ret &= IsExpressionMatched(rule.m_szSubMaskFilter,
             m_detector.ActiveNetworkSubMask());
     }
     if (ret && rule.m_bGatewayFilter) {
         ret &= IsExpressionMatched(rule.m_szGatewayFilter,
             m_detector.ActiveNetworkGateway());
     }
     if (ret && rule.m_bDnsAddrFilter) {
         ret &= IsExpressionMatched(rule.m_szDnsAddrFilter,
             m_detector.ActiveNetworkDnsAddress());
     }
     if (ret && rule.m_bDnsSuffixFilter) {
         ret &= IsExpressionMatched(rule.m_szDnsSuffixFilter,
             m_detector.ActiveNetworkDnsSuffix());
     }
     return ret;
 }