コード例 #1
0
 public void Visit(Track visitee)
 {
     if (visitee.Next is IncomingSwitch)
     {
         IncomingSwitch myIncomingSwitch = (IncomingSwitch)visitee.Next;
         objectToRepresent = myIncomingSwitch.UpTrack.Equals(visitee) ? "═╗ " : "═╝ ";
     }
     else if (visitee.Previous is OutgoingSwitch)
     {
         OutgoingSwitch myoOutgoingSwitch = (OutgoingSwitch)visitee.Previous;
         objectToRepresent = myoOutgoingSwitch.UpTrack.Equals(visitee) ? " ╔═" : " ╚═";
     }
     else
     {
         if (visitee.IsCorner)
         {
             objectToRepresent = "═╣ ";
         }
         else
         {
             if (visitee.IsVertical)
             {
                 objectToRepresent = " ║ ";
             }
             else
             {
                 objectToRepresent = "═══";
             }
         }
     }
 }
コード例 #2
0
 public void Visit(OutgoingSwitch visitee)
 {
     if (!visitee.gateUp)
     {
         objectToRepresent = "═╗" + visitee.Number;
     }
     else
     {
         objectToRepresent = "═╝" + visitee.Number;
     }
 }