LabelPlus.PicView.PicView_MouseMove C# (CSharp) Method

PicView_MouseMove() private method

private PicView_MouseMove ( object sender, MouseEventArgs e ) : void
sender object
e MouseEventArgs
return void
        private void PicView_MouseMove(object sender, MouseEventArgs e)
        {
            try
            {

                int index = getLabelIndex(e.X, e.Y);

                if (index != lastMouseIndex) {
                    if(LabelUserAction!=null)
                        LabelUserAction(this,new LabelUserActionEventArgs(index,e.X,e.Y, LabelUserActionEventArgs.ActionType.mouseIndexChanged));
                }
                lastMouseIndex = index;

                //提示文本
                if (index != -1)
                {
                    if (!tooltop_showing)
                    {
                        var location = e.Location;
                        location.X += this.Cursor.Size.Width / 3;
                        location.Y += this.Cursor.Size.Height / 3;
                        toolTip.Show(labels[index].Text, this, location);
                        tooltop_showing = true;
                    }
                }
                else
                {
                    toolTip.Hide(this);
                    tooltop_showing = false;
                }
            }
            catch { }
        }