hMailServer.Administrator.ucListView.OnMouseDown C# (CSharp) Method

OnMouseDown() protected method

protected OnMouseDown ( MouseEventArgs e ) : void
e MouseEventArgs
return void
        protected override void OnMouseDown(MouseEventArgs e)
        {
            ListViewHitTestInfo info = base.HitTest(new System.Drawing.Point(e.X, e.Y));
             ListViewItem item = info.Item;

             if (item != null)
             {
            int index = item.Index;
            if (this.SelectedIndices.Count == 0)
            {
               if (index != 0)
                  OnBeforeSelectedIndexChanged();
            }
            if (this.SelectedIndices.Count != 0 && index != this.SelectedIndices[0])
            {
               OnBeforeSelectedIndexChanged();
            }
             }

             base.OnMouseDown(e);
        }