예제 #1
0
 /// <summary>
 /// Adds a layer to this layer collection.
 /// </summary>
 /// <param name="l"></param>
 public void Add(XYPlotLayer l)
 {
     // we use List for adding since we want to have custom actions below
     List.Add(l);
     l.SetPrintableGraphBounds(m_PrintableBounds, false);
     // since we use List, we don't need to have OnLayerCollectionChanged here!
 }
예제 #2
0
        /// <summary>
        /// Replace the old layer by the new one.
        /// </summary>
        /// <param name="oldlayer">Old layer, which should be replaced.</param>
        /// <param name="newlayer">New layer to replace the old one.</param>
        public virtual void Replace(XYPlotLayer oldlayer, XYPlotLayer newlayer)
        {
            int i = base.InnerList.IndexOf(oldlayer);

            if (i >= 0)
            {
                base.InnerList[i] = newlayer;
                newlayer.SetParentAndNumber(this, i);
                newlayer.SetPrintableGraphBounds(m_PrintableBounds, false);
            }
        }
 /// <summary>
 /// Adds a layer to this layer collection.
 /// </summary>
 /// <param name="l"></param>
 public void Add(XYPlotLayer l)
 {
   // we use List for adding since we want to have custom actions below
   List.Add(l);
   l.SetPrintableGraphBounds(m_PrintableBounds,false);
   // since we use List, we don't need to have OnLayerCollectionChanged here!
 }
 /// <summary>
 /// Replace the old layer by the new one.
 /// </summary>
 /// <param name="oldlayer">Old layer, which should be replaced.</param>
 /// <param name="newlayer">New layer to replace the old one.</param>
 public virtual void Replace(XYPlotLayer oldlayer, XYPlotLayer newlayer)
 {
   int i = base.InnerList.IndexOf(oldlayer);
   if (i >= 0)
   {
     base.InnerList[i] = newlayer;
     newlayer.SetParentAndNumber(this, i);
     newlayer.SetPrintableGraphBounds(m_PrintableBounds, false);
   }
 }