public override void GetFilteredItems(FileManagerGetFilteredItemsArgs args) { switch (args.FileListCustomFilter) { case "Recent": args.Items = ExecuteFilterByRecent(args.Folder); break; case "RTFDocs": args.Items = ExecuteFilterByExtension(RTFExtensions, args.Folder); break; case "Sheets": args.Items = ExecuteFilterByExtension(SheetExtensions, args.Folder); break; case "Images": args.Items = ExecuteFilterByExtension(ImageExtensions, args.Folder); break; case "PDFs": args.Items = ExecuteFilterByExtension(PDFExtensions, args.Folder); break; case "Favorites": args.Items = GetFavoriteFiles(); break; default: base.GetFilteredItems(args); return; } if (args.Items != null && !string.IsNullOrEmpty(args.FilterBoxText)) { args.Items = args.Items.Where(item => item.Name.ToLower().IndexOf(args.FilterBoxText) > -1); } }
// Filtering public override void GetFilteredItems(FileManagerGetFilteredItemsArgs args) { args.Items = GetItemsByFilter(args.FileListCustomFilter, args.FilterBoxText); }