Example #1
0
        private static bool getFiles(FileInfo info, object state)
        {
            List <MediaFileItem> items = (List <MediaFileItem>)state;

            if (MediaFormatConvert.isMediaFile(info.FullName))
            {
                items.Add(MediaFileItem.Factory.create(info.FullName));
            }

            return(true);
        }
        private bool addInputMedia(FileInfo info, object state)
        {
            ObservableCollection <MediaFileItem> items = (ObservableCollection <MediaFileItem>)state;

            if (MediaFormatConvert.isMediaFile(info.FullName))
            {
                items.Add(MediaFileItem.Factory.create(info.FullName));
            }

            return(true);
        }
Example #3
0
        private void listMediaFiles(string path)
        {
            DirectoryInfo imageDirInfo = new DirectoryInfo(path);

            FileInfo[] fileInfo = imageDirInfo.GetFiles();

            List <MediaFileItem> items = new List <MediaFileItem>();

            for (int i = 0; i < fileInfo.Length; i++)
            {
                if (MediaFormatConvert.isMediaFile(fileInfo[i].FullName))
                {
                    items.Add(MediaFileItem.Factory.create(fileInfo[i].FullName));
                }
            }

            MediaFileState.clearUIState(imageDirInfo.Name, imageDirInfo.CreationTime, MediaStateType.Directory);
            MediaFileState.addUIState(items);
        }