public void SetItems(int ARow, int ACol, object Value) { TDischargedMassivItem Item = DoFind(ARow, ACol); bool m_def = (f_Def == Value); if (Item != null) { if (m_def) { DeleteItem(Item); } else { Item.f_Value = Value; } } else { if (!m_def) { Item = new TDischargedMassivItem(); Item.f_Col = ACol; Item.f_Row = ARow; Item.f_Value = Value; Val.Add(Item); } } }
public void DeleteItem(TDischargedMassivItem ADel) { int idx = Val.IndexOf(ADel); if (idx >= 0) { Val.RemoveAt(idx); } }
public object GetItems(int ARow, int ACol) { TDischargedMassivItem Item = DoFind(ARow, ACol); if (Item != null) { return(Item.f_Value); } return(f_Def); }