예제 #1
0
 public PlayerItemModel(int objectId, string name, EnumObjectType objectType, EnumSlotType slotType)
 {
     ObjectId   = objectId;
     Name       = name;
     ObjectType = objectType;
     SlotType   = slotType;
 }
예제 #2
0
        public void RegisterAudit(EnumPermision permision, EnumObjectType scopeType, string callMethod, string parametersMethod)
        {
            var data      = callMethod + " | " + parametersMethod;
            var logAction = new LogAction(permision.ToString(), scopeType.ToString(), data);

            _logActionRepository.Add(logAction);
        }
 public void SetValueByProp(EnumObjectType objectType,decimal value)
 {
     switch (objectType)
     {
         case EnumObjectType.Apartment:
         {
             ApartmentProfit += value;
         }break;
         case EnumObjectType.CommercialProperty:
         {
             CommercialPropertyProfit += value;
         }break;
         case EnumObjectType.Homestead:
         {
             HomesteadProfit += value;
         }break;
         case EnumObjectType.House:
         {
             HouseProfit += value;
         }break;
     }
 }
예제 #4
0
 public void SetItem(EnumObjectType type, int?id)
 {
     ItemType = type;
     ItemId   = id;
     OnPropertyChanged("SlotIcon");
 }
예제 #5
0
        protected void RegisterAudit(EnumPermision permision, EnumObjectType scopeType, string principalCallMethod)
        {
            string methodCall = this.GetType().ToString() + ": RegisterAudit";

            _auditAppService.RegisterAudit(permision, scopeType, principalCallMethod, methodCall, null);
        }
예제 #6
0
 /// <summary>
 /// проверка вида объекта
 /// </summary>
 /// <returns></returns>
 public bool Is(EnumObjectType objectType)
 {
     return((ObjectType & objectType) == objectType);
 }
예제 #7
0
 public AGameBonus GetBonus(EnumObjectType bonusType)
 {
     return(Bonuses.FirstOrDefault(bonus => bonus.Is(bonusType)));
 }