示例#1
0
        public void CopyIdAndStatus(GraphicMetaBase source)
        {
            if (this == source)
            {
                return;
            }
            base.CloneFrom(source);
            foreach (LineMeta line in Lines)
            {
                LineMeta lineMeta = null;
                try
                {
                    lineMeta          = source.Lines.First <LineMeta>(c => c.FromId == line.FromId && c.FromType == line.FromType && c.ToId == line.ToId && c.ToType == line.ToType);
                    line.Associate_ID = lineMeta.Associate_ID;
                    line.State        = lineMeta.State;
                }
                catch
                { }
            }

            foreach (NodeMeta node in Nodes)
            {
                NodeMeta nodemeta = null;
                try
                {
                    nodemeta   = source.Nodes.First <NodeMeta>(c => c.SId == node.SId && c.DataType == node.DataType);
                    node.State = nodemeta.State;
                }
                catch
                { }
            }
        }
示例#2
0
 public void CloneFrom(GraphicMetaBase source)
 {
     if (this == source)
     {
         return;
     }
     base.CloneFrom(source);
     BackLines.Clear();
     BackLines.AddRange(source.BackLines);
     Lines.Clear();
     Lines.AddRange(source.Lines);
     Nodes.Clear();
     Nodes.AddRange(source.Nodes);
     Setting = source.Setting;
 }