Added SelectedIndicesChanged even to DarkListView

This commit is contained in:
Robin 2015-12-12 19:55:37 +00:00
parent fc4ba9e6be
commit a1d21be928

View File

@ -12,6 +12,12 @@ namespace DarkUI.Controls
{
public class DarkListView : DarkScrollView
{
#region Event Region
public event EventHandler SelectedIndicesChanged;
#endregion
#region Field Region
private int _itemHeight = 20;
@ -238,6 +244,9 @@ namespace DarkUI.Controls
_selectedIndices.Clear();
_selectedIndices.Add(index);
if (SelectedIndicesChanged != null)
SelectedIndicesChanged(this, null);
_anchoredItemStart = index;
_anchoredItemEnd = index;
@ -258,6 +267,9 @@ namespace DarkUI.Controls
_selectedIndices.Add(index);
}
if (SelectedIndicesChanged != null)
SelectedIndicesChanged(this, null);
_anchoredItemStart = list[list.Count - 1];
_anchoredItemEnd = list[list.Count - 1];
@ -314,6 +326,9 @@ namespace DarkUI.Controls
_anchoredItemEnd = index;
}
if (SelectedIndicesChanged != null)
SelectedIndicesChanged(this, null);
Invalidate();
}
@ -335,6 +350,9 @@ namespace DarkUI.Controls
_selectedIndices.Add(i);
}
if (SelectedIndicesChanged != null)
SelectedIndicesChanged(this, null);
Invalidate();
}