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(); } }
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()); }
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()); }