Ejemplo n.º 1
0
 private void addExecute()
 {
     for (int x = 0; x < Quantity; x++)
     {
         var newInterlock = new TECInterlockConnection(ToAdd);
         parent.Interlocks.Add(newInterlock);
         Added?.Invoke(newInterlock);
     }
 }
Ejemplo n.º 2
0
        public static TECInterlockConnection TestInterlock(TECCatalogs catalogs, Random rand)
        {
            TECInterlockConnection interlock = new TECInterlockConnection(new List <TECConnectionType> {
                catalogs.ConnectionTypes.RandomElement(rand)
            });

            interlock.Name          = "Test Interlock";
            interlock.ConduitType   = catalogs.ConduitTypes.RandomElement(rand);
            interlock.Length        = rand.Next(1, 100);
            interlock.ConduitLength = rand.Next(1, 100);
            return(interlock);
        }
Ejemplo n.º 3
0
        private void addInterlockExecute()
        {
            var typical = SelectedInterlockable as ITypicalable;
            TECInterlockConnection connection = new TECInterlockConnection(ConnectionTypes);

            connection.Name   = Name;
            connection.Length = Length;
            if (ConduitType != noneConduit)
            {
                connection.ConduitType = ConduitType;
            }
            connection.ConduitLength = ConduitLength;
            connection.IsPlenum      = IsPlenum;

            SelectedInterlockable.Interlocks.Add(connection);
        }
Ejemplo n.º 4
0
 private void deleteInterlockExecute(TECInterlockConnection obj)
 {
     SelectedSubScope.Interlocks.Remove(obj);
 }
Ejemplo n.º 5
0
 private bool canDeleteInterlock(TECInterlockConnection arg)
 {
     return(true);
 }
Ejemplo n.º 6
0
 private bool canDeleteInterlock(TECInterlockConnection interlock)
 {
     return(interlock != null &&
            SelectedInterlockable != null &&
            SelectedInterlockable.Interlocks.Contains(interlock));
 }
Ejemplo n.º 7
0
 private void deleteInterlockExecute(TECInterlockConnection interlock)
 {
     SelectedInterlockable.Interlocks.Remove(interlock);
 }