예제 #1
0
        public void AddCurve(PlanetId id, OrbitInfoType kind)
        {
            if (!IsCurveAdded(id, kind))
            {
                OrbitSpec spec = this[id, kind];

                CurveItem curve = null;

                if (kind == OrbitInfoType.Longitude || (kind >= OrbitInfoType.Ascending && kind <= OrbitInfoType.Apogee))
                {
                    curve = Frame.CurveOf(spec);
                }
                else if (kind.ToString().EndsWith("Latitude"))
                {
                    curve                    = spec.OriginalCurve;
                    curve.IsY2Axis           = true;
                    thePane.Y2Axis.IsVisible = true;

                    Double max = Math.Max(Math.Abs(spec.MaxY), Math.Abs(spec.MinY));
                    if (max > thePane.Y2Axis.Scale.Max)
                    {
                        SetY2Scale(max);
                    }
                }
                else
                {
                    thePane.Y2AxisList[1].IsVisible = true;

                    curve            = spec.OriginalCurve;
                    curve.IsY2Axis   = true;
                    curve.YAxisIndex = 1;

                    Double max = Math.Max(Math.Abs(spec.MaxY), Math.Abs(spec.MinY));
                    if (max > thePane.Y2AxisList[1].Scale.Max)
                    {
                        SetY3Scale(max);
                    }
                }

                AddCurve(curve);
            }
        }
예제 #2
0
        public LineItem CurveOf(OrbitSpec spec)
        {
            LineItem curve = CurveOf(spec.Label, spec.XList, spec.YList, spec.DisplayColor, SymbolType.None);

            return(curve);
        }
예제 #3
0
        public bool RemoveCurveOf(PlanetId id, OrbitInfoType kind)
        {
            String label = OrbitSpec.LableOf(id, kind);

            return(RemoveCurveOf(label));
        }
예제 #4
0
        public bool IsCurveAdded(PlanetId id, OrbitInfoType kind)
        {
            String label = OrbitSpec.LableOf(id, kind);

            return(IsCurveAdded(label));
        }