Exemplo n.º 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;
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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));
 }
Exemplo n.º 5
0
        private CandidateBlockList CreateSpecialCandidateBlockList(Guid employerId, BlockListType blockListType)
        {
            var blockList = new CandidateBlockList {
                RecruiterId = employerId, BlockListType = blockListType
            };

            _contenderListsCommand.CreateList(blockList);
            return(blockList);
        }
Exemplo n.º 6
0
        private JobAdBlockList CreateSpecialBlockList(Guid memberId, BlockListType blockListType)
        {
            var blockList = new JobAdBlockList {
                MemberId = memberId, BlockListType = blockListType
            };

            _jobAdListsCommand.CreateList(blockList);
            return(blockList);
        }
Exemplo n.º 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]);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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]);
        }
Exemplo n.º 10
0
        public static string GetNameDisplayText(this BlockListType blockListType)
        {
            switch (blockListType)
            {
            case BlockListType.Temporary:
                return("Current search");

            default:
                return("All searches");
            }
        }
Exemplo n.º 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));
        }
Exemplo n.º 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;
        }
Exemplo n.º 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);
            }
        }
Exemplo n.º 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));
        }
Exemplo n.º 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);
        }
Exemplo n.º 16
0
 public BlockListNavigation(BlockListType blockListType, CandidatesPresentationModel presentation)
     : base(presentation)
 {
     BlockListType = blockListType;
 }
 public static string ToSerialString(this BlockListType value) => value switch
 {
Exemplo n.º 18
0
 int ICandidateListsCommand.RemoveAllCandidatesFromBlockList(IEmployer employer, BlockListType blockListType)
 {
     if (employer != null)
     {
         _contenderListsCommand.DeleteAllEntries(employer.Id, new[] { (int)blockListType });
     }
     return(0);
 }
Exemplo n.º 19
0
 public GUICommandItem(BlockListType cmd_mode, string cmd_name)
 {
     CommandMode = cmd_mode;
     CommandName = cmd_name;
 }
Exemplo n.º 20
0
 protected ReadOnlyUrl GetBlockListUrl(BlockListType blockListType)
 {
     return(new ReadOnlyApplicationUrl(_baseBlockListsUrl, blockListType.ToString()));
 }