public void CopyFrom(ScatterPlotStyle from, bool suppressChangeEvent) { this._shape = from._shape; this._style = from._style; if (null == this._dropLine) { this._dropLine = new CSPlaneIDList(); } else { this._dropLine.Clear(); } this._dropLine.AddClonedRange(from._dropLine); this._pen = null == from._pen ? null : (PenX)from._pen.Clone(); this._independentColor = from._independentColor; this._independentSymbolSize = from._independentSymbolSize; this._symbolSize = from._symbolSize; this._relativePenWidth = from._relativePenWidth; this._skipFreq = from._skipFreq; this._cachedPath = null == from._cachedPath ? null : (GraphicsPath)from._cachedPath.Clone(); this._cachedFillPath = from._cachedFillPath; this._cachedFillBrush = null == from._cachedFillBrush ? null : (BrushX)from._cachedFillBrush.Clone(); this._parent = from._parent; if (!suppressChangeEvent) { OnChanged(); } }
protected virtual ScatterPlotStyle SDeserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { ScatterPlotStyle s = null != o ? (ScatterPlotStyle)o : new ScatterPlotStyle(); s._shape = (XYPlotScatterStyles.Shape)info.GetValue("Shape", typeof(XYPlotScatterStyles.Shape)); s._style = (XYPlotScatterStyles.Style)info.GetValue("Style", typeof(XYPlotScatterStyles.Style)); XYPlotScatterStyles.DropLine dropLine = (XYPlotScatterStyles.DropLine)info.GetValue("DropLine", typeof(XYPlotScatterStyles.DropLine)); s._pen = (PenX)info.GetValue("Pen", typeof(PenX)); s._symbolSize = info.GetSingle("SymbolSize"); s._relativePenWidth = info.GetSingle("RelativePenWidth"); if (0 != (dropLine & XYPlotScatterStyles.DropLine.Bottom)) { s._dropLine.Add(CSPlaneID.Bottom); } if (0 != (dropLine & XYPlotScatterStyles.DropLine.Top)) { s._dropLine.Add(CSPlaneID.Top); } if (0 != (dropLine & XYPlotScatterStyles.DropLine.Left)) { s._dropLine.Add(CSPlaneID.Left); } if (0 != (dropLine & XYPlotScatterStyles.DropLine.Right)) { s._dropLine.Add(CSPlaneID.Right); } return(s); }
public XYLineScatterPlotStyle(XYColumnPlotData pa) { this.m_LineStyle = new LinePlotStyle(); this.m_ScatterStyle = new ScatterPlotStyle(); // this.m_PlotAssociation = pa; this.m_LineSymbolGap = true; }
protected override ScatterPlotStyle SDeserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { ScatterPlotStyle s = base.SDeserialize(o, info, parent); s._independentColor = info.GetBoolean("IndependentColor"); s._independentSymbolSize = info.GetBoolean("IndependentSymbolSize"); s._skipFreq = info.GetInt32("SkipFreq"); return(s); }
public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { ScatterPlotStyle s = SDeserialize(o, info, parent); // restore the cached values s.SetCachedValues(); s.CreateEventChain(); return(s); }
/// <summary> /// Serializes A2DPlotScatterStyle Version 0. /// </summary> /// <param name="obj">The A2DPlotScatterStyle to serialize.</param> /// <param name="info">The serialization info.</param> /// <param name="context">The streaming context.</param> public void GetObjectData(object obj, System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { ScatterPlotStyle s = (ScatterPlotStyle)obj; info.AddValue("Shape", s._shape); info.AddValue("Style", s._style); info.AddValue("DropLine", s._dropLine); info.AddValue("Pen", s._pen); info.AddValue("SymbolSize", s._symbolSize); info.AddValue("RelativePenWidth", s._relativePenWidth); }
/// <summary> /// Deserializes the A2DPlotScatterStyle Version 0. /// </summary> /// <param name="obj">The empty A2DPlotScatterStyle object to deserialize into.</param> /// <param name="info">The serialization info.</param> /// <param name="context">The streaming context.</param> /// <param name="selector">The deserialization surrogate selector.</param> /// <returns>The deserialized A2DPlotScatterStyle.</returns> public object SetObjectData(object obj, System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context, System.Runtime.Serialization.ISurrogateSelector selector) { ScatterPlotStyle s = (ScatterPlotStyle)obj; s._shape = (XYPlotScatterStyles.Shape)info.GetValue("Shape", typeof(XYPlotScatterStyles.Shape)); s._style = (XYPlotScatterStyles.Style)info.GetValue("Style", typeof(XYPlotScatterStyles.Style)); s._dropLine = (CSPlaneIDList)info.GetValue("DropLine", typeof(List <CSPlaneID>)); s._pen = (PenX)info.GetValue("Pen", typeof(PenX)); s._symbolSize = info.GetSingle("SymbolSize"); s._relativePenWidth = info.GetSingle("RelativePenWidth"); return(s); }
public XYLineScatterPlotStyle(LineScatterPlotStyleKind kind) { if (0 != (kind & LineScatterPlotStyleKind.Line)) { this.m_LineStyle = new LinePlotStyle(); } if (0 != (kind & LineScatterPlotStyleKind.Scatter)) { this.m_ScatterStyle = new ScatterPlotStyle(); } this.m_LineSymbolGap = kind == LineScatterPlotStyleKind.LineAndScatter; }
public virtual void Serialize(object obj, Altaxo.Serialization.Xml.IXmlSerializationInfo info) { ScatterPlotStyle s = (ScatterPlotStyle)obj; info.AddValue("Shape", s._shape); info.AddValue("Style", s._style); info.AddValue("DropLine", s._dropLine); info.AddValue("Pen", s._pen); info.AddValue("SymbolSize", s._symbolSize); info.AddValue("RelativePenWidth", s._relativePenWidth); info.AddValue("IndependentColor", s._independentColor); info.AddValue("IndependentSymbolSize", s._independentSymbolSize); info.AddValue("SkipFreq", s._skipFreq); }
protected virtual ScatterPlotStyle SDeserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { ScatterPlotStyle s = null != o ? (ScatterPlotStyle)o : new ScatterPlotStyle(); s._shape = (XYPlotScatterStyles.Shape)info.GetValue("Shape", s); s._style = (XYPlotScatterStyles.Style)info.GetValue("Style", s); s._dropLine = (CSPlaneIDList)info.GetValue("DropLine", s); s._pen = (PenX)info.GetValue("Pen", s); s._symbolSize = info.GetSingle("SymbolSize"); s._relativePenWidth = info.GetSingle("RelativePenWidth"); s._independentColor = info.GetBoolean("IndependentColor"); s._independentSymbolSize = info.GetBoolean("IndependentSymbolSize"); s._skipFreq = info.GetInt32("SkipFreq"); return(s); }
public XYLineScatterPlotStyle(Altaxo.Serialization.Xml.IXmlDeserializationInfo info) { var kind = LineScatterPlotStyleKind.LineAndScatter; if (0 != (kind & LineScatterPlotStyleKind.Line)) { m_LineStyle = new LinePlotStyle(info, oldDeserializationRequiresFullConstruction: true); } if (0 != (kind & LineScatterPlotStyleKind.Scatter)) { m_ScatterStyle = new ScatterPlotStyle(info, oldDeserializationRequiresFullConstruction: true); } m_LineSymbolGap = kind == LineScatterPlotStyleKind.LineAndScatter; }
/// <inheritdoc/> public void CopyFrom(ScatterPlotStyle from, Main.EventFiring eventFiring) { if (object.ReferenceEquals(this, from)) { return; } using (var suspendToken = SuspendGetToken()) { _independentSkipFreq = from._independentSkipFreq; _skipFreq = from._skipFreq; _ignoreMissingDataPoints = from._ignoreMissingDataPoints; _independentOnShiftingGroupStyles = from._independentOnShiftingGroupStyles; _independentScatterSymbol = from._independentScatterSymbol; _scatterSymbol = from._scatterSymbol; _independentSymbolSize = from._independentSymbolSize; _symbolSize = from._symbolSize; _independentColor = from._independentColor; _color = from._color; _overrideFrame = from._overrideFrame; _overriddenFrame = from._overriddenFrame; _overrideInset = from._overrideInset; _overriddenInset = from._overriddenInset; _overrideStructureWidthOffset = from._overrideStructureWidthOffset; _overrideStructureWidthFactor = from._overrideStructureWidthFactor; _overridePlotColorInfluence = from._overridePlotColorInfluence; _overrideFillColor = from._overrideFillColor; _overrideFrameColor = from._overrideFrameColor; _overrideInsetColor = from._overrideInsetColor; EhSelfChanged(EventArgs.Empty); suspendToken.Resume(eventFiring); } }
public ScatterPlotStyle(ScatterPlotStyle from) { CopyFrom(from, true); CreateEventChain(); }
public void CopyFrom(ScatterPlotStyle from, bool suppressChangeEvent) { this._shape = from._shape; this._style = from._style; if(null==this._dropLine) this._dropLine = new CSPlaneIDList(); else this._dropLine.Clear(); this._dropLine.AddClonedRange(from._dropLine); this._pen = null == from._pen ? null : (PenX)from._pen.Clone(); this._independentColor = from._independentColor; this._independentSymbolSize = from._independentSymbolSize; this._symbolSize = from._symbolSize; this._relativePenWidth = from._relativePenWidth; this._skipFreq = from._skipFreq; this._cachedPath = null == from._cachedPath ? null : (GraphicsPath)from._cachedPath.Clone(); this._cachedFillPath = from._cachedFillPath; this._cachedFillBrush = null == from._cachedFillBrush ? null : (BrushX)from._cachedFillBrush.Clone(); this._parent = from._parent; if (!suppressChangeEvent) OnChanged(); }
void InitializeStyles() { // Clear the previous controller cache _additionalPlotStyle = null; if (_combinedScatterLineGroupController != null) { _combinedScatterLineGroupController.ChildControlChanged -= EhView_ActiveChildControlChanged; _combinedScatterLineGroupController = null; } _styleControllerList.Clear(); // start to create new controllers if (_tempdoc.Style.Count > 0) { bool addHelperStyle = NeedsHelperStyle(); bool useCombinedTab = UseCombinedScatterLineGroupTab(); if (useCombinedTab) { List<ControlViewElement> combList = new List<ControlViewElement>(); // create the controllers IMVCANController ct1 = GetStyleController(_tempdoc.Style[0]); _styleControllerList.Add(ct1); if (addHelperStyle) { IPlotArea layer = Main.DocumentPath.GetRootNodeImplementing<IPlotArea>(_doc); // add either line or scatter if (_tempdoc.Style[0] is LinePlotStyle) { ScatterPlotStyle scatterStyle = new ScatterPlotStyle(); scatterStyle.ParentObject = _tempdoc.Style; _tempdoc.Style.PrepareNewSubStyle(scatterStyle, layer, _doc.GetRangesAndPoints(layer)); _additionalPlotStyle = scatterStyle; scatterStyle.Shape = Altaxo.Graph.Gdi.Plot.Styles.XYPlotScatterStyles.Shape.NoSymbol; _additionalPlotStyleController = GetStyleController( _additionalPlotStyle); combList.Add(new ControlViewElement("Symbol", _additionalPlotStyleController)); combList.Add(new ControlViewElement("Line", ct1)); } else { LinePlotStyle lineStyle = new LinePlotStyle(); lineStyle.ParentObject = _tempdoc.Style; _tempdoc.Style.PrepareNewSubStyle(lineStyle, layer, _doc.GetRangesAndPoints(layer)); _additionalPlotStyle = lineStyle; lineStyle.Connection = Altaxo.Graph.Gdi.Plot.Styles.XYPlotLineStyles.ConnectionStyle.NoLine; _additionalPlotStyleController = GetStyleController( _additionalPlotStyle ); combList.Add(new ControlViewElement("Symbol", ct1)); combList.Add(new ControlViewElement("Line", _additionalPlotStyleController)); } } else // no helper style, i.e. second style is line style { // create the controllers IMVCANController ct2 = GetStyleController( _tempdoc.Style[1] ); _styleControllerList.Add(ct2); combList.Add(new ControlViewElement("Symbol", ct1)); combList.Add(new ControlViewElement("Line", ct2)); } combList.Add(new ControlViewElement(string.Empty, this, this._plotGroupView)); _combinedScatterLineGroupController = new Common.MultiChildController(combList.ToArray(), true); Current.Gui.FindAndAttachControlTo(_combinedScatterLineGroupController); string title; if(null!=_additionalPlotStyle) title = string.Format("#{0}:{1}", 1, Current.Gui.GetUserFriendlyClassName(_tempdoc.Style[0].GetType())); else title = "#1&&2:Symbol&&Line"; AddTab(title, _combinedScatterLineGroupController, _combinedScatterLineGroupController.ViewObject); _combinedScatterLineGroupController.ChildControlChanged += this.EhView_ActiveChildControlChanged; } // if use CombinedTab // now the remaining styles int start = useCombinedTab ? (addHelperStyle ? 1 : 2) : 0; for (int i = start; i < _tempdoc.Style.Count; i++) { IMVCANController ctrl = GetStyleController( _tempdoc.Style[i] ); _styleControllerList.Add(ctrl); string title = string.Format("#{0}:{1}", (i + 1),Current.Gui.GetUserFriendlyClassName(_tempdoc.Style[i].GetType())); AddTab(title, ctrl, ctrl != null ? ctrl.ViewObject : null); } } base.SetElements(false); }
public ScatterPlotStyle(ScatterPlotStyle from) { CopyFrom(from, Main.EventFiring.Suppressed); }
/// <inheritdoc/> public void CopyFrom(ScatterPlotStyle from, Main.EventFiring eventFiring) { if (object.ReferenceEquals(this, from)) return; using (var suspendToken = SuspendGetToken()) { this._independentSkipFreq = from._independentSkipFreq; this._skipFreq = from._skipFreq; this._ignoreMissingDataPoints = from._ignoreMissingDataPoints; this._independentOnShiftingGroupStyles = from._independentOnShiftingGroupStyles; this._independentScatterSymbol = from._independentScatterSymbol; this._scatterSymbol = from._scatterSymbol; this._independentSymbolSize = from._independentSymbolSize; this._symbolSize = from._symbolSize; this._independentColor = from._independentColor; this._color = from._color; this._overrideFrame = from._overrideFrame; this._overriddenFrame = from._overriddenFrame; this._overrideInset = from._overrideInset; this._overriddenInset = from._overriddenInset; this._overrideStructureWidthOffset = from._overrideStructureWidthOffset; this._overrideStructureWidthFactor = from._overrideStructureWidthFactor; this._overridePlotColorInfluence = from._overridePlotColorInfluence; this._overrideFillColor = from._overrideFillColor; this._overrideFrameColor = from._overrideFrameColor; this._overrideInsetColor = from._overrideInsetColor; EhSelfChanged(EventArgs.Empty); suspendToken.Resume(eventFiring); } }
public XYPlotScatterStyleController(ScatterPlotStyle doc) { if (doc == null) throw new ArgumentNullException("doc is null"); if (!InitializeDocument(doc)) throw new ApplicationException("Programming error"); }
public XYLineScatterPlotStyle(LineScatterPlotStyleKind kind) { if(0!=(kind&LineScatterPlotStyleKind.Line)) this.m_LineStyle = new LinePlotStyle(); if(0!=(kind&LineScatterPlotStyleKind.Scatter)) this.m_ScatterStyle = new ScatterPlotStyle(); this.m_LineSymbolGap = kind==LineScatterPlotStyleKind.LineAndScatter; }
public bool InitializeDocument(params object[] args) { if (args.Length == 0 || !(args[0] is ScatterPlotStyle)) return false; bool isFirstTime = (null == _doc); _doc = (ScatterPlotStyle)args[0]; _tempDoc = _useDocumentCopy == UseDocument.Directly ? _doc : (ScatterPlotStyle)_doc.Clone(); Initialize(isFirstTime); return true; }
public XYLineScatterPlotStyle(Altaxo.Serialization.Xml.IXmlDeserializationInfo info) { var kind = LineScatterPlotStyleKind.LineAndScatter; if (0 != (kind & LineScatterPlotStyleKind.Line)) this.m_LineStyle = new LinePlotStyle(info, oldDeserializationRequiresFullConstruction: true); if (0 != (kind & LineScatterPlotStyleKind.Scatter)) this.m_ScatterStyle = new ScatterPlotStyle(info, oldDeserializationRequiresFullConstruction: true); this.m_LineSymbolGap = kind == LineScatterPlotStyleKind.LineAndScatter; }