public void CombineDimensionData(SampleCurve otherCurve, List <GroupParam> groupParams) { if (otherCurve == null || groupParams == null) { return; } if (SampleCurveData == null || groupParams.Count == 0) { return; } DimensionDataPoint otherCurveData = otherCurve.SampleCurveData; otherCurveData.AddGroupParams(groupParams); DimensionDataPoint last = null; DimensionDataPoint current = SampleCurveData; while (current != null) { if (current.IsGroupParamTypeEqual(groupParams)) { if (last != null) { last.DimensionDataList.Add(otherCurveData); return; } else { DimensionDataPoint newList = new DimensionDataPoint(); newList.DimensionDataList.Add(SampleCurveData); newList.DimensionDataList.Add(otherCurveData); SampleCurveData = newList; return; } } else { last = current; if (current.IsScannedData) { current = null; } else { current = current.DimensionDataList[0]; } } } }
public void AddCurve(SampleCurve sampleCurve) { if (_curves != null) { foreach (SampleCurve curve in _curves) { if (curve.CurveName.Equals(sampleCurve.CurveName)) { return; } } } else { _curves = new List <SampleCurve>(); } sampleCurve.ParentSample = this; _curves.Add(sampleCurve); }
public void CombineDimensionData(Sample otherSample, List <GroupParam> groupParams) { if (otherSample == null || groupParams == null) { return; } if (groupParams.Count == 0) { return; } foreach (SampleCurve sampleCurve in _curves) { SampleCurve otherCurve = otherSample.GetSampleCurveByName(sampleCurve.CurveName); if (otherCurve == null) { continue; } sampleCurve.CombineDimensionData(otherCurve, groupParams); } }