Inheritance: Caliburn.Micro.PropertyChangedBase
示例#1
0
        private string GetItemTypeGroup(StorageItemViewModel item)
        {
            var folderViewModel = item as StorageFolderViewModel;

            if (folderViewModel != null)
            {
                return(Strings.GroupFolders);
            }

            var fileViewModel = item as StorageFileViewModel;

            if (fileViewModel == null)
            {
                return(Strings.GroupOther);
            }

            switch (fileViewModel.MediaType)
            {
            case MediaType.Music:
                return(Strings.GroupMusic);

            case MediaType.Picture:
                return(Strings.GroupsPictures);

            case MediaType.Video:
                return(Strings.GroupVideos);

            default:
                return(Strings.GroupOther);
            }
        }
        private string GetItemTypeGroup(StorageItemViewModel item)
        {
            var folderViewModel = item as StorageFolderViewModel;

            if (folderViewModel != null)
                return Strings.GroupFolders;

            var fileViewModel = item as StorageFileViewModel;

            if (fileViewModel == null)
                return Strings.GroupOther;

            switch (fileViewModel.MediaType)
            {
                case MediaType.Music:
                    return Strings.GroupMusic;
                case MediaType.Picture:
                    return Strings.GroupsPictures;
                case MediaType.Video:
                    return Strings.GroupVideos;
                default:
                    return Strings.GroupOther;
            }
        }