Пример #1
0
        public List<Obj_AI_Hero> GetBlockList(BlockListType blockListType)
        {
            List<Obj_AI_Hero> blackList = new List<Obj_AI_Hero>();

            switch (blockListType)
            {
                    case BlockListType.Harass:
                    foreach (Obj_AI_Hero objAiHero in HeroManager.Enemies)
                    {
                        if (!GetParamBool("koreanzed.harasmenu.blacklist." + objAiHero.SkinName.ToLowerInvariant()))
                        {
                            blackList.Add(objAiHero);
                        }
                    }
                    break;

                    case BlockListType.Ultimate:
                    foreach (Obj_AI_Hero objAiHero in HeroManager.Enemies)
                    {
                        if (!GetParamBool("koreanzed.combomenu.blockult." + objAiHero.SkinName.ToLowerInvariant()))
                        {
                            blackList.Add(objAiHero);
                        }
                    }
                    break;
            }

            return blackList;
        }
Пример #2
0
        public List <AIHeroClient> GetBlockList(BlockListType blockListType)
        {
            List <AIHeroClient> blackList = new List <AIHeroClient>();

            switch (blockListType)
            {
            case BlockListType.Harass:
                foreach (AIHeroClient objAiHero in HeroManager.Enemies)
                {
                    if (!GetParamBool("koreanzed.harasmenu.blacklist." + objAiHero.BaseSkinName.ToLowerInvariant()))
                    {
                        blackList.Add(objAiHero);
                    }
                }
                break;

            case BlockListType.Ultimate:
                foreach (AIHeroClient objAiHero in HeroManager.Enemies)
                {
                    if (!GetParamBool("koreanzed.combomenu.blockult." + objAiHero.BaseSkinName.ToLowerInvariant()))
                    {
                        blackList.Add(objAiHero);
                    }
                }
                break;
            }

            return(blackList);
        }
Пример #3
0
        private ReadOnlyUrl GetBlockListUrl(BlockListType blockListType, MemberSortOrder sortOrder, bool isAscending)
        {
            var url = GetBlockListUrl(blockListType).AsNonReadOnly();

            url.QueryString.Add("SortOrder", sortOrder.ToString());
            url.QueryString.Add("SortOrderDirection", isAscending ? "SortOrderIsAscending" : "SortOrderIsDescending");
            return(url);
        }
Пример #4
0
 protected ReadOnlyUrl GetBlockListUrl(BlockListType blockListType, int?page, int?items)
 {
     if (page == null && items == null)
     {
         return(GetBlockListUrl(blockListType));
     }
     return(Get(GetBlockListUrl(blockListType), page, items));
 }
Пример #5
0
        private CandidateBlockList CreateSpecialCandidateBlockList(Guid employerId, BlockListType blockListType)
        {
            var blockList = new CandidateBlockList {
                RecruiterId = employerId, BlockListType = blockListType
            };

            _contenderListsCommand.CreateList(blockList);
            return(blockList);
        }
Пример #6
0
        private JobAdBlockList CreateSpecialBlockList(Guid memberId, BlockListType blockListType)
        {
            var blockList = new JobAdBlockList {
                MemberId = memberId, BlockListType = blockListType
            };

            _jobAdListsCommand.CreateList(blockList);
            return(blockList);
        }
Пример #7
0
        private JobAdBlockList GetSpecialBlockList(Guid memberId, BlockListType blockListType)
        {
            // If it doesn't exist then create it.

            var blockLists = _jobAdListsQuery.GetLists <JobAdBlockList>(memberId, (int)blockListType);

            return(blockLists.Count == 0
                ? CreateSpecialBlockList(memberId, blockListType)
                : blockLists[0]);
        }
Пример #8
0
        private void TestPagination(BlockListType blockListType, int?page, int?items, int start, int end, int total, int totalPages, int firstPage, int lastPage)
        {
            Get(GetBlockListUrl(blockListType, page, items));

            AssertCount(start, "start");
            AssertCount(end, "end");
            AssertCount(total, "total");
            AssertNavigation(page ?? 1, totalPages);
            AssertPages(page ?? 1, totalPages, firstPage, lastPage);
        }
Пример #9
0
        private CandidateBlockList GetSpecialBlockList(Guid employerId, BlockListType blockListType)
        {
            // If it doesn't exist then create it.

            var blockLists = _contenderListsQuery.GetLists <CandidateBlockList>(employerId, (int)blockListType);

            return(blockLists.Count == 0
                ? CreateSpecialCandidateBlockList(employerId, blockListType)
                : blockLists[0]);
        }
