예제 #1
0
        public UserPointCollection GetDefaultUserPoints()
        {
            UserPointCollection tempPoints = new UserPointCollection();
            UserPoint           point      = new UserPoint();

            point.Type         = UserPointType.Point1;
            point.Enable       = true;
            point.Display      = true;
            point.Name         = "金钱";
            point.InitialValue = 1000;
            tempPoints.Add(point);

            point              = new UserPoint();
            point.Type         = UserPointType.Point2;
            point.Enable       = true;
            point.Display      = true;
            point.Name         = "威望";
            point.InitialValue = 100;
            tempPoints.Add(point);

            point        = new UserPoint();
            point.Type   = UserPointType.Point3;
            point.Enable = false;
            point.Name   = "积分3";
            tempPoints.Add(point);

            point        = new UserPoint();
            point.Type   = UserPointType.Point4;
            point.Enable = false;
            point.Name   = "积分4";
            tempPoints.Add(point);

            point        = new UserPoint();
            point.Type   = UserPointType.Point5;
            point.Enable = false;
            point.Name   = "积分5";
            tempPoints.Add(point);

            point        = new UserPoint();
            point.Type   = UserPointType.Point6;
            point.Enable = false;
            point.Name   = "积分6";
            tempPoints.Add(point);

            point        = new UserPoint();
            point.Type   = UserPointType.Point7;
            point.Enable = false;
            point.Name   = "积分7";
            tempPoints.Add(point);

            point        = new UserPoint();
            point.Type   = UserPointType.Point8;
            point.Enable = false;
            point.Name   = "积分8";
            tempPoints.Add(point);
            return(tempPoints);
        }
예제 #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);
        }