bool ShouldCreateItem(ShellItem folder) { FilterItemEventArgs e = new FilterItemEventArgs(folder); ShellItem myComputer = new ShellItem(Environment.SpecialFolder.MyComputer); e.Include = false; if (ShellItem.Desktop.IsImmediateParentOf(folder) || m_Computer.IsImmediateParentOf(folder)) { e.Include = folder.IsFileSystemAncestor; } else if ((folder == m_SelectedFolder) || folder.IsParentOf(m_SelectedFolder)) { e.Include = true; } if (FilterItem != null) { FilterItem(this, e); } return(e.Include); }
private bool IncludeItem(ShellItem item) { if (FilterItem != null) { var e = new FilterItemEventArgs(item); FilterItem(this, e); return(e.Include); } return(true); }
private void m_ShellView_FilterItem(object sender, FilterItemEventArgs e) { // Include items that are present in the filesystem, and are a // folder, or match the current regex. if (e.Include) { e.Include = (e.Item.IsFileSystem || e.Item.IsFileSystemAncestor) && (e.Item.IsFolder || _mRegex.IsMatch(e.Item.FileSystemPath)); } }
internal bool IncludeItem(IntPtr pidl) { if (FilterItem != null) { var e = new FilterItemEventArgs( new ShellItem(ShellItem, pidl)); FilterItem(this, e); return(e.Include); } return(true); }
bool IncludeItem(ShellItem item) { if (FilterItem != null) { FilterItemEventArgs e = new FilterItemEventArgs(item); FilterItem(this, e); return(e.Include); } else { return(true); } }
internal bool IncludeItem(IntPtr pidl) { if (FilterItem != null) { FilterItemEventArgs e = new FilterItemEventArgs( new ShellItem(m_CurrentFolder, pidl)); FilterItem(this, e); return(e.Include); } else { return(true); } }
private bool ShouldCreateItem(ShellItem folder) { var e = new FilterItemEventArgs(folder); // ReSharper disable once UnusedVariable var myComputer = new ShellItem(Environment.SpecialFolder.MyComputer); e.Include = false; if (ShellItem.Desktop.IsImmediateParentOf(folder) || _mComputer.IsImmediateParentOf(folder)) { e.Include = folder.IsFileSystemAncestor; } else if ((folder == _mSelectedFolder) || folder.IsParentOf(_mSelectedFolder)) { e.Include = true; } FilterItem?.Invoke(this, e); return(e.Include); }
void m_ShellView_FilterItem(object sender, FilterItemEventArgs e) { // Include items that are present in the filesystem, and are a // folder, or match the current regex. if (e.Include) { e.Include = (e.Item.IsFileSystem || e.Item.IsFileSystemAncestor) && (e.Item.IsFolder || m_Regex.IsMatch(e.Item.FileSystemPath)); } }
bool IncludeItem(ShellItem item) { if (FilterItem != null) { FilterItemEventArgs e = new FilterItemEventArgs(item); FilterItem(this, e); return e.Include; } else { return true; } }
bool ShouldCreateItem(ShellItem folder) { FilterItemEventArgs e = new FilterItemEventArgs(folder); ShellItem myComputer = new ShellItem(Environment.SpecialFolder.MyComputer); e.Include = false; if (ShellItem.Desktop.IsImmediateParentOf(folder) || m_Computer.IsImmediateParentOf(folder)) { e.Include = folder.IsFileSystemAncestor; } else if ((folder == m_SelectedFolder) || folder.IsParentOf(m_SelectedFolder)) { e.Include = true; } if (FilterItem != null) { FilterItem(this, e); } return e.Include; }
internal bool IncludeItem(IntPtr pidl) { if (FilterItem != null) { FilterItemEventArgs e = new FilterItemEventArgs( new ShellItem(m_CurrentFolder, pidl)); FilterItem(this, e); return e.Include; } else { return true; } }