Exemplo n.º 1
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                IGmlRasterSymbol gmlRasterSymbolsCasted = item.As <IGmlRasterSymbol>();

                if ((gmlRasterSymbolsCasted != null))
                {
                    this._parent.GmlRasterSymbols.Add(gmlRasterSymbolsCasted);
                }
                IDiagram diagramsCasted = item.As <IDiagram>();

                if ((diagramsCasted != null))
                {
                    this._parent.Diagrams.Add(diagramsCasted);
                }
                IGmlPointSymbol gmlPointSymbolsCasted = item.As <IGmlPointSymbol>();

                if ((gmlPointSymbolsCasted != null))
                {
                    this._parent.GmlPointSymbols.Add(gmlPointSymbolsCasted);
                }
                IGmlPolygonSymbol gmlPolygonSymbolsCasted = item.As <IGmlPolygonSymbol>();

                if ((gmlPolygonSymbolsCasted != null))
                {
                    this._parent.GmlPolygonSymbols.Add(gmlPolygonSymbolsCasted);
                }
                IGmlLineSymbol gmlLineSymbolsCasted = item.As <IGmlLineSymbol>();

                if ((gmlLineSymbolsCasted != null))
                {
                    this._parent.GmlLineSymbols.Add(gmlLineSymbolsCasted);
                }
                IGmlTextSymbol gmlTextSymbolsCasted = item.As <IGmlTextSymbol>();

                if ((gmlTextSymbolsCasted != null))
                {
                    this._parent.GmlTextSymbols.Add(gmlTextSymbolsCasted);
                }
                ICoordinateSystem coordinateSystemsCasted = item.As <ICoordinateSystem>();

                if ((coordinateSystemsCasted != null))
                {
                    this._parent.CoordinateSystems.Add(coordinateSystemsCasted);
                }
                IGmlObservation gmlObservatinsCasted = item.As <IGmlObservation>();

                if ((gmlObservatinsCasted != null))
                {
                    this._parent.GmlObservatins.Add(gmlObservatinsCasted);
                }
                IGmlSelector gmlSelectorsCasted = item.As <IGmlSelector>();

                if ((gmlSelectorsCasted != null))
                {
                    this._parent.GmlSelectors.Add(gmlSelectorsCasted);
                }
            }
Exemplo n.º 2
0
 /// <summary>
 /// Adds the given element to the collection
 /// </summary>
 /// <param name="item">The item to add</param>
 public override void Add(IModelElement item)
 {
     if ((this._parent.GmlObservation == null))
     {
         IGmlObservation gmlObservationCasted = item.As <IGmlObservation>();
         if ((gmlObservationCasted != null))
         {
             this._parent.GmlObservation = gmlObservationCasted;
             return;
         }
     }
     if ((this._parent.MeasurementValue == null))
     {
         IMeasurementValue measurementValueCasted = item.As <IMeasurementValue>();
         if ((measurementValueCasted != null))
         {
             this._parent.MeasurementValue = measurementValueCasted;
             return;
         }
     }
 }
Exemplo n.º 3
0
            /// <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)
            {
                IGmlRasterSymbol gmlRasterSymbolItem = item.As <IGmlRasterSymbol>();

                if (((gmlRasterSymbolItem != null) &&
                     this._parent.GmlRasterSymbols.Remove(gmlRasterSymbolItem)))
                {
                    return(true);
                }
                IDiagram diagramItem = item.As <IDiagram>();

                if (((diagramItem != null) &&
                     this._parent.Diagrams.Remove(diagramItem)))
                {
                    return(true);
                }
                IGmlPointSymbol gmlPointSymbolItem = item.As <IGmlPointSymbol>();

                if (((gmlPointSymbolItem != null) &&
                     this._parent.GmlPointSymbols.Remove(gmlPointSymbolItem)))
                {
                    return(true);
                }
                IGmlPolygonSymbol gmlPolygonSymbolItem = item.As <IGmlPolygonSymbol>();

                if (((gmlPolygonSymbolItem != null) &&
                     this._parent.GmlPolygonSymbols.Remove(gmlPolygonSymbolItem)))
                {
                    return(true);
                }
                IGmlLineSymbol gmlLineSymbolItem = item.As <IGmlLineSymbol>();

                if (((gmlLineSymbolItem != null) &&
                     this._parent.GmlLineSymbols.Remove(gmlLineSymbolItem)))
                {
                    return(true);
                }
                IGmlTextSymbol gmlTextSymbolItem = item.As <IGmlTextSymbol>();

                if (((gmlTextSymbolItem != null) &&
                     this._parent.GmlTextSymbols.Remove(gmlTextSymbolItem)))
                {
                    return(true);
                }
                ICoordinateSystem coordinateSystemItem = item.As <ICoordinateSystem>();

                if (((coordinateSystemItem != null) &&
                     this._parent.CoordinateSystems.Remove(coordinateSystemItem)))
                {
                    return(true);
                }
                IGmlObservation gmlObservationItem = item.As <IGmlObservation>();

                if (((gmlObservationItem != null) &&
                     this._parent.GmlObservatins.Remove(gmlObservationItem)))
                {
                    return(true);
                }
                IGmlSelector gmlSelectorItem = item.As <IGmlSelector>();

                if (((gmlSelectorItem != null) &&
                     this._parent.GmlSelectors.Remove(gmlSelectorItem)))
                {
                    return(true);
                }
                return(false);
            }