示例#1
0
        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);
        }
示例#2
0
 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));
     }
 }
示例#4
0
 internal bool IncludeItem(IntPtr pidl)
 {
     if (FilterItem != null)
     {
         var e = new FilterItemEventArgs(
             new ShellItem(ShellItem, pidl));
         FilterItem(this, e);
         return(e.Include);
     }
     return(true);
 }
示例#5
0
 bool IncludeItem(ShellItem item)
 {
     if (FilterItem != null)
     {
         FilterItemEventArgs e = new FilterItemEventArgs(item);
         FilterItem(this, e);
         return(e.Include);
     }
     else
     {
         return(true);
     }
 }
示例#6
0
 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);
     }
 }
示例#7
0
        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));
     }
 }
示例#9
0
 bool IncludeItem(ShellItem item)
 {
     if (FilterItem != null)
     {
         FilterItemEventArgs e = new FilterItemEventArgs(item);
         FilterItem(this, e);
         return e.Include;
     }
     else
     {
         return true;
     }
 }
示例#10
0
        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;
        }
示例#11
0
 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;
     }
 }