public virtual void Serialize(object obj, Altaxo.Serialization.Xml.IXmlSerializationInfo info) { LinkedScaleCollection s = (LinkedScaleCollection)obj; info.CreateArray("Properties", s._linkedScales.Length); for (int i = 0; i < s._linkedScales.Length; ++i) { info.AddValue("e", s._linkedScales[i]); } info.CommitArray(); }
protected virtual LinkedScaleCollection SDeserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { LinkedScaleCollection s = null != o ? (LinkedScaleCollection)o : new LinkedScaleCollection(); int count = info.OpenArray("Properties"); s._linkedScales = new LinkedScale[count]; for (int i = 0; i < count; ++i) { s.SetLinkedScale((LinkedScale)info.GetValue("e", s), i); } info.CloseArray(count); return(s); }
public void CopyFrom(LinkedScaleCollection from) { if (_linkedScales != null) { for (int i = 0; i < _linkedScales.Length; ++i) { if (_linkedScales[i] != null) { _linkedScales[i].LinkPropertiesChanged -= new EventHandler(EhLinkPropertiesChanged); } _linkedScales[i] = null; } } _linkedScales = new LinkedScale[from._linkedScales.Length]; for (int i = 0; i < from._linkedScales.Length; i++) { _linkedScales[i] = from._linkedScales[i].Clone(); _linkedScales[i].LinkPropertiesChanged += new EventHandler(EhLinkPropertiesChanged); } OnChanged(); }
public void CopyFrom(LinkedScaleCollection from) { if (_linkedScales != null) { for (int i = 0; i < _linkedScales.Length; ++i) { if (_linkedScales[i] != null) _linkedScales[i].LinkPropertiesChanged -= new EventHandler(EhLinkPropertiesChanged); _linkedScales[i] = null; } } _linkedScales = new LinkedScale[from._linkedScales.Length]; for (int i = 0; i < from._linkedScales.Length; i++) { _linkedScales[i] = from._linkedScales[i].Clone(); _linkedScales[i].LinkPropertiesChanged += new EventHandler(EhLinkPropertiesChanged); } OnChanged(); }
public LinkedScaleCollection(LinkedScaleCollection from) { CopyFrom(from); }
public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { LinkedScaleCollection s = SDeserialize(o, info, parent); return(s); }