コード例 #1
0
 public Color LookupColour(ColourSchemeItem lookupItem)
 {
     return(theColourItems[(int)lookupItem]);
 }
コード例 #2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="lookupItem"></param>
 /// <returns></returns>
 /// <remarks>
 /// Helper method -- simplifies call syntax for callers.
 /// </remarks>
 public static Color GetColour(ColourSchemeItem lookupItem)
 {
     return(ColourScheme.GetInstance().LookupColour(lookupItem));
 }
コード例 #3
0
        static ColourScheme()
        {
            theColourItems = new Color[(int)ColourSchemeItem.NUM_COLOUR_ITEMS];
            for (ColourSchemeItem item = ColourSchemeItem.FIRST_COLOUR_ITEM;
                 item <= ColourSchemeItem.LAST_COLOUR_ITEM; ++item)
            {
                switch (item)
                {
                // Colour for the application backdrop (behind the main pages)
                case ColourSchemeItem.ApplicationBackdrop:
                    theColourItems[(int)item] = Color.Plum;
                    break;

                // Colours for main pages
                case ColourSchemeItem.ApplicationBackground:
                    //theColourItems[(int)item] = Color.Plum;
                    theColourItems[(int)item] = Color.LightGray;
                    break;

                case ColourSchemeItem.InactiveTabBackground:
                    //theColourItems[(int)item] = Color.Orchid;
                    theColourItems[(int)item] = Color.DarkGray;
                    break;

                case ColourSchemeItem.TabTextForeground:
                    //theColourItems[(int)item] = Color.Purple;
                    theColourItems[(int)item] = Color.DarkSlateGray;
                    break;

                // Colours for subpages
                case ColourSchemeItem.InactiveSubPageBackground:
                    //theColourItems[(int)item] = Color.Orchid;
                    theColourItems[(int)item] = Color.DarkGray;
                    break;

                case ColourSchemeItem.ActiveSubPageBackground:
                    //theColourItems[(int)item] = Color.Thistle;
                    theColourItems[(int)item] = Color.Silver;
                    break;

                // Colours for Named Areas
                case ColourSchemeItem.NamedAreaStandardBackground:
                    theColourItems[(int)item] = Color.White;
                    break;

                case ColourSchemeItem.NamedAreaBoundary:
                    //theColourItems[(int)item] = Color.Purple;
                    theColourItems[(int)item] = Color.DimGray;
                    break;

                case ColourSchemeItem.NamedAreaTextForeground:
                    theColourItems[(int)item] = Color.DimGray;
                    break;

                // Colours for Grids
                case ColourSchemeItem.GridLine:
                    //theColourItems[(int)item] = Color.Purple;
                    theColourItems[(int)item] = Color.DimGray;
                    break;

                case ColourSchemeItem.GridCellActive:
                    //theColourItems[(int)item] = Color.Salmon;
                    theColourItems[(int)item] = Color.LightGray;
                    break;

                case ColourSchemeItem.GridTextForeground:
                    //theColourItems[(int)item] = Color.Purple;	//Color.Black;
                    theColourItems[(int)item] = Color.Black;
                    break;

                // Colours for Item Lists
                case ColourSchemeItem.MaintenanceListItemBackground:
                    //theColourItems[(int)item] = Color.Salmon;
                    theColourItems[(int)item] = Color.LightGray;
                    break;

                case ColourSchemeItem.ReagentsListItemHighlight:
                    theColourItems[(int)item] = Color.LightGreen;
                    break;

                // Colours for buttons
                case ColourSchemeItem.ButtonTextForeground:
                    theColourItems[(int)item] = Color.Black;
                    break;
                }
            }
        }