You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
874 B
33 lines
874 B
namespace EnhancedScrollerDemos.GridSelection
|
|
{
|
|
public delegate void SelectedChangedDelegate(bool val);
|
|
|
|
/// <summary>
|
|
/// Data class to store information
|
|
/// </summary>
|
|
public class Data
|
|
{
|
|
public string someText;
|
|
|
|
public SelectedChangedDelegate selectedChanged;
|
|
|
|
/// <summary>
|
|
/// The selection state
|
|
/// </summary>
|
|
private bool _selected;
|
|
public bool Selected
|
|
{
|
|
get { return _selected; }
|
|
set
|
|
{
|
|
// if the value has changed
|
|
if (_selected != value)
|
|
{
|
|
// update the state and call the selection handler if it exists
|
|
_selected = value;
|
|
if (selectedChanged != null) selectedChanged(_selected);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|