private void Init(int modnr, string id) { ObjectIDs = new List <ObjectID>(); ObjectIDs.Add(new ObjectID(RGOBase.CalcID(modnr, id), ElementTypeEnum.Read)); RGObject = RGOBase.GetFromID(modnr, id); if (RGObject != null) { errorString = (ControlsHelper.RemoveSpaces(Error)).Split(','); onString = (ControlsHelper.RemoveSpaces(On)).Split(','); transitionString = (ControlsHelper.RemoveSpaces(Transition)).Split(','); if (Error != "" || On != "" || Transition != "") { IsStatusVariableString = true; } //add this element to the list of all elementrs so that the request and reply classes can be created for the RGOServices UpdatableControlCollector.AllControls.Add(this); //subscribe to the update delegate of the RGObject RGObject.Update += Update; Background = ControlsHelper.Transparent; } else { Background = ControlsHelper.ErrorColor; } }
public override void CopyValues(RGOBase newVal) { if (newVal == null || this == null) { return; } (this as dynamic)._Value = ((dynamic)newVal)._Value; }
public override void CopyValues(RGOBase newVal) { if (newVal == null || _Value == null) { return; } for (int i = 0; i < _Value.Length; i++) { _Value[i] = (newVal as dynamic)[i]; } }
public override void CopyValues(RGOBase newVal) { if (RunsOnServer) { if ((newVal as CMD).Args != "") { Command?.Invoke((newVal as CMD).Args); } } _CanExecute = ((CMD)newVal)._CanExecute; }
private void Init(int modnr, string id) { ObjectIDs = new List <ObjectID>(); ObjectIDs.Add(new ObjectID(RGOBase.CalcID(modnr, id), ElementTypeEnum.ReadWrite)); command = RGOBase.GetFromID(modnr, id) as CMD; if (command != null) { UpdatableControlCollector.AllControls.Add(this); command.Update += Update; } }
public override void CopyValues(RGOBase newVal) { if (newVal == null || this == null) { return; } //new EQP values must be acknowledged if ((this as dynamic)._Value != ((dynamic)newVal)._Value) { (this as dynamic)._Value = ((dynamic)newVal)._Value; MustSerialize = true; } }
private void Init(int modnr, string id) { ObjectIDs = new List <ObjectID>(); ObjectIDs.Add(new ObjectID(RGOBase.CalcID(modnr, id), ElementTypeEnum.ReadWrite)); stp = RGOBase.GetFromID(modnr, id) as EnumSTP; Options = stp.OptionsString.Split(','); ItemsSource = Options; if (stp != null) { UpdatableControlCollector.AllControls.Add(this); stp.Update += Update; } }
public override void CopyValues(RGOBase newVal) { NTF ntfTemp = newVal as dynamic; if (RunsOnServer) { _userReply = ntfTemp._userReply; _Acknowledged = ntfTemp._Acknowledged; } else //runs on GUI { _TimeStamp = ntfTemp._TimeStamp; _isRaised = ntfTemp._isRaised; _addedtext = ntfTemp.AddedText; } }
private void Init(int modnr, string id) { ObjectIDs = new List <ObjectID>(); ObjectIDs.Add(new ObjectID(RGOBase.CalcID(modnr, id), ElementTypeEnum.ReadWrite)); stp = RGOBase.GetFromID(modnr, id); if (MinEQPID != "") { MinEQP = RGOBase.GetFromID(RGOBase.CalcID(modnr, MinEQPID)); } if (MaxEQPID != "") { MaxEQP = RGOBase.GetFromID(RGOBase.CalcID(modnr, MaxEQPID)); } if (stp != null && stp.GetType().Name.Contains("STP")) { UpdatableControlCollector.AllControls.Add(this); stp.Update += Update; } }
public override void CopyValues(RGOBase newVal) { if (newVal == null || this == null) { return; } if (RunsOnServer) { _OverrideValue = (newVal as dynamic)._OverrideValue; _OverRide = _IsOverRidden = ((dynamic)newVal)._OverRide; _UseConvertFunction = ((dynamic)newVal)._UseConvertFunction; if (this is AI) { RawValue = _RawValue; } if (this is AO) { Value = _Value; } if (this is DI) { RawValue = _RawValue; } if (this is DO) { Value = _Value; } MustSerialize = true; } else { (this as dynamic)._Value = (newVal as dynamic)._Value; (this as dynamic)._RawValue = (newVal as dynamic)._RawValue; (this as dynamic)._IsValid = ((dynamic)newVal)._IsValid; (this as dynamic)._IsOverRidden = ((dynamic)newVal)._IsOverRidden; } }
/// <summary> /// Copy the relevant values from a deserialized object to the object in the AllRGO list with the same ID /// </summary> /// <param name="newVal"></param> public abstract void CopyValues(RGOBase newVal);
public override void CopyValues(RGOBase newVal) { base.CopyValues(newVal); }
public void DeleteRGORef(uint ID) { RGOBase.RemoveClientID(ID); }
public RGOClientConnection(uint ID) { RGOBase.AddClientID(ID); }