コード例 #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)
            {
                if ((this._parent.Target == null))
                {
                    ILabware targetCasted = item.As <ILabware>();
                    if ((targetCasted != null))
                    {
                        this._parent.Target = targetCasted;
                        return;
                    }
                }
                ITipLiquidTransfer tipsCasted = item.As <ITipLiquidTransfer>();

                if ((tipsCasted != null))
                {
                    if ((this._parent.Tips.Count < 8))
                    {
                        this._parent.Tips.Add(tipsCasted);
                    }
                }
                if ((this._parent.Source == null))
                {
                    ILabware sourceCasted = item.As <ILabware>();
                    if ((sourceCasted != null))
                    {
                        this._parent.Source = sourceCasted;
                        return;
                    }
                }
            }
コード例 #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)
            {
                ITipLiquidTransfer tipLiquidTransferItem = item.As <ITipLiquidTransfer>();

                if (((tipLiquidTransferItem != null) &&
                     this._parent.Tips.Remove(tipLiquidTransferItem)))
                {
                    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)
            {
                ITipLiquidTransfer tipsCasted = item.As <ITipLiquidTransfer>();

                if ((tipsCasted != null))
                {
                    if ((this._parent.Tips.Count < 8))
                    {
                        this._parent.Tips.Add(tipsCasted);
                    }
                }
            }