コード例 #1
0
ファイル: Kit.cs プロジェクト: Microsoft1080/battlelogmobile
 public Kit(KitType type, int score, TimeSpan time, double percentage)
 {
     Type       = type;
     Score      = score;
     Time       = time;
     Percentage = percentage;
 }
コード例 #2
0
        private string FillKitType(KitWrapper kit, IUnitOfWork uow)
        {
            // есть ли тип комплекта
            var kittypeFilter = string.Format("{0} = '{1}'",
                                              SourceNameHelper.Instance.GetPropertySourceName(typeof(KitType), KitType.KitTypeNamePropertyName),
                                              kit.KITTYPE.KITYPENAME);

            using (var kittypeMgr = IoC.Instance.Resolve <IBaseManager <KitType> >())
            {
                if (uow != null)
                {
                    kittypeMgr.SetUnitOfWork(uow);
                }

                var kittypes = kittypeMgr.GetFiltered(kittypeFilter).ToArray();
                if (!kittypes.Any())
                {
                    var kittype = new KitType
                    {
                        KitTypeCode = kit.KITTYPE.KITYPENAME,
                        KitTypeName = kit.KITTYPE.KITYPENAME
                    };
                    SetXmlIgnore(kittype, false);
                    kittypeMgr.Insert(ref kittype);
                    Log.DebugFormat("Создан тип комплекта (ID = {0})", kittype.KitTypeCode);
                    return(kittype.KitTypeCode);
                }
                Log.DebugFormat("Найден тип комплекта (ID = {0})", kittypes[0].KitTypeCode);
                return(kittypes[0].KitTypeCode);
            }
        }
コード例 #3
0
 public IKitProgression Get(KitType type)
 {
     var kitProgression = _kitProgressions.SingleOrDefault(k => k.Type.Equals(type));
     if (kitProgression != null)
         return kitProgression;
     throw new ArgumentException("given KitType not found in collection!");
 }
コード例 #4
0
ファイル: Kit.cs プロジェクト: Microsoft1080/battlelogmobile
 public Kit(KitType type, int score, TimeSpan time, double percentage)
 {
     Type = type;
     Score = score;
     Time = time;
     Percentage = percentage;
 }
コード例 #5
0
 public KitServiceStar(KitType kitType, int score, int stars, double progression, double percentage)
 {
     Type = kitType;
     Score = score;
     Stars = stars;
     Progression = progression;
     Percentage = percentage;
 }
コード例 #6
0
        public IKit Get(KitType type)
        {
            var kit = _kits.SingleOrDefault(k => k.Type.Equals(type));

            if (kit != null)
            {
                return(kit);
            }
            throw new ArgumentException("given KitType not found in collection!");
        }
コード例 #7
0
    public void SetMask(KitType kit)
    {
        switch (kit)
        {
        case KitType.NoSuit:
            cam.cullingMask = defaultMask;
            break;

        case KitType.Engineer:
            cam.cullingMask = engineerMask;
            break;
        }
    }
コード例 #8
0
 public KitProgression(KitType type, int serviceStars, double progress)
 {
     Type         = type;
     ServiceStars = serviceStars;
     Progress     = progress;
 }
コード例 #9
0
 public KitProgression(KitType type, int serviceStars, double progress)
 {
     Type = type;
     ServiceStars = serviceStars;
     Progress = progress;
 }
コード例 #10
0
ファイル: Kit.cs プロジェクト: Microsoft1080/battlelogmobile
 public Kit(KitType type, int score) : this(type, score, new TimeSpan(), 0d)
 {
 }
コード例 #11
0
 public KitServiceStar(KitType kitType)
     : this(kitType, 0, 0, 0d, 0d)
 {
 }
コード例 #12
0
 public async Task <Kit> GetBySquadIdAndKitTypeAsync(int squadId, KitType kitType)
 {
     return(await _kitRepository.GetBySquadIdAndKitTypeAsync(squadId, kitType));
 }
コード例 #13
0
ファイル: Kit.cs プロジェクト: Microsoft1080/battlelogmobile
 public Kit(KitType type, int score)
     : this(type, score, new TimeSpan(), 0d)
 {
 }
コード例 #14
0
 public async Task <Kit> GetBySquadIdAndKitTypeAsync(int squadId, KitType kitType)
 {
     return(await Context.Kits
            .SingleOrDefaultAsync(k => k.Squad.Id == squadId &&
                                  k.KitType == kitType));
 }