示例#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)
            {
                ILoadBid loadBidsCasted = item.As <ILoadBid>();

                if ((loadBidsCasted != null))
                {
                    this._parent.LoadBids.Add(loadBidsCasted);
                }
            }
示例#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)
            {
                ILoadBid loadBidItem = item.As <ILoadBid>();

                if (((loadBidItem != null) &&
                     this._parent.LoadBids.Remove(loadBidItem)))
                {
                    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)
            {
                if ((this._parent.LoadArea == null))
                {
                    ILoadGroup loadAreaCasted = item.As <ILoadGroup>();
                    if ((loadAreaCasted != null))
                    {
                        this._parent.LoadArea = loadAreaCasted;
                        return;
                    }
                }
                ILoadBid loadBidsCasted = item.As <ILoadBid>();

                if ((loadBidsCasted != null))
                {
                    this._parent.LoadBids.Add(loadBidsCasted);
                }
            }