Beispiel #1
0
 public override void CopyValues(LogicElement source)
 {
     if (source is SrTrigger)
     {
         base.CopyValues(source);
     }
     else
     {
         throw new Exception($"Source {source} is not And type");
     }
 }
Beispiel #2
0
 public override void CopyValues(LogicElement source)
 {
     if (source is Inversion)
     {
         base.CopyValues(source);
     }
     else
     {
         throw new Exception($"Source {source} is not Inversion type");
     }
 }
Beispiel #3
0
 public override void CopyValues(LogicElement source)
 {
     if (source is Timer model)
     {
         this.SelectedTypeIndex = model.SelectedTypeIndex;
         this.Time = model.Time;
     }
     else
     {
         throw new Exception($"Source {source} is not Timer type");
     }
 }
Beispiel #4
0
 public override void CopyValues(LogicElement source)
 {
     if (source is AlarmJournal model)
     {
         base.CopyValues(source);
         this.OutputSignals   = new List <string>(model.OutputSignals);
         this.OutputSignalNum = model.OutputSignalNum;
     }
     else
     {
         throw new Exception($"Source {source} is not Output type");
     }
 }
Beispiel #5
0
 public virtual void CopyValues(LogicElement source)
 {
     Connectors = new List <Connector>();
     foreach (var c in source.Connectors)
     {
         Connectors.Add(new Connector(c.Orientation, c.Type)
         {
             ConnectorPosition = c.ConnectorPosition
         });
     }
     X = source.X;
     Y = source.Y;
 }
Beispiel #6
0
 public override void CopyValues(LogicElement source)
 {
     if (source is Input model)
     {
         this.Bases           = new List <string>(model.Bases);
         this.AllInputSignals = new List <Dictionary <int, string> >(model.AllInputSignals);
         for (int i = 0; i < this.Bases.Count; i++)
         {
             var copiedDictionary = model.AllInputSignals[i];
             this.AllInputSignals[i] = new Dictionary <int, string>(copiedDictionary);
         }
         this.InputSignalNum = model.InputSignalNum;
         this.BaseNum        = model.BaseNum;
         base.CopyValues(source);
     }
     else
     {
         throw new Exception($"Source {source} is not Input type");
     }
 }