Ejemplo n.º 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();
 }
Ejemplo n.º 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;
         }
     }
 }
Ejemplo n.º 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);
     }
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 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;
 }
Ejemplo n.º 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;
 }