Esempio n. 1
0
        protected override object this[string index]
        {
            get
            {
                #region
                switch (index)
                {
                case "BringUpType": return(BringUpType);

                case "UseUpType": return(UseUpType);

                case "UseUpNum": return(UseUpNum);

                case "AttributeChance": return(AttributeChance);

                case "AttributeValueChance": return(AttributeValueChance);

                default: throw new ArgumentException(string.Format("BringUpInfo index[{0}] isn't exist.", index));
                }
                #endregion
            }
            set
            {
                #region
                switch (index)
                {
                case "BringUpType":
                    _BringUpType = value.ToInt();
                    break;

                case "UseUpType":
                    _UseUpType = value.ToShort();
                    break;

                case "UseUpNum":
                    _UseUpNum = value.ToInt();
                    break;

                case "AttributeChance":
                    _AttributeChance = ConvertCustomField <AttributeChance>(value, index);
                    break;

                case "AttributeValueChance":
                    _AttributeValueChance = ConvertCustomField <AttributeValueChance>(value, index);
                    break;

                default: throw new ArgumentException(string.Format("BringUpInfo index[{0}] isn't exist.", index));
                }
                #endregion
            }
        }
Esempio n. 2
0
 public BringUpInfo()
     : base(AccessLevel.ReadOnly)
 {
     AttributeChance = new AttributeChance();
     AttributeValueChance = new AttributeValueChance();
 }
Esempio n. 3
0
 protected override object this[string index]
 {
     get
     {
         #region
         switch (index)
         {
             case "BringUpType": return BringUpType;
             case "UseUpType": return UseUpType;
             case "UseUpNum": return UseUpNum;
             case "AttributeChance": return AttributeChance;
             case "AttributeValueChance": return AttributeValueChance;
             default: throw new ArgumentException(string.Format("BringUpInfo index[{0}] isn't exist.", index));
         }
         #endregion
     }
     set
     {
         #region
         switch (index)
         {
             case "BringUpType":
                 _BringUpType = value.ToInt();
                 break;
             case "UseUpType":
                 _UseUpType = value.ToShort();
                 break;
             case "UseUpNum":
                 _UseUpNum = value.ToInt();
                 break;
             case "AttributeChance":
                 _AttributeChance = ConvertCustomField<AttributeChance>(value, index);
                 break;
             case "AttributeValueChance":
                 _AttributeValueChance = ConvertCustomField<AttributeValueChance>(value, index);
                 break;
             default: throw new ArgumentException(string.Format("BringUpInfo index[{0}] isn't exist.", index));
         }
         #endregion
     }
 }
Esempio n. 4
0
 public BringUpInfo()
     : base(AccessLevel.ReadOnly)
 {
     AttributeChance      = new AttributeChance();
     AttributeValueChance = new AttributeValueChance();
 }