using System;
using System.Collections.Generic;
namespace ScrewTurn.Wiki {
///
/// Defines an item or element in an tree structure.
///
public class TreeElement {
private string name, text, onClientClick;
private List subItems;
///
/// Initializes a new instance of the TreeElement class.
///
/// The name of the item.
/// The text of the item.
/// The JavaScript to execute on client click.
/// The sub-items.
public TreeElement(string name, string text, string onClientClick, List subItems) {
this.name = name;
this.text = text;
this.onClientClick = onClientClick;
this.subItems = subItems;
}
///
/// Initializes a new instance of the TreeElement class.
///
/// The name of the item.
/// The text of the item.
/// The JavaScript to execute on client click.
public TreeElement(string name, string text, string onClientClick)
: this(name, text, onClientClick, new List()) { }
///
/// Initializes a new instance of the TreeElement class.
///
/// The name of the item.
/// The text of the item.
/// The sub-items.
public TreeElement(string name, string text, List subItems)
: this(name, text, "", subItems) { }
///
/// Gets or sets the name of the item.
///
public string Name {
get { return name; }
set { this.name = value; }
}
///
/// Gets or sets the text of the item.
///
public string Text {
get { return text; }
set { text = value; }
}
///
/// Gets or sets the JavaScript to execute on client click.
///
public string OnClientClick {
get { return onClientClick; }
set { onClientClick = value; }
}
///
/// Gets or sets the SubItems.
///
public List SubItems {
get { return subItems; }
set { subItems = value; }
}
}
///
/// Contains the event arguments for the Populate event.
///
public class PopulateEventArgs : EventArgs {
}
}