コード例 #1
0
        public DiagramCollection Clone()
        {
            DiagramCollection clone = new DiagramCollection(Style.Parent);

            foreach (Diagram diagram in this)
            {
                clone.Add(diagram.Clone());
            }

            return(clone);
        }
コード例 #2
0
        public DiagramCollection ToDiagramCollection(ChordFinderStyle chordFinderStyle)
        {
            DiagramCollection collection = new DiagramCollection(chordFinderStyle.Style);

            foreach (ChordFinderResult result in _results)
            {
                collection.Add(result.ToDiagram(chordFinderStyle));
            }

            return(collection);
        }
コード例 #3
0
        public void CopyFrom(DiagramLibrary diagramLibrary)
        {
            if (null == diagramLibrary)
            {
                throw new ArgumentNullException("diagramLibrary");
            }

            foreach (KeyValuePair <string, DiagramCollection> sourceKVP in diagramLibrary.GetAll())
            {
                DiagramCollection collection = null;

                if (!TryGet(sourceKVP.Key, out collection))
                {
                    collection = Add(sourceKVP.Key);
                }

                collection.Add(sourceKVP.Value);
            }
        }