示例#1
0
        public CloneTrafo(String id)
        {
            foreach (Substation subs in Singleton.Instance().Substations)
            {
                if (subs.mRID.Equals(id))
                {
                    substation = subs;
                    break;
                }
            }



            ID = "a" + Guid.NewGuid().ToString().Substring(0, 8);
        }
        public object Clone()
        {
            Substation s = new Substation();

            s.aliasName = this.aliasName;
            s.description = "clone_" + this.mRID;
            s.name = this.name;
            s.connectivityNodes = new List<ConnectivityNode>();
            s.Bays = new List<Bay>(this.Bays);
            s.Equipments = new List<Equipment>(this.Equipments);
            s.VoltageLevels = new List<VoltageLevel>(this.VoltageLevels);
            s.x = -1;
            s.y = -1;


           
            return s;
        }
示例#3
0
        public override object Clone()
        {
            clonedItems += 1;
            Substation copy = new Substation();

            copy.mRID = Guid.NewGuid().ToString();
            copy.name = String.Copy(name) + "Copy" + clonedItems.ToString();

            foreach (VoltageLevel vl in VoltageLevels)
            {
                copy.VoltageLevels.Add(vl);
            }

            foreach (ConnectivityNode node in ConnectivityNodes)
            {
                copy.ConnectivityNodes.Add((ConnectivityNode)node.Clone());
            }

            return copy;
        }
示例#4
0
 public override void Izvrsi()
 {
     substation      = (CIM.IEC61970.Base.Core.Substation)substation.Clone();
     substation.mRID = ID;
     Singleton.Instance().Substations.Add(substation);
 }