Exemplo n.º 1
0
 public void DeleteTrace(int traceIndex)
 {
     graph.Plots.RemoveAt(traceIndex);
     foreach (var cursor in Traces[traceIndex].Cursors)
     {
         if (graph.Children.Contains(cursor))
         {
             graph.Children.Remove(cursor);
         }
     }
     //for (int i = 0; i < Traces[traceIndex].LimitLineList.Count; i++)
     //{
     //    graph.Plots.RemoveAt(graph.Plots.Count - 1);
     //}
     Traces.RemoveAt(traceIndex);
     graph.Axes.RemoveAt(traceIndex);
     lstYxis.ItemsSource = null;
     lstYxis.ItemsSource = Traces;
     if (Traces.Count > 0)
     {
         lstYxis.SelectedIndex = 0;
     }
     else
     {
         clearData();
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// remove trace i from the Traces list
 /// </summary>
 /// <param name="i">trace number to remove from list</param>
 /// <returns>true is successful</returns>
 public bool RemoveTrace(int i)
 {
     if (i >= Traces.Count)
     {
         return(false);
     }
     Traces.RemoveAt(i);
     return(true);
 }