BExplorer.Shell.ShellView.InvertSelection C# (CSharp) Method

InvertSelection() public method

Inverse the selection of items
public InvertSelection ( ) : void
return void
    public void InvertSelection() {
      Int32 itemCount = 0;
      this._IIListView.GetItemCount(out itemCount);

      for (Int32 n = 0; n < itemCount; ++n) {
        var state = (LVIS)0;
        this._IIListView.GetItemState(n, LVIF.LVIF_STATE, LVIS.LVIS_SELECTED, out state);
        this._IIListView.SetItemState(n, LVIF.LVIF_STATE, LVIS.LVIS_SELECTED, (state & LVIS.LVIS_SELECTED) == LVIS.LVIS_SELECTED ? 0 : LVIS.LVIS_SELECTED);
      }
      this.Focus();
    }
ShellView