#define Graph_And_Chart_PRO using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ChartAndGraph.DataSource { /// /// base class for data items (rows and columns) in a data source /// internal abstract class ChartDataItemBase : IDataItem { private string mName; private string mPrevName; public string Name { get { return mName; } set { mPrevName = mName; mName = value; if (NameChanged != null) NameChanged(mPrevName, this); } } public object UserData { get; set; } /// /// The material for this data source item /// public ChartDynamicMaterial Material { get; set; } public ChartDataItemBase(String name) { mName = name; } public event Action NameChanged; public void CancelNameChange() { mName = mPrevName; } } }