예제 #1
0
 public void addTrItem(TrackSegment tr)
 {
     if (tr != null)
     {
         trItems.Add(tr);
     }
 }
예제 #2
0
 public void DefineAsInterface(TrackSegment segment)
 {
     typeWidget = (int)TypeWidget.STATION_INTERFACE;
     if (stationConnector == null)
     {
         stationConnector = new StationConnector(segment);
     }
     stationConnector.Init(segment);
     setLineSnap();
     setEditable();
 }
예제 #3
0
 public StationConnector(TrackSegment segment)
 {
     File.AppendAllText(@"F:\temp\AE.txt", "StationConnector\n");
     parentSegment     = segment;
     allowedDirections = new List <string>();
     allowedDirections.Add("   ");
     allowedDirections.Add("In");
     allowedDirections.Add("Out");
     allowedDirections.Add("Both");
     dirConnector = AllowedDir.NONE;
     configured   = false;
 }
예제 #4
0
        public void AddSegment(TrackSegment line)
        {
            PointF lineA = line.A.ConvertToPointF();
            PointF lineB = line.B.ConvertToPointF();

            if (lineA == lineB)
            {
                return;
            }
            foreach (var segment in segments)
            {
                PointF segmentA = segment.A.ConvertToPointF();
                PointF segmentB = segment.B.ConvertToPointF();
                if (lineA == segmentA && lineB == segmentB)
                {
                    return;
                }
                if (lineA == segmentB && lineB == segmentA)
                {
                    return;
                }
            }
            segments.Add(line);
        }
예제 #5
0
 public void Init(TrackSegment info)
 {
     segment   = info;
     idxMaster = info.SectionIdxA;
     idxSecond = info.SectionIdxB;
 }
예제 #6
0
 public override void Update(MSTSCoord coord, TrackSegment segment)
 {
     base.configCoord(coord);
 }
예제 #7
0
 public virtual void Update(MSTSCoord coord, TrackSegment segment)
 {
 }