public ViewModelServersListSortType(ServersListSortType sortType)
        {
            string title;

            switch (sortType)
            {
            case ServersListSortType.None:
                title = string.Empty;
                break;

            case ServersListSortType.Ping:
                title = CoreStrings.ServerPing;
                break;

            case ServersListSortType.Title:
                title = CoreStrings.Title;
                break;

            case ServersListSortType.OnlinePlayersCount:
                title = CoreStrings.WindowSocial_TitleOnlinePlayersList;
                break;

            default:
                throw new ArgumentOutOfRangeException(nameof(sortType));
            }

            this.Title    = title;
            this.SortType = sortType;
        }
 public static ViewModelServersListSortType GetViewModel(ServersListSortType sortType)
 {
     return(DictionarySortTypeToViewModel[sortType]);
 }
示例#3
0
 public ViewModelServersListSortType(ServersListSortType sortType)
 {
     this.SortType = sortType;
 }