コード例 #1
0
ファイル: libs.cs プロジェクト: oghenez/trade-software
 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
ファイル: libs.cs プロジェクト: oghenez/trade-software
 //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
ファイル: libs.cs プロジェクト: oghenez/trade-software
 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
ファイル: libs.cs プロジェクト: oghenez/trade-software
 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
ファイル: libs.cs プロジェクト: oghenez/trade-software
        //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
ファイル: libs.cs プロジェクト: oghenez/trade-software
 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
ファイル: libs.cs プロジェクト: oghenez/trade-software
 //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;
 }