예제 #1
0
        private CurveViewManager CreateManager(Model.Curve curve, Data.CurveData dataCatche, IGraph graph)
        {
            CurveViewManager manager = new CurveViewManager(curve, graph);

            manager.CurveData = dataCatche;
            return(manager);
        }
예제 #2
0
        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
        }
예제 #3
0
        public void AddShape(Model.Curve curve, CurveViewManager manager)
        {
            Polyline polyline = CreateGraphics(curve.CurveThickness, curve.CurveColor, curve.IsDashed);

            manager.PointCacheList = polyline.Points;
        }