namespace GDNXFD.Alert.Config.Model
{
using System;
///
/// Page item class
///
public class PageItem
{
private string page;
private bool isCurrentPage;
private bool isClickable;
///
/// Constructor
///
/// Number of page
/// Is current page
/// Is clickable page
public PageItem(string page, bool isCurrentPage, bool isClickable)
{
this.page = page;
this.isCurrentPage = isCurrentPage;
this.isClickable = isClickable;
}
///
/// Number of page.
///
public string Page
{
get { return this.page; }
set { this.page = value; }
}
///
/// Is current page.
///
public bool IsCurrentPage
{
get { return this.isCurrentPage; }
set
{
this.isCurrentPage = value;
if (value)
{
var tmp = PageSelected;
if (tmp != null)
tmp(this, new EventArgs());
}
}
}
///
/// Is clickable.
///
public bool IsClickable
{
get { return this.isClickable; }
set { this.isClickable = value; }
}
///
/// Page selected event.
///
public event EventHandler PageSelected;
}
}