protected void AddCustomObject(Type structureType) { _customChoice = (LegPartDbStructure)Activator.CreateInstance(structureType); _customChoice.Text1 = _startCustomText; _customChoice.HasSize = false; _customChoice.Custom = true; _customChoice.ToNextPart = false; StructureSource.Add(_customChoice); }
protected void AddNextPartObject(Type structureType) { var next = (LegPartDbStructure)Activator.CreateInstance(structureType); next.Text1 = "Переход к следующему разделу"; next.HasSize = false; next.Custom = false; next.ToNextPart = true; StructureSource.Add(next); }
protected void AddEmpty(Type structureType) { var _Empty = (LegPartDbStructure)Activator.CreateInstance(structureType); _Empty.Text1 = ""; _Empty.Text2 = ""; _Empty.HasSize = false; _Empty.Custom = false; _Empty.ToNextPart = false; StructureSource.Add(_Empty); }
public void DeleteCustom() { StructureSource.Remove(_customChoice); }