Exemplo n.º 1
0
        private static void SetItemColors(IPreferenceChanger preferenceChanger)
        {
            ColorsGroupBasic itemColors = new ColorsGroupBasic();

            ColorWithHighlights itemColor;

            itemColor = new ColorWithHighlights(Color.Black, 40);
            itemColor.MakeIntoUserPreference(preferenceChanger, "text",
                                             TrackViewer.catalog.GetString("Select item text color"));
            itemColors.Text = itemColor;

            itemColor = new ColorWithHighlights(Color.Blue, 120);
            itemColor.MakeIntoUserPreference(preferenceChanger, "junction",
                                             TrackViewer.catalog.GetString("Select junction color"));
            itemColors.Junction = itemColor;

            itemColor = new ColorWithHighlights(Color.LimeGreen, 40);
            itemColor.MakeIntoUserPreference(preferenceChanger, "endnode",
                                             TrackViewer.catalog.GetString("Select endnode color"));
            itemColors.EndNode = itemColor;

            itemColor = new ColorWithHighlights(Color.Sienna, 40);
            itemColor.MakeIntoUserPreference(preferenceChanger, "siding",
                                             TrackViewer.catalog.GetString("Select siding color"));
            itemColors.Siding = itemColor;

            itemColor = new ColorWithHighlights(Color.Gray, 40);
            itemColor.MakeIntoUserPreference(preferenceChanger, "crossing",
                                             TrackViewer.catalog.GetString("Select crossing color"));
            itemColors.Crossing = itemColor;

            itemColor = new ColorWithHighlights(Color.DarkGray, 40);
            itemColor.MakeIntoUserPreference(preferenceChanger, "roadcrossing",
                                             TrackViewer.catalog.GetString("Select road crossing color"));
            itemColors.RoadCrossing = itemColor;

            itemColor = new ColorWithHighlights(Color.Purple, 40);
            itemColor.MakeIntoUserPreference(preferenceChanger, "speedpost",
                                             TrackViewer.catalog.GetString("Select speedpost color"));
            itemColors.Speedpost = itemColor;

            itemColor = new ColorWithHighlights(Color.Blue, 40);
            itemColors.CandidateNode = itemColor;

            itemColor             = new ColorWithHighlights(Color.Purple, 40);
            itemColors.ActiveNode = itemColor;

            itemColor = new ColorWithHighlights(Color.LightBlue, 40);
            itemColors.ClearWindowInset = itemColor;

            colorsNormal.TrackItemColors         = itemColors;
            colorsHighlight.TrackItemColors      = itemColors;
            colorsHotlight.TrackItemColors       = itemColors;
            colorsPathMain.TrackItemColors       = itemColors;
            colorsPathSiding.TrackItemColors     = itemColors;
            colorsRoads.TrackItemColors          = itemColors;
            colorsRoadsHighlight.TrackItemColors = itemColors;
            colorsRoadsHotlight.TrackItemColors  = itemColors;
        }
Exemplo n.º 2
0
        private static void SetBasicColors(IPreferenceChanger preferenceChanger)
        {
            ColorsGroupBasic basicColors = new ColorsGroupBasic();

            ColorWithHighlights basicColor;

            basicColor = new ColorWithHighlights(Color.Black, 40);
            basicColor.MakeIntoUserPreference(preferenceChanger, "text",
                                              TrackViewer.catalog.GetString("Select text color"));
            basicColors.Text = basicColor;
        }