Пример #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)
            {
                IGmlFeatureStyle gmlFeatureStylesCasted = item.As <IGmlFeatureStyle>();

                if ((gmlFeatureStylesCasted != null))
                {
                    this._parent.GmlFeatureStyles.Add(gmlFeatureStylesCasted);
                }
            }
Пример #2
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)
            {
                IGmlFeatureStyle gmlFeatureStyleItem = item.As <IGmlFeatureStyle>();

                if (((gmlFeatureStyleItem != null) &&
                     this._parent.GmlFeatureStyles.Remove(gmlFeatureStyleItem)))
                {
                    return(true);
                }
                return(false);
            }
Пример #3
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                IGmlFeatureStyle gmlFeatureStylesCasted = item.As <IGmlFeatureStyle>();

                if ((gmlFeatureStylesCasted != null))
                {
                    this._parent.GmlFeatureStyles.Add(gmlFeatureStylesCasted);
                }
                if ((this._parent.GmlBaseSymbol == null))
                {
                    IGmlBaseSymbol gmlBaseSymbolCasted = item.As <IGmlBaseSymbol>();
                    if ((gmlBaseSymbolCasted != null))
                    {
                        this._parent.GmlBaseSymbol = gmlBaseSymbolCasted;
                        return;
                    }
                }
            }
Пример #4
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.GmlLableStyle == null))
     {
         IGmlLabelStyle gmlLableStyleCasted = item.As <IGmlLabelStyle>();
         if ((gmlLableStyleCasted != null))
         {
             this._parent.GmlLableStyle = gmlLableStyleCasted;
             return;
         }
     }
     if ((this._parent.GmlFeatureStyle == null))
     {
         IGmlFeatureStyle gmlFeatureStyleCasted = item.As <IGmlFeatureStyle>();
         if ((gmlFeatureStyleCasted != null))
         {
             this._parent.GmlFeatureStyle = gmlFeatureStyleCasted;
             return;
         }
     }
 }
Пример #5
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.GmlFeatureStyle == null))
                {
                    IGmlFeatureStyle gmlFeatureStyleCasted = item.As <IGmlFeatureStyle>();
                    if ((gmlFeatureStyleCasted != null))
                    {
                        this._parent.GmlFeatureStyle = gmlFeatureStyleCasted;
                        return;
                    }
                }
                IGmlGeometryStyle gmlGeometryStylesCasted = item.As <IGmlGeometryStyle>();

                if ((gmlGeometryStylesCasted != null))
                {
                    this._parent.GmlGeometryStyles.Add(gmlGeometryStylesCasted);
                }
                IGmlTopologyStyle gmlTopologyStylesCasted = item.As <IGmlTopologyStyle>();

                if ((gmlTopologyStylesCasted != null))
                {
                    this._parent.GmlTopologyStyles.Add(gmlTopologyStylesCasted);
                }
            }