Exemple #1
0
 /// <summary>Stop tracking.</summary>
 public void Drop()
 {
     if (_index != -1)
     {
         var args = new TrackingEventArgs(false, _index);
         _index = -1;
         Changed?.Invoke(this, args);
     }
 }
Exemple #2
0
 /// <summary>Track element.</summary>
 /// <param name="index">Tracked element index.</param>
 public void Track(int index)
 {
     if (_index != index)
     {
         if (_index != -1)
         {
             var args = new TrackingEventArgs(false, _index);
             _index = -1;
             Changed?.Invoke(this, args);
         }
         if (index != -1)
         {
             _index = index;
             var args = new TrackingEventArgs(true, _index);
             Changed?.Invoke(this, args);
         }
     }
 }
Exemple #3
0
 private void OnHoverChanged(TrackingEventArgs e)
 {
     var bounds = GetElementBounds(e.Index);
     if(!e.IsTracked)
     {
         _elements[e.Index].MouseLeave();
     }
     OnInvalidated(bounds);
 }
Exemple #4
0
 private void OnStatusFilterHoverChanged(object sender, TrackingEventArgs<ChangesCountByType> e)
 {
     Invalidate(new Rectangle(0, 0, FlowControl.ContentArea.Width, HeaderHeight));
     FlowControl.Cursor = e.IsTracked ? Cursors.Hand : Cursors.Default;
 }
Exemple #5
0
 private void OnFileHoverChanged(object sender, TrackingEventArgs<FileItem> e)
 {
     Invalidate(new Rectangle(0, HeaderHeight + HeaderBottomMargin + GetVisualIndex(e.Index) * LineHeight, FlowControl.ContentArea.Width, LineHeight));
     FlowControl.Cursor = e.IsTracked ? Cursors.Hand : Cursors.Default;
 }
Exemple #6
0
 private void OnLineHoverChanged(object sender, TrackingEventArgs e)
 {
     Invalidate(GetLineBounds(e.Index, false));
 }
Exemple #7
0
 private void OnFileHoverChanged(object sender, TrackingEventArgs<FileItem> e)
 {
     Invalidate(new Rectangle(0, (e.Index + 1) * (LineHeight), FlowControl.ContentArea.Width, LineHeight));
     //if(e.IsTracked)
     //    FlowControl.Cursor = Cursors.Hand;
     //else
     //    FlowControl.Cursor = Cursors.Default;
 }
Exemple #8
0
 private void OnItemHoverChanged(object sender, TrackingEventArgs<CustomListBoxItem> e)
 {
     InvalidateItem(e.Index);
 }
Exemple #9
0
 private void OnHeaderHoverChanged(object sender, TrackingEventArgs<CustomListBoxColumn> e)
 {
     InvalidateColumn(e.Index);
 }
Exemple #10
0
 private void OnHoveredLinkChanged(object sender, TrackingEventArgs<TextWithHyperlinks.HyperlinkGlyph> e)
 {
     e.Item.IsHovered = e.IsTracked;
     InvalidateRequired.Raise(this);
 }