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

RedrawItem() public method

public RedrawItem ( Int32 index, Int32 delay = -1 ) : void
index Int32
delay Int32
return void
    public void RedrawItem(Int32 index, Int32 delay = -1) {
      if (delay > -1) {
        Thread.Sleep(delay);
      }
      var itemBounds = new User32.RECT() { Left = 1 };
      var lvi = new LVITEMINDEX() { iItem = index, iGroup = this.GetGroupIndex(index) };
      User32.SendMessage(this.LVHandle, MSG.LVM_GETITEMINDEXRECT, ref lvi, ref itemBounds);
      itemBounds.Left -= 2;
      itemBounds.Top -= 2;
      itemBounds.Bottom += 2;
      itemBounds.Right += 2;
      this.Invoke(new MethodInvoker(() => this._IIListView.RedrawItems(index, index)));

      //TODO: Find out why we have this loop
      for (Int32 i = 0; i < 1; i++) {
        if (IsGroupsEnabled) RedrawWindow(itemBounds);
      }
    }
ShellView