Пример #1
0
        public static string ToCulturizedText(NicoliveSearchSort sort, Order order)
        {
            var isAscending = order == Order.Ascending;

            switch (sort)
            {
            case NicoliveSearchSort.Recent:
                return(isAscending ? "放送日時が近い順" : "放送日時が遠い順");

            case NicoliveSearchSort.Comment:
                return(isAscending ? "コメントが多い順" : "コメントが少ない順");

            default:
                throw new NotSupportedException();
            }
        }
Пример #2
0
        public static string ToCulturizedText(NicoliveSearchSort sort, Order order)
        {
            var    isAscending = order == Order.Ascending;
            string text;

            switch (sort)
            {
            case NicoliveSearchSort.Recent:
                text = isAscending ? "NicoliveSearchSort.Recent_Ascending" : "NicoliveSearchSort.Recent_Descending"; break;

            case NicoliveSearchSort.Comment:
                text = isAscending ? "NicoliveSearchSort.Comment_Ascending" : "NicoliveSearchSort.Comment_Descending"; break;

            default:
                throw new NotSupportedException();
            }

            return(text.Translate());
        }
Пример #3
0
        public static void SearchLive(this PageManager pageManager, string content, bool isTagSearch, CommunityType?provider, Mntone.Nico2.Order order, NicoliveSearchSort sort, NicoliveSearchMode?mode)
        {
            var payload = new LiveSearchPagePayloadContent()
            {
                Keyword     = content,
                Mode        = mode,
                IsTagSearch = isTagSearch,
                Order       = order,
                Sort        = sort,
                Provider    = provider
            };

            pageManager.OpenPage(HohoemaPageType.SearchResultLive, payload.ToParameterString());
        }