示例#1
0
        public bool RemoveCurveOf(String label)
        {
            CurveItem toBeDropped = null;

            foreach (CurveItem curve in thePane.CurveList)
            {
                if (curve.Label.Text != label)
                {
                    continue;
                }

                toBeDropped = curve;
                break;
            }

            if (toBeDropped == null)
            {
                return(false);
            }
            else
            {
                thePane.CurveList.Remove(toBeDropped);

                if (toBeDropped.IsY2Axis)
                {
                    int index = toBeDropped.GetYAxisIndex(thePane);
                    if (index == 0)
                    {
                        SetY2Scale();
                    }
                    else if (index == 1)
                    {
                        SetY3Scale();
                    }
                }

                Zed.Invalidate();
                return(true);
            }
        }