private void addExecute() { for (int x = 0; x < Quantity; x++) { var newInterlock = new TECInterlockConnection(ToAdd); parent.Interlocks.Add(newInterlock); Added?.Invoke(newInterlock); } }
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); }
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); }
private void deleteInterlockExecute(TECInterlockConnection obj) { SelectedSubScope.Interlocks.Remove(obj); }
private bool canDeleteInterlock(TECInterlockConnection arg) { return(true); }
private bool canDeleteInterlock(TECInterlockConnection interlock) { return(interlock != null && SelectedInterlockable != null && SelectedInterlockable.Interlocks.Contains(interlock)); }
private void deleteInterlockExecute(TECInterlockConnection interlock) { SelectedInterlockable.Interlocks.Remove(interlock); }