/// <summary> /// Adds the given element to the collection /// </summary> /// <param name="item">The item to add</param> public override void Add(IModelElement item) { IGmlMark gmlMarksCasted = item.As <IGmlMark>(); if ((gmlMarksCasted != null)) { this._parent.GmlMarks.Add(gmlMarksCasted); } IGmlPointSymbol gmlPointSymbolsCasted = item.As <IGmlPointSymbol>(); if ((gmlPointSymbolsCasted != null)) { this._parent.GmlPointSymbols.Add(gmlPointSymbolsCasted); } }
/// <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) { IGmlMark gmlMarkItem = item.As <IGmlMark>(); if (((gmlMarkItem != null) && this._parent.GmlMarks.Remove(gmlMarkItem))) { return(true); } IGmlPointSymbol gmlPointSymbolItem = item.As <IGmlPointSymbol>(); if (((gmlPointSymbolItem != null) && this._parent.GmlPointSymbols.Remove(gmlPointSymbolItem))) { return(true); } return(false); }
/// <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) { IGmlPolygonSymbol gmlPolygonSymbolItem = item.As <IGmlPolygonSymbol>(); if (((gmlPolygonSymbolItem != null) && this._parent.GmlPolygonSymbols.Remove(gmlPolygonSymbolItem))) { return(true); } IGmlSvgParameter gmlSvgParameterItem = item.As <IGmlSvgParameter>(); if (((gmlSvgParameterItem != null) && this._parent.GmlSvgParameters.Remove(gmlSvgParameterItem))) { return(true); } IGmlTextSymbol gmlTextSymbolItem = item.As <IGmlTextSymbol>(); if (((gmlTextSymbolItem != null) && this._parent.GmlTextSymbols.Remove(gmlTextSymbolItem))) { return(true); } IGmlMark gmlMarkItem = item.As <IGmlMark>(); if (((gmlMarkItem != null) && this._parent.GmlMarks.Remove(gmlMarkItem))) { return(true); } if ((this._parent.GmlColour == item)) { this._parent.GmlColour = null; 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) { IGmlPolygonSymbol gmlPolygonSymbolsCasted = item.As <IGmlPolygonSymbol>(); if ((gmlPolygonSymbolsCasted != null)) { this._parent.GmlPolygonSymbols.Add(gmlPolygonSymbolsCasted); } IGmlSvgParameter gmlSvgParametersCasted = item.As <IGmlSvgParameter>(); if ((gmlSvgParametersCasted != null)) { this._parent.GmlSvgParameters.Add(gmlSvgParametersCasted); } IGmlTextSymbol gmlTextSymbolsCasted = item.As <IGmlTextSymbol>(); if ((gmlTextSymbolsCasted != null)) { this._parent.GmlTextSymbols.Add(gmlTextSymbolsCasted); } IGmlMark gmlMarksCasted = item.As <IGmlMark>(); if ((gmlMarksCasted != null)) { this._parent.GmlMarks.Add(gmlMarksCasted); } if ((this._parent.GmlColour == null)) { IGmlColour gmlColourCasted = item.As <IGmlColour>(); if ((gmlColourCasted != null)) { this._parent.GmlColour = gmlColourCasted; return; } } }