public object Clone()
        {
            PointExchangeRule rule = new PointExchangeRule();

            rule.PointType         = PointType;
            rule.TargetPointType   = TargetPointType;
            rule.TaxRate           = TaxRate;
            rule.MinRemainingValue = MinRemainingValue;
            return(rule);
        }
Exemple #2
0
        public PointSettings()
        {
            UserPoints          = new UserPointCollection();
            ExchangeProportions = new PointExchangeProportionCollection();

            ExchangeProportions.Add(UserPointType.Point1, 10);
            ExchangeProportions.Add(UserPointType.Point2, 1);
            ExchangeProportions.Add(UserPointType.Point3, 1);
            ExchangeProportions.Add(UserPointType.Point4, 1);
            ExchangeProportions.Add(UserPointType.Point5, 1);
            ExchangeProportions.Add(UserPointType.Point6, 1);
            ExchangeProportions.Add(UserPointType.Point7, 1);
            ExchangeProportions.Add(UserPointType.Point8, 1);

            EnablePointExchange = false;

            EnablePointTransfer = false;

            PointRechargeRules = new PointRechargeRuleCollection();

            PointExchangeRules = new PointExchangeRuleCollection();
            PointExchangeRule rule = new PointExchangeRule();

            rule.PointType       = UserPointType.Point2;
            rule.TargetPointType = UserPointType.Point1;
            rule.TaxRate         = 2;
            PointExchangeRules.Add(rule);

            GeneralPointName       = "总积分";
            GeneralPointExpression = "p1+p2*10";
            DisplayGeneralPoint    = true;
            TradeRate = 2;

            PointTransferRules = new PointTransferRuleCollection();
            PointTransferRule tRule = new PointTransferRule();

            tRule.CanTransfer = true;
            tRule.PointType   = UserPointType.Point1;
            tRule.TaxRate     = 2;
            PointTransferRules.Add(tRule);

            PointIcons = new PointIconCollection();
            PointIcon icon = new PointIcon();

            icon.IconCount   = 4;
            icon.IconsString = "fortune_3.gif|fortune_2.gif|fortune_1.gif";
            icon.PointType   = UserPointType.Point1;
            icon.PointValue  = 1000;
            PointIcons.Add(icon);
        }