public void AddAndRename(CMElementUI __elementMask) { //and the element and then change the name, because maybe it's copy of the element __elementMask.ElementName = setNewName(__elementMask.ElementName); Add(__elementMask); }
public CMElementUI MakeCopy(TestCasesStructure __testCaseStruct) { Element newCopyElement = _elementReal.makeCopy(__testCaseStruct); CMElementUI newCopyMask = new CMElementUI(newCopyElement); return(newCopyMask); }
public void Add(CMElementUI __elementMask) { __elementMask.Owner = this; int i = 0; foreach (CMElementUI masked in List) { if (__elementMask.Position <= masked.Position) { break; } i++; } List.Insert(i, __elementMask); }
/// <summary> /// Indicates if an object is the same, checking the id of the element. /// </summary> /// <param name="obj"></param> /// <returns></returns> public override bool Equals(object obj) { if (obj == null) { return(false); } if (GetType() != obj.GetType()) { return(false); } // safe because of the GetType check CMElementUI ele = (CMElementUI)obj; // use this pattern to compare value members if (!ElementID.Equals(ele.ElementID)) { return(false); } return(true); }
public void Remove(CMElementUI cust) { List.Remove(cust); }