public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { XYZMeshedColumnPlotData s = null != o ? (XYZMeshedColumnPlotData)o : new XYZMeshedColumnPlotData(); var _xColumn = (IReadableColumnProxy)info.GetValue("XColumn", s); var _yColumn = (IReadableColumnProxy)info.GetValue("YColumn", s); int count = info.OpenArray(); var _dataColumns = new IReadableColumnProxy[count]; for (int i = 0; i < count; i++) { _dataColumns[i] = (IReadableColumnProxy)info.GetValue("e", s); } info.CloseArray(count); #pragma warning disable 618 s._matrixProxy = new DataTableMatrixProxy(_xColumn, _yColumn, _dataColumns); #pragma warning restore 618 s._xBoundaries = (IPhysicalBoundaries)info.GetValue("XBoundaries", s); s._yBoundaries = (IPhysicalBoundaries)info.GetValue("YBoundaries", s); s._vBoundaries = (IPhysicalBoundaries)info.GetValue("VBoundaries", s); s._matrixProxy.ParentObject = s; s._xBoundaries.ParentObject = s; s._yBoundaries.ParentObject = s; s._vBoundaries.ParentObject = s; s._isCachedDataValid = false; return(s); }
protected override IEnumerable <DocumentNodeAndName> GetDocumentNodeChildrenWithName() { if (null != _columnProxy) { yield return(new DocumentNodeAndName(_columnProxy, () => _columnProxy = null, "Column")); } }
/// <summary> /// Sets the data column proxy and creates the necessary event links. /// </summary> /// <param name="proxy"></param> protected void InternalSetDataColumnProxy(IReadableColumnProxy proxy) { if (ChildSetMember(ref _dataColumnProxy, proxy)) { EhChildChanged(_dataColumnProxy, EventArgs.Empty); } }
public RangeOfNumericalValues() { _lowerValue = 0; _isLowerInclusive = true; _upperValue = 1; _isUpperInclusive = true; _columnProxy = null; }
/// <summary> /// Adds a data column proxy to the data column collection without cloning it (i.e. the proxy is directly added). /// </summary> /// <param name="info">The bundle to which to add the column proxy.</param> /// <param name="proxy">The proxy.</param> private void InternalAddDataColumnNoClone(ColumnBundleInfo info, IReadableColumnProxy proxy) { if (null != proxy) { info.DataColumns.Add(proxy); proxy.ParentObject = this; } }
public RangeOfNumericalValues() { _lowerValue = 0; _isLowerInclusive = true; _upperValue = 1; _isUpperInclusive = true; _columnProxy = null; }
public void EhDeserializationFinished(Altaxo.Serialization.Xml.IXmlDeserializationInfo info, Main.IDocumentNode documentRoot, bool isFinallyCall) { bool bAllResolved = true; if (_xColumnPath != null) { object xColumn = Main.AbsoluteDocumentPath.GetObject(_xColumnPath, _plotAssociation, documentRoot); bAllResolved &= (null != xColumn); if (xColumn is Altaxo.Data.INumericColumn) { _xColumnPath = null; _xColumnProxy = ReadableColumnProxyBase.FromColumn((Altaxo.Data.INumericColumn)xColumn); } } if (_yColumnPath != null) { object yColumn = Main.AbsoluteDocumentPath.GetObject(_yColumnPath, _plotAssociation, documentRoot); bAllResolved &= (null != yColumn); if (yColumn is Altaxo.Data.INumericColumn) { _yColumnPath = null; _yColumnProxy = ReadableColumnProxyBase.FromColumn((Altaxo.Data.INumericColumn)yColumn); } } for (int i = 0; i < _vColumnPaths.Length; i++) { if (_vColumnPaths[i] != null) { object vColumn = Main.AbsoluteDocumentPath.GetObject(_vColumnPaths[i], _plotAssociation, documentRoot); bAllResolved &= (null != vColumn); if (vColumn is Altaxo.Data.IReadableColumn) { _vColumnPaths[i] = null; _vColumnProxies[i] = ReadableColumnProxyBase.FromColumn((Altaxo.Data.IReadableColumn)vColumn); } } } if (bAllResolved || isFinallyCall) { info.DeserializationFinished -= new Altaxo.Serialization.Xml.XmlDeserializationCallbackEventHandler(EhDeserializationFinished); #pragma warning disable 618 _plotAssociation._matrixProxy = new DataTableMatrixProxy(_xColumnProxy, _yColumnProxy, _vColumnProxies) { ParentObject = _plotAssociation }; #pragma warning restore 618 } }
private DataColumn GetColumnInOtherTable(DataTable table, int groupNumber, IReadableColumnProxy proxyTemplate) { var oldColumn = (DataColumn)proxyTemplate.Document; if (null != oldColumn) { // first by name, then by position var parentColl = DataColumnCollection.GetParentDataColumnCollectionOf(oldColumn); var oldName = parentColl.GetColumnName(oldColumn); var oldPos = parentColl.GetColumnNumber(oldColumn); DataColumn newCol = null; if (table.DataColumns.ContainsColumn(oldName)) { newCol = table.DataColumns[oldName]; } else if (oldPos < table.DataColumns.ColumnCount) { newCol = table.DataColumns[oldPos]; } if (null != newCol && table.DataColumns.GetColumnGroup(newCol) == groupNumber) { return(newCol); } } else // no document available, try it with the path name { var documentPath = proxyTemplate.DocumentPath; var oldName = documentPath.LastPart; DataColumn newCol = null; if (table.DataColumns.ContainsColumn(oldName)) { newCol = table.DataColumns[oldName]; } if (null != newCol && table.DataColumns.GetColumnGroup(newCol) == groupNumber) { return(newCol); } } return(null); }
protected override IEnumerable<DocumentNodeAndName> GetDocumentNodeChildrenWithName() { if (null != _columnProxy) yield return new DocumentNodeAndName(_columnProxy, () => _columnProxy = null, "Column"); }
private void InternalReallocIndependentVariables(int noIndep) { var oldArr = this._independentVariables; var newArr = new IReadableColumnProxy[noIndep]; for (int i = Math.Min(newArr.Length, oldArr.Length) - 1; i >= 0; i--) newArr[i] = oldArr[i]; this._independentVariables = newArr; }
/// <summary> /// Adds a data column proxy to the data column collection without cloning it (i.e. the proxy is directly added). /// </summary> /// <param name="info">The bundle to which to add the column proxy.</param> /// <param name="proxy">The proxy.</param> private void InternalAddDataColumnNoClone(ColumnBundleInfo info, IReadableColumnProxy proxy) { if (null != proxy) { info.DataColumns.Add(proxy); proxy.ParentObject = this; } }
/// <summary> /// Deserialization constructor. Initializes a new instance of the <see cref="RangeOfNumericalValues"/> class. /// </summary> /// <param name="info">The deserialization information.</param> /// <param name="lower">The lower.</param> /// <param name="isLowerInclusive">if set to <c>true</c> [is lower inclusive].</param> /// <param name="upper">The upper.</param> /// <param name="isUpperInclusive">if set to <c>true</c> [is upper inclusive].</param> /// <param name="columnProxy">The column.</param> protected RangeOfNumericalValues(Altaxo.Serialization.Xml.IXmlDeserializationInfo info, double lower, bool isLowerInclusive, double upper, bool isUpperInclusive, IReadableColumnProxy columnProxy) { _lowerValue = lower; _isLowerInclusive = isLowerInclusive; _upperValue = upper; _isUpperInclusive = isUpperInclusive; ChildSetMember(ref _columnProxy, columnProxy); }
/// <summary> /// Sets the data column proxy and creates the necessary event links. /// </summary> /// <param name="proxy"></param> protected void InternalSetDataColumnProxy(IReadableColumnProxy proxy) { if (ChildSetMember(ref _dataColumnProxy, proxy)) EhChildChanged(_dataColumnProxy, EventArgs.Empty); }
public IncludeSingleTextValue() { _value = string.Empty; _columnProxy = null; }
/// <summary> /// Deserialization constructor /// </summary> /// <param name="info">The information.</param> public ErrorBarYPlotStyle(Altaxo.Serialization.Xml.IXmlDeserializationInfo info, IReadableColumnProxy posErrorColumn, IReadableColumnProxy negErrorColumn) : base(info, posErrorColumn, negErrorColumn) { }
/// <summary> /// Deserialization constructor. Initializes a new instance of the <see cref="IncludeSingleNumericalValue"/> class. /// </summary> /// <param name="info">The deserialization information.</param> /// <param name="value">The numerical value.</param> /// <param name="columnProxy">The column.</param> protected IncludeSingleNumericalValue(Altaxo.Serialization.Xml.IXmlDeserializationInfo info, double value, IReadableColumnProxy columnProxy) { _value = value; ChildSetMember(ref _columnProxy, columnProxy); }
/// <summary> /// Deserialization constructor. Initializes a new instance of the <see cref="IncludeTextContains"/> class. /// </summary> /// <param name="info">The deserialization information.</param> /// <param name="value">The numerical value.</param> /// <param name="ignoreCase">If true, string comparison is done case-insensitive.</param> /// <param name="columnProxy">The column.</param> protected IncludeTextContains(Altaxo.Serialization.Xml.IXmlDeserializationInfo info, string value, bool ignoreCase, IReadableColumnProxy columnProxy) { _value = value; _ignoreCase = ignoreCase; ChildSetMember(ref _columnProxy, columnProxy); }
protected ErrorBarPlotStyle(Altaxo.Serialization.Xml.IXmlDeserializationInfo info, IReadableColumnProxy posColumnProxy, IReadableColumnProxy negColumnProxy) { ChildSetMember(ref _positiveErrorColumn, posColumnProxy); ChildSetMember(ref _negativeErrorColumn, negColumnProxy); _useCommonErrorColumn = null == negColumnProxy; }
public void EhDeserializationFinished(Altaxo.Serialization.Xml.IXmlDeserializationInfo info, Main.IDocumentNode documentRoot, bool isFinallyCall) { bool bAllResolved = true; if (this._xColumnPath != null) { object xColumn = Main.AbsoluteDocumentPath.GetObject(this._xColumnPath, this._plotAssociation, documentRoot); bAllResolved &= (null != xColumn); if (xColumn is Altaxo.Data.INumericColumn) { this._xColumnPath = null; this._xColumnProxy = ReadableColumnProxyBase.FromColumn((Altaxo.Data.INumericColumn)xColumn); } } if (this._yColumnPath != null) { object yColumn = Main.AbsoluteDocumentPath.GetObject(this._yColumnPath, this._plotAssociation, documentRoot); bAllResolved &= (null != yColumn); if (yColumn is Altaxo.Data.INumericColumn) { this._yColumnPath = null; this._yColumnProxy = ReadableColumnProxyBase.FromColumn((Altaxo.Data.INumericColumn)yColumn); } } for (int i = 0; i < this._vColumnPaths.Length; i++) { if (this._vColumnPaths[i] != null) { object vColumn = Main.AbsoluteDocumentPath.GetObject(this._vColumnPaths[i], this._plotAssociation, documentRoot); bAllResolved &= (null != vColumn); if (vColumn is Altaxo.Data.IReadableColumn) { this._vColumnPaths[i] = null; this._vColumnProxies[i] = ReadableColumnProxyBase.FromColumn((Altaxo.Data.IReadableColumn)vColumn); } } } if (bAllResolved || isFinallyCall) { info.DeserializationFinished -= new Altaxo.Serialization.Xml.XmlDeserializationCallbackEventHandler(this.EhDeserializationFinished); #pragma warning disable 618 _plotAssociation._matrixProxy = new DataTableMatrixProxy(_xColumnProxy, _yColumnProxy, _vColumnProxies) { ParentObject = _plotAssociation }; #pragma warning restore 618 } }
/// <summary> /// Sets the data column proxy and creates the necessary event links. /// </summary> /// <param name="proxy"></param> protected void InternalSetDataColumnProxy(IReadableColumnProxy proxy) { ChildSetMember(ref _dataColumnProxy, proxy); }
public IncludeTextStartsWith() { _value = string.Empty; _columnProxy = null; }
public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { XYZMeshedColumnPlotData s = null != o ? (XYZMeshedColumnPlotData)o : new XYZMeshedColumnPlotData(); var _xColumn = (IReadableColumnProxy)info.GetValue("XColumn", s); var _yColumn = (IReadableColumnProxy)info.GetValue("YColumn", s); int count = info.OpenArray(); var _dataColumns = new IReadableColumnProxy[count]; for (int i = 0; i < count; i++) { _dataColumns[i] = (IReadableColumnProxy)info.GetValue("e", s); } info.CloseArray(count); #pragma warning disable 618 s._matrixProxy = new DataTableMatrixProxy(_xColumn, _yColumn, _dataColumns); #pragma warning restore 618 s._xBoundaries = (IPhysicalBoundaries)info.GetValue("XBoundaries", s); s._yBoundaries = (IPhysicalBoundaries)info.GetValue("YBoundaries", s); s._vBoundaries = (IPhysicalBoundaries)info.GetValue("VBoundaries", s); s._matrixProxy.ParentObject = s; s._xBoundaries.ParentObject = s; s._yBoundaries.ParentObject = s; s._vBoundaries.ParentObject = s; s._isCachedDataValid = false; return s; }
private void InternalReallocDependentVariables(int noDep) { { var oldArr = this._dependentVariables; var newArr = new IReadableColumnProxy[noDep]; for (int i = Math.Min(newArr.Length, oldArr.Length) - 1; i >= 0; i--) newArr[i] = oldArr[i]; this._dependentVariables = newArr; } { // do the same also with the error scaling IVarianceScaling[] oldArr = _errorEvaluation; IVarianceScaling[] newArr = new IVarianceScaling[noDep]; for (int i = Math.Min(newArr.Length, oldArr.Length) - 1; i >= 0; i--) newArr[i] = oldArr[i]; this._errorEvaluation = newArr; } }
public IncludeTextContains() { _value = string.Empty; _columnProxy = null; }
public IncludeSingleNumericalValue() { _value = 0; _columnProxy = null; }
/// <summary> /// Sets the data column proxy and creates the necessary event links. /// </summary> /// <param name="proxy"></param> protected void InternalSetDataColumnProxy(IReadableColumnProxy proxy) { ChildSetMember(ref _dataColumnProxy, proxy); }
/// <summary> /// Deserialization constructor. Initializes a new instance of the <see cref="RangeOfNumericalValues"/> class. /// </summary> /// <param name="info">The deserialization information.</param> /// <param name="lower">The lower.</param> /// <param name="isLowerInclusive">if set to <c>true</c> [is lower inclusive].</param> /// <param name="upper">The upper.</param> /// <param name="isUpperInclusive">if set to <c>true</c> [is upper inclusive].</param> /// <param name="columnProxy">The column.</param> protected RangeOfNumericalValues(Altaxo.Serialization.Xml.IXmlDeserializationInfo info, double lower, bool isLowerInclusive, double upper, bool isUpperInclusive, IReadableColumnProxy columnProxy) { _lowerValue = lower; _isLowerInclusive = isLowerInclusive; _upperValue = upper; _isUpperInclusive = isUpperInclusive; ChildSetMember(ref _columnProxy, columnProxy); }