コード例 #1
0
ファイル: NetGraphFactory.cs プロジェクト: tyranid/canape
        /// <summary>
        /// Update the factory from another
        /// </summary>
        /// <param name="factory">The factory to update from</param>
        public void UpdateGraph(NetGraphFactory factory)
        {
            lock (_lockObject)
            {
                _lines = factory.Lines;
                _nodes = factory.Nodes;
                _props.Clear();

                foreach (KeyValuePair <string, string> pair in factory.Properties)
                {
                    _props.Add(pair.Key, pair.Value);
                }
            }
        }
コード例 #2
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="guid"></param>
 /// <param name="label"></param>
 /// <param name="factory"></param>
 /// <param name="direction"></param>
 public NetGraphContainerNodeFactory(string label, Guid guid, NetGraphFactory factory, NetGraphContainerNode.GraphDirection direction) : base(label, guid)
 {
     Direction = direction;
     Factory   = factory;
 }