Esempio n. 1
0
        public void Refresh()
        {
            ViewCells?.Clear();
            ViewCells = new List <ViewCell>();
            foreach (var directory in CurrentPath.EnumerateDirectories())
            {
                var cell = new DirectoryCell(directory, Settings);

                ViewCells.Add(cell);
            }

            foreach (var file in CurrentPath.EnumerateFiles())
            {
                if (DisplayFilter != null && !DisplayFilter.Contains(file.Extension.ToLower().Trim('.')))
                {
                    continue;
                }
                var cell = new FileCell(file, Settings);
                if (IsExchangePath || CurrentPath.FullName == AddonPath.FullName)
                {
                    cell.CanDelete = true;
                }
                else
                {
                    cell.CanDelete = false;
                }
                ViewCells.Add(cell);
            }
        }