Esempio n. 1
0
            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();
            }
Esempio n. 2
0
            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);
            }
Esempio n. 3
0
        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);
 }
Esempio n. 6
0
            public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                LinkedScaleCollection s = SDeserialize(o, info, parent);

                return(s);
            }
Esempio n. 7
0
 public LinkedScaleCollection(LinkedScaleCollection from)
 {
     CopyFrom(from);
 }