Example #1
0
        public static Pen MapToPen(Circuit.EdgeType Edge)
        {
            switch (Edge)
            {
            case Circuit.EdgeType.Wire: return(WirePen);

            case Circuit.EdgeType.Black: return(BlackPen);

            case Circuit.EdgeType.Gray: return(GrayPen);

            case Circuit.EdgeType.Red: return(RedPen);

            case Circuit.EdgeType.Green: return(GreenPen);

            case Circuit.EdgeType.Blue: return(BluePen);

            case Circuit.EdgeType.Yellow: return(YellowPen);

            case Circuit.EdgeType.Cyan: return(CyanPen);

            case Circuit.EdgeType.Magenta: return(MagentaPen);

            case Circuit.EdgeType.Orange: return(OrangePen);

            default: throw new ArgumentException();
            }
        }
Example #2
0
        private static Pen MapToSignalPen(Circuit.EdgeType Color)
        {
            switch (Color)
            {
            // These two need to be brighter than the normal colors.
            case Circuit.EdgeType.Red: return(new Pen(new SolidColorBrush(System.Windows.Media.Color.FromRgb(255, 80, 80)), 1.0));

            case Circuit.EdgeType.Blue: return(new Pen(new SolidColorBrush(System.Windows.Media.Color.FromRgb(20, 180, 255)), 1.0));

            default: return(ElementControl.MapToPen(Color));
            }
        }
Example #3
0
 public static Brush MapToBrush(Circuit.EdgeType Edge)
 {
     return(MapToPen(Edge).Brush);
 }