Пример #1
0
        public void CopyFrom(LinkedScaleCollection from)
        {
            if (object.ReferenceEquals(this, from))
            {
                return;
            }

            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);
            }

            EhSelfChanged(EventArgs.Empty);
        }
Пример #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);
            }
Пример #3
0
 public LinkedScaleCollection(LinkedScaleCollection from)
 {
     CopyFrom(from);
 }
Пример #4
0
            public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                LinkedScaleCollection s = SDeserialize(o, info, parent);

                return(s);
            }
Пример #5
0
		public void CopyFrom(LinkedScaleCollection from)
		{
			if (object.ReferenceEquals(this, from))
				return;

			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);
			}

			EhSelfChanged(EventArgs.Empty);
		}
Пример #6
0
		public LinkedScaleCollection(LinkedScaleCollection from)
		{
			CopyFrom(from);
		}