private CurveViewManager CreateManager(Model.Curve curve, Data.CurveData dataCatche, IGraph graph) { CurveViewManager manager = new CurveViewManager(curve, graph); manager.CurveData = dataCatche; return(manager); }
public void AddCurve(Model.Curve curve, Data.CurveData data, int index) { curveList.Add(curve); #region pt ParaTable pt = new ParaTable(); pt.Tag = curve.Id; pt.SetCurve(curve); #endregion #region dp UC_Dp.DepthBaseValue = CurveXMinValue; UC_Dp.DepthDeltaValue = MaxUnitLength; #endregion CurveViewManager manager = CreateManager(curve, data, this); #region index switch (index) { case 0: { STK_CurveGroupContainer1.Children.Add(pt); UC_Gm1.AddShape(curve, manager); } break; case 1: { STK_CurveGroupContainer2.Children.Add(pt); UC_Gm2.AddShape(curve, manager); } break; case 2: { STK_CurveGroupContainer3.Children.Add(pt); UC_Gm3.AddShape(curve, manager); } break; default: { throw new Exception(); }; } #endregion }
public void AddShape(Model.Curve curve, CurveViewManager manager) { Polyline polyline = CreateGraphics(curve.CurveThickness, curve.CurveColor, curve.IsDashed); manager.PointCacheList = polyline.Points; }