Beispiel #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.RegulatingControl == null))
                {
                    IRegulatingControl regulatingControlCasted = item.As <IRegulatingControl>();
                    if ((regulatingControlCasted != null))
                    {
                        this._parent.RegulatingControl = regulatingControlCasted;
                        return;
                    }
                }
                IVoltageControlZone voltageControlZonesCasted = item.As <IVoltageControlZone>();

                if ((voltageControlZonesCasted != null))
                {
                    this._parent.VoltageControlZones.Add(voltageControlZonesCasted);
                }
            }
Beispiel #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)
            {
                IControl controlsCasted = item.As <IControl>();

                if ((controlsCasted != null))
                {
                    this._parent.Controls.Add(controlsCasted);
                }
                if ((this._parent.RegulatingControl == null))
                {
                    IRegulatingControl regulatingControlCasted = item.As <IRegulatingControl>();
                    if ((regulatingControlCasted != null))
                    {
                        this._parent.RegulatingControl = regulatingControlCasted;
                        return;
                    }
                }
            }
Beispiel #3
0
 /// <summary>
 /// Creates a new observable property access proxy
 /// </summary>
 /// <param name="modelElement">The model instance element for which to create the property access proxy</param>
 public ModeProxy(IRegulatingControl modelElement) :
     base(modelElement, "mode")
 {
 }