Пример #10
0
        public static string GetNameDisplayText(this BlockListType blockListType)
        {
            switch (blockListType)
            {
            case BlockListType.Temporary:
                return("Current search");

            default:
                return("All searches");
            }
        }
Пример #11
0
        private ActionResult PartialBlockList(BlockListType blockListType, MemberSearchSortCriteria sortCriteria, CandidatesPresentationModel presentation)
        {
            var model = BlockListResults(blockListType, sortCriteria, presentation);

            if (model == null)
            {
                return(NotFound("blocklist", "type", blockListType));
            }

            EmployerContext.CurrentCandidates = new BlockListNavigation(blockListType, presentation);
            return(PartialView("CandidateList", model));
        }
Пример #12
0
        public GUICommandItem(BlockListType cmd_mode, string cmd_name, string display_name, CommandTypes command_type, string[] values, string tooltip)
        {
            CommandMode      = cmd_mode;
            CommandName      = cmd_name;
            DisplayName      = display_name;
            this.CommandType = command_type;

            if (values != null)
            {
                Values = values;
            }

            ToolTip = tooltip;
        }
Пример #13
0
        public static void GetBlocks(BlockListType type, u32 count)
        {
            nullDCInstance.dpa packet = new nullDCInstance.dpa();
            ndc.SendString("blocks " + ((u32)type).ToString() + " " + count.ToString() + " 0");//the last 0 is for binary transfer :)
            ndc.GetPacket(ref packet);
            u32 blk_num = (u32)(packet.sz / (9 * 4));

            blocks = new Sh4Block[blk_num];
            for (u32 i = 0; i < blk_num; i++)
            {
                blocks[i] = new Sh4Block();
                blocks[i].ReadFromPacket(ref packet);
            }
        }
Пример #14
0
        private ReadOnlyUrl GetBlockListUrl(BlockListType blockListType, int?page, int?items)
        {
            if (page == null && items == null)
            {
                return(new ReadOnlyApplicationUrl(_baseBlockListsUrl, blockListType.ToString()));
            }

            var queryString = new QueryString();

            if (page != null)
            {
                queryString.Add("page", page.Value.ToString(CultureInfo.InvariantCulture));
            }
            if (items != null)
            {
                queryString.Add("items", items.Value.ToString(CultureInfo.InvariantCulture));
            }
            return(new ReadOnlyApplicationUrl(_baseBlockListsUrl, blockListType.ToString(), queryString));
        }
Пример #15
0
        private BlockListListModel BlockListResults(BlockListType blockListType, MemberSearchSortCriteria sortCriteria, CandidatesPresentationModel presentation)
        {
            var employer  = CurrentEmployer;
            var blockList = blockListType == BlockListType.Temporary
                ? _candidateBlockListsQuery.GetTemporaryBlockList(employer)
                : _candidateBlockListsQuery.GetPermanentBlockList(employer);

            if (blockList == null)
            {
                return(null);
            }

            // Do a search to get the candidates in this blockList.

            var model = Search(employer, blockList.Id, sortCriteria, presentation);

            model.BlockList     = blockList;
            model.SortOrders    = SortOrders;
            model.Communities   = _communitiesQuery.GetCommunities().ToDictionary(c => c.Id, c => c);
            model.Verticals     = _verticalsQuery.GetVerticals().ToDictionary(v => v.Id, v => v);
            model.CurrentSearch = EmployerContext.CurrentSearch;
            return(model);
        }
Пример #16
0
 public BlockListNavigation(BlockListType blockListType, CandidatesPresentationModel presentation)
     : base(presentation)
 {
     BlockListType = blockListType;
 }
 public static string ToSerialString(this BlockListType value) => value switch
 {
Пример #18
0
 int ICandidateListsCommand.RemoveAllCandidatesFromBlockList(IEmployer employer, BlockListType blockListType)
 {
     if (employer != null)
     {
         _contenderListsCommand.DeleteAllEntries(employer.Id, new[] { (int)blockListType });
     }
     return(0);
 }
Пример #19
0
 public GUICommandItem(BlockListType cmd_mode, string cmd_name)
 {
     CommandMode = cmd_mode;
     CommandName = cmd_name;
 }
Пример #20
0
 protected ReadOnlyUrl GetBlockListUrl(BlockListType blockListType)
 {
     return(new ReadOnlyApplicationUrl(_baseBlockListsUrl, blockListType.ToString()));
 }