public void Initialize(IntPtr lvHandle, string path, int index) { var item = new ShellItem(path); this.DisplayName = item.DisplayName; this.ParsingName = item.ParsingName; this.ItemIndex = index; this.ParentHandle = lvHandle; this.IsFileSystem = item.IsFileSystem; this.IsNetworkPath = item.IsNetworkPath; this.Extension = item.Extension; this.IsDrive = item.IsDrive; this.IsHidden = item.IsHidden; this.OverlayIconIndex = -1; this.ShieldedIconIndex = -1; this.PIDL = item.Pidl; //this.IFolder = item.GetIShellFolder(); //this.HasSubFolders = item.HasSubFolders; this.IsShared = item.IsShared; //this.IconType = item.IconType; this.IsFolder = item.IsFolder; this.IsSearchFolder = item.IsSearchFolder; this._Item = item; this._IconType = item.GetIconType(); //item.Dispose(); }
public void Initialize(IntPtr lvHandle, string path, int index) { var item = new ShellItem(path); this.DisplayName = item.DisplayName; this.ParsingName = item.ParsingName; this.ItemIndex = index; this.ParentHandle = lvHandle; this.IsFileSystem = item.IsFileSystem; this.IsNetworkPath = item.IsNetworkPath; this.Extension = item.Extension; this.IsDrive = item.IsDrive; this.IsHidden = item.IsHidden; this.OverlayIconIndex = -1; this.ShieldedIconIndex = -1; this.PIDL = item.Pidl; //this.IFolder = item.GetIShellFolder(); //this.HasSubFolders = item.HasSubFolders; this.IsShared = item.IsShared; //this.IconType = item.IconType; this.IsFolder = item.IsFolder; this.IsSearchFolder = item.IsSearchFolder; this._Item = item; this._IconType = item.GetIconType(); //item.Dispose(); } //TODO: Find out why this does nothing with the ShellViewItem that it creates