示例#1
0
 public void RemoveAll()
 {
     object[] items = Cache.Values;
     for (int idx = 0; idx < items.Length; idx++)
     {
         DrawCurve drawCurve = (DrawCurve)items[idx];
         drawCurve.Pane.CurveList.Remove(drawCurve.Curve);
     }
     this.Cache.Clear();
 }
示例#2
0
 //TUAN - Update Curve Name in Pane when the pane name changed
 public void UpdateCurveWhenPaneNameChanged(string oldPane, string newPane)
 {
     object[] items = Cache.Values;
     for (int idx = 0; idx < items.Length; idx++)
     {
         DrawCurve drawCurve = (DrawCurve)items[idx];
         if (drawCurve.PaneName == oldPane)
         {
             drawCurve.PaneName = newPane;
         }
     }
 }
示例#3
0
 public void RemoveByPane(string paneName)
 {
     object[] items = Cache.Values;
     for (int idx = 0; idx < items.Length; idx++)
     {
         DrawCurve drawCurve = (DrawCurve)items[idx];
         if (drawCurve.PaneName != paneName)
         {
             continue;
         }
         Remove(drawCurve.CurveName);
     }
 }
示例#4
0
 public DrawCurve[] CurveInPane(string paneName)
 {
     DrawCurve[] list  = new DrawCurve[0];
     object[]    items = Cache.Values;
     for (int idx = 0; idx < items.Length; idx++)
     {
         DrawCurve drawCurve = (DrawCurve)items[idx];
         if (drawCurve.PaneName == paneName)
         {
             Array.Resize(ref list, list.Length + 1);
             list[list.Length - 1] = (DrawCurve)items[idx];
         }
     }
     return(list);
 }
示例#5
0
        //Return curves that its name starts with [namePrefix]
        public DrawCurve[] FindAll(string namePrefix)
        {
            DrawCurve[] drawCurveList = new DrawCurve[0];
            DrawCurve   drawCurve;

            object[] items = Cache.Values;
            for (int idx = 0; idx < items.Length; idx++)
            {
                drawCurve = (DrawCurve)items[idx];
                if (drawCurve.CurveName.StartsWith(namePrefix))
                {
                    Array.Resize(ref drawCurveList, drawCurveList.Length + 1);
                    drawCurveList[drawCurveList.Length - 1] = drawCurve;
                }
            }
            return(drawCurveList);
        }
示例#6
0
 public DrawCurve[] CurveInPane(string paneName)
 {
     DrawCurve[] list = new DrawCurve[0];
     object[] items = Cache.Values;
     for (int idx = 0; idx < items.Length; idx++)
     {
         DrawCurve drawCurve = (DrawCurve)items[idx];
         if (drawCurve.PaneName == paneName) 
         {
             Array.Resize(ref list, list.Length + 1);
             list[list.Length-1] = (DrawCurve)items[idx];
         }
     }
     return list;
 }
示例#7
0
 //Return curves that its name starts with [namePrefix]
 public DrawCurve[] FindAll(string namePrefix)
 {
     DrawCurve[] drawCurveList = new DrawCurve[0];
     DrawCurve drawCurve;
     object[] items = Cache.Values;
     for (int idx = 0; idx < items.Length; idx++)
     {
         drawCurve = (DrawCurve)items[idx];
         if (drawCurve.CurveName.StartsWith(namePrefix))
         {
             Array.Resize(ref drawCurveList, drawCurveList.Length + 1);
             drawCurveList[drawCurveList.Length - 1] = drawCurve;
         }
     }
     return drawCurveList;
 }