public void RemoveConnection(TrackConnection connection) { ownConnections.Remove(connection); if (!removing && AllConnections.Count == 0) { Remove(); } }
public TrackConnectionViewModel() { _trackConnection = new TrackConnection(); _arduinoService = Container.Resolve <IArduinoService>(); ConnectToTrackCommand = new ConnectToTrackCommand(this); AddLaneCommand = new AddLaneCommand(this); RemoveLaneCommand = new RemoveLaneCommand(this); }
public List <TrackConnection> GetPossiblePaths(Point origin, Point previous) { List <TrackConnection> results = new List <TrackConnection>(); foreach (TrackConnection p in this.PathOffsets) { TrackConnection connection = new TrackConnection(p.PreviousOffset, p.DestinationOffset, p.ValidDestinations); Point possible = new Point(); if (GetPossiblePoint(origin, p.PreviousOffset, previous, p.DestinationOffset, ref possible)) { connection.Destination = possible; results.Add(connection); } } return(results); }
public void SelectConnectionToo(TrackConnection c) { if (!selectedConnections.Contains(c)){ selectedConnections.Add(c); } }
public void SelectConnection(TrackConnection c) { selectedConnections = new List<TrackConnection>(); selectedPoints = new List<TrackPoint>(); selectedConnections.Add(c); }
public void AddConnection(TrackConnection connection) { ownConnections.Add(connection); }
public ConnectionDirection(TrackConnection con, bool positive) { this.con = con; direction = (positive) ? 1 : -1; }
public PointOnTrack(TrackConnection c, Track track) { this.track = track; connectionId = c.Id; }