コード例 #1
0
 /// <summary>
 /// Copy constructor. Clones (!) all the graph items from the other collection
 /// </summary>
 /// <param name="from">The collection to clone the items from.</param>
 public GraphicCollection(GraphicCollection from)
 {
     for (int i = 0; i < from.Count; i++)
     {
         this.Add((GraphicBase)from[i].Clone());
     }
 }
コード例 #2
0
            public void Serialize(object obj, Altaxo.Serialization.Xml.IXmlSerializationInfo info)
            {
                GraphicCollection s = (GraphicCollection)obj;

                info.CreateArray("GraphObjects", s.myList.Count);
                for (int i = 0; i < s.myList.Count; i++)
                {
                    info.AddValue("GraphicsObject", s.myList[i]);
                }
                info.CommitArray();
            }
コード例 #3
0
        public void AddRange(GraphicCollection goc)
        {
            int len = goc.Count;

            for (int i = 0; i < len; i++)
            {
                this.Add(goc[i], false);
            }

            OnChanged();
        }
コード例 #4
0
            public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent)
            {
                GraphicCollection s = null != o ? (GraphicCollection)o : new GraphicCollection();

                int count = info.OpenArray();

                for (int i = 0; i < count; i++)
                {
                    GraphicBase go = (GraphicBase)info.GetValue(s);
                    s.Add(go);
                }
                info.CloseArray(count);

                return(s);
            }
コード例 #5
0
 public GraphObjectEnumerator(GraphicCollection mappings)
     : base()
 {
     this.temp           = (IEnumerable)mappings;
     this.baseEnumerator = temp.GetEnumerator();
 }
コード例 #6
0
 public GraphObjectEnumerator(GraphicCollection mappings)
   : base()
 {
   this.temp = (IEnumerable)mappings;
   this.baseEnumerator = temp.GetEnumerator();
 }
コード例 #7
0
    public void AddRange(GraphicCollection goc)
    {
      int len = goc.Count;
      for(int i=0;i<len;i++)
        this.Add(goc[i],false);

      OnChanged();
    }
コード例 #8
0
 /// <summary>
 /// Copy constructor. Clones (!) all the graph items from the other collection
 /// </summary>
 /// <param name="from">The collection to clone the items from.</param>
 public GraphicCollection(GraphicCollection from)
 {
   for(int i=0;i<from.Count;i++)
     this.Add((GraphicBase)from[i].Clone());
 }