Beispiel #1
0
        public LinkedScale Clone()
        {
            var result = new LinkedScale();

            result.CopyFrom(this);
            return(result);
        }
Beispiel #2
0
            protected virtual LinkedScale SDeserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                LinkedScale s = null != o ? (LinkedScale)o : new LinkedScale();

                s.Scale     = (Scale)info.GetValue("Axis", s);
                s._isLinked = info.GetBoolean("Link");
                s._linkOrgA = info.GetDouble("OrgA");
                s._linkOrgB = info.GetDouble("OrgB");
                s._linkEndA = info.GetDouble("EndA");
                s._linkEndB = info.GetDouble("EndB");

                return(s);
            }
Beispiel #3
0
        private void CopyFrom(LinkedScale from)
        {
            if (object.ReferenceEquals(this, from))
            {
                return;
            }

            Scale     = from._scale == null ? null : (Scale)from._scale.Clone();
            _linkOrgA = from._linkOrgA;
            _linkOrgB = from._linkOrgB;
            _linkEndA = from._linkEndA;
            _linkEndB = from._linkEndB;
        }
Beispiel #4
0
        protected void SetLinkedScale(LinkedScale newvalue, int i)
        {
            LinkedScale oldvalue = _linkedScales[i];

            _linkedScales[i] = newvalue;

            if (!object.ReferenceEquals(oldvalue, newvalue))
            {
                if (null != oldvalue)
                {
                    oldvalue.LinkPropertiesChanged -= new EventHandler(EhLinkPropertiesChanged);
                }
                if (null != newvalue)
                {
                    newvalue.LinkPropertiesChanged += new EventHandler(EhLinkPropertiesChanged);
                }
            }
        }
Beispiel #5
0
		public LinkedScale Clone()
		{
			LinkedScale result = new LinkedScale();
			result.CopyFrom(this);
			return result;
		}
Beispiel #6
0
		private void CopyFrom(LinkedScale from)
		{
			if (object.ReferenceEquals(this, from))
				return;

			this.Scale = from._scale == null ? null : (Scale)from._scale.Clone();
			this._linkOrgA = from._linkOrgA;
			this._linkOrgB = from._linkOrgB;
			this._linkEndA = from._linkEndA;
			this._linkEndB = from._linkEndB;
		}
Beispiel #7
0
		protected void SetLinkedScale(LinkedScale newvalue, int i)
		{
			LinkedScale oldvalue = _linkedScales[i];
			_linkedScales[i] = newvalue;

			if (!object.ReferenceEquals(oldvalue, newvalue))
			{
				if (null != oldvalue)
					oldvalue.LinkPropertiesChanged -= new EventHandler(EhLinkPropertiesChanged);
				if (null != newvalue)
					newvalue.LinkPropertiesChanged += new EventHandler(EhLinkPropertiesChanged);
			}
		}
Beispiel #8
0
            public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                LinkedScale s = SDeserialize(o, info, parent);

                return(s);
            }