Ejemplo n.º 1
0
        public static ColorScheme ShadeColor(ColorWithHighlights referenceColor, int index, int count)
        {
            ColorWithHighlights trackColor = ColorWithHighlights.ReshadeColorWithHighlights(referenceColor, index, count);

            ColorsGroupTrack colorsGroup = new ColorsGroupTrack();

            colorsGroup.TrackStraight = trackColor;
            colorsGroup.TrackCurved   = trackColor;
            colorsGroup.BrokenNode    = trackColor;
            colorsGroup.BrokenPath    = trackColor;

            ColorScheme shadedColorScheme = new ColorScheme();

            shadedColorScheme.TrackColors = colorsGroup;

            return(shadedColorScheme);
        }
Ejemplo n.º 2
0
        private static void SetPathColors(IPreferenceChanger preferenceChanger)
        {
            ColorWithHighlights brokenPath = new ColorWithHighlights(Color.Salmon, 40);

            brokenPath.MakeIntoUserPreference(preferenceChanger, "brokenpath",
                                              TrackViewer.catalog.GetString("Select broken path color"));

            ColorWithHighlights brokenNode = new ColorWithHighlights(Color.Red, 40);

            ColorWithHighlights pathMain = new ColorWithHighlights(Color.Yellow, 20);

            pathMain.MakeIntoUserPreference(preferenceChanger, "pathmain",
                                            TrackViewer.catalog.GetString("Select path color (main)"));
            ColorsGroupTrack pathMainGroup = new ColorsGroupTrack
            {
                TrackCurved   = pathMain,
                TrackStraight = pathMain,
                BrokenNode    = brokenNode,
                BrokenPath    = brokenPath
            };

            colorsPathMain.TrackColors = pathMainGroup;

            ColorWithHighlights pathSiding = new ColorWithHighlights(Color.Orange, 20);

            pathSiding.MakeIntoUserPreference(preferenceChanger, "pathsiding",
                                              TrackViewer.catalog.GetString("Select path color (siding)"));
            ColorsGroupTrack pathSidingGroup = new ColorsGroupTrack
            {
                TrackCurved   = pathSiding,
                TrackStraight = pathSiding,
                BrokenNode    = brokenNode,
                BrokenPath    = brokenPath
            };

            colorsPathSiding.TrackColors = pathSidingGroup;
        }