/// <summary> /// Removes the given item from the collection /// </summary> /// <returns>True, if the item was removed, otherwise False</returns> /// <param name="item">The item that should be removed</param> public override bool Remove(IModelElement item) { IGmlStroke gmlStrokeItem = item.As <IGmlStroke>(); if (((gmlStrokeItem != null) && this._parent.GmlStrokes.Remove(gmlStrokeItem))) { return(true); } IGmlFont gmlFontItem = item.As <IGmlFont>(); if (((gmlFontItem != null) && this._parent.GmlFonts.Remove(gmlFontItem))) { return(true); } IGmlFill gmlFillItem = item.As <IGmlFill>(); if (((gmlFillItem != null) && this._parent.GmlFills.Remove(gmlFillItem))) { return(true); } return(false); }
/// <summary> /// Adds the given element to the collection /// </summary> /// <param name="item">The item to add</param> public override void Add(IModelElement item) { IGmlStroke gmlStrokesCasted = item.As <IGmlStroke>(); if ((gmlStrokesCasted != null)) { this._parent.GmlStrokes.Add(gmlStrokesCasted); } IGmlFont gmlFontsCasted = item.As <IGmlFont>(); if ((gmlFontsCasted != null)) { this._parent.GmlFonts.Add(gmlFontsCasted); } IGmlFill gmlFillsCasted = item.As <IGmlFill>(); if ((gmlFillsCasted != null)) { this._parent.GmlFills.Add(gmlFillsCasted); } }