public static void PrepareStyle( IPlotGroupStyleCollection externalGroups, IPlotGroupStyleCollection localGroups, Getter getter) { if (!externalGroups.ContainsType(typeof(DashPatternGroupStyle)) && null != localGroups && !localGroups.ContainsType(typeof(DashPatternGroupStyle))) { localGroups.Add(new DashPatternGroupStyle()); } DashPatternGroupStyle grpStyle = null; if (externalGroups.ContainsType(typeof(DashPatternGroupStyle))) { grpStyle = (DashPatternGroupStyle)externalGroups.GetPlotGroupStyle(typeof(DashPatternGroupStyle)); } else if (localGroups != null) { grpStyle = (DashPatternGroupStyle)localGroups.GetPlotGroupStyle(typeof(DashPatternGroupStyle)); } if (grpStyle != null && getter != null && !grpStyle.IsInitialized) { grpStyle.Initialize(getter()); } }
public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { DashPatternGroupStyle s = null != o ? (DashPatternGroupStyle)o : new DashPatternGroupStyle(); s._isStepEnabled = info.GetBoolean("StepEnabled"); s._listOfValues = DashPatternListManager.Instance.BuiltinDefault; s.SetValueCoercedToGroup(DashPatternListManager.Instance.BuiltinDefault[0]); return(s); }
public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { DashPatternGroupStyle s = null != o ? (DashPatternGroupStyle)o : new DashPatternGroupStyle(); s._isStepEnabled = info.GetBoolean("StepEnabled"); var value = (IDashPattern)info.GetValue("Value", s); var listOfValues = (DashPatternList)info.GetValue("ListOfValues", s); DashPatternListManager.Instance.TryRegisterList(listOfValues, Main.ItemDefinitionLevel.Project, out var registeredList); s._listOfValues = registeredList; s.SetValueCoercedToGroup(value); return(s); }
public static void ApplyStyle( IPlotGroupStyleCollection externalGroups, IPlotGroupStyleCollection localGroups, Setter setter) { DashPatternGroupStyle grpStyle = null; IPlotGroupStyleCollection grpColl = null; if (externalGroups.ContainsType(typeof(DashPatternGroupStyle))) { grpColl = externalGroups; } else if (localGroups != null && localGroups.ContainsType(typeof(DashPatternGroupStyle))) { grpColl = localGroups; } if (null != grpColl) { grpStyle = (DashPatternGroupStyle)grpColl.GetPlotGroupStyle(typeof(DashPatternGroupStyle)); grpColl.OnBeforeApplication(typeof(DashPatternGroupStyle)); setter(grpStyle.DashStyle); } }
public DashPatternGroupStyle(DashPatternGroupStyle from) { _isStepEnabled = from._isStepEnabled; _value = from._value; _listOfValues = from._listOfValues; }
public DashPatternGroupStyle(DashPatternGroupStyle from) { this._isStepEnabled = from._isStepEnabled; this._value = from._value; this._listOfValues = from._listOfValues; }