Exemplo n.º 1
0
        private async void OnAddFiles(object obj)
        {
            switch (this.ContentType)
            {
            case MediaLibrary.DataModels.ContentType.Image:
            {
                string[] filePath = MultimediaViewModel.GetFilePath("", this.imageSearchMask, "Select files to add");
                if (filePath != null)
                {
                    await this.dataLibrary.AddContentFromFiles(filePath, this.contentType);

                    goto case MediaLibrary.DataModels.ContentType.Track;
                }
                else
                {
                    break;
                }
            }

            case MediaLibrary.DataModels.ContentType.Track:
            {
                break;
            }

            case MediaLibrary.DataModels.ContentType.Video:
            {
                string[] strArrays = MultimediaViewModel.GetFilePath("", this.videoSearchMask, "Select files to add");
                if (strArrays != null)
                {
                    await this.dataLibrary.AddContentFromFiles(strArrays, this.contentType);

                    goto case MediaLibrary.DataModels.ContentType.Track;
                }
                else
                {
                    break;
                }
            }

            default:
            {
                goto case MediaLibrary.DataModels.ContentType.Track;
            }
            }
        }