Exemple #1
0
 private void _SetBaseColors(PaletteBaseColors baseColors)
 {
     if (baseColors == null)
     {
         return;
     }
     this._Initialise(baseColors);
 }
Exemple #2
0
        /// <summary>
        /// Returns a new instance of PaletteBaseColors for specified Skin
        /// </summary>
        /// <param name="skin"></param>
        /// <returns></returns>
        public static PaletteBaseColors GetForSkin(PaletteSkinType skin)
        {
            PaletteBaseColors baseColors = new PaletteBaseColors();

            switch (skin)
            {
            case PaletteSkinType.ApplicationBlue:
                baseColors.WorkspaceBack = Color.FromArgb(0, 0, 32);

                baseColors.ButtonBack    = Color.LightSkyBlue;
                baseColors.ButtonFore    = Color.Black;
                baseColors.ScrollBarBack = Color.LightSteelBlue;
                baseColors.ScrollBarFore = Color.Black;
                baseColors.AxisBack      = Color.LightBlue;
                baseColors.AxisFore      = Color.Black;

                baseColors.MorphDisableBack  = Color.Gray;
                baseColors.MorphDisableFore  = Color.Gray;
                baseColors.MorphDisableRatio = 0.25f;
                baseColors.MorphHotBack      = Color.LightYellow;
                baseColors.MorphHotFore      = Color.DarkBlue;
                baseColors.MorphHotRatio     = 0.35f;
                baseColors.MorphDownBack     = Color.DarkBlue;
                baseColors.MorphDownFore     = Color.Gold;
                baseColors.MorphDownRatio    = 0.65f;

                break;

            case PaletteSkinType.ApplicationGreen:
                baseColors.WorkspaceBack = Color.FromArgb(0, 32, 0);

                baseColors.ButtonBack    = Color.LightGreen;
                baseColors.ButtonFore    = Color.Black;
                baseColors.ScrollBarBack = Color.LawnGreen;
                baseColors.ScrollBarFore = Color.Black;
                baseColors.AxisBack      = Color.GreenYellow;
                baseColors.AxisFore      = Color.Black;

                baseColors.MorphDisableBack  = Color.Gray;
                baseColors.MorphDisableFore  = Color.Gray;
                baseColors.MorphDisableRatio = 0.25f;
                baseColors.MorphHotBack      = Color.Yellow;
                baseColors.MorphHotFore      = Color.DarkBlue;
                baseColors.MorphHotRatio     = 0.25f;
                baseColors.MorphDownBack     = Color.DarkCyan;
                baseColors.MorphDownFore     = Color.Goldenrod;
                baseColors.MorphDownRatio    = 0.65f;

                break;

            case PaletteSkinType.CurrentWindows:
            default:


                break;
            }
            return(baseColors);
        }
Exemple #3
0
        private static Color _GetColorForType(PaletteItemType type, PaletteBaseColors baseColors, Dictionary <PaletteItemType, Color> userTable)
        {
            Color color;

            if (userTable != null && userTable.TryGetValue(type, out color))
            {
                return(color);
            }
            if (baseColors != null)
            {
                return(baseColors[type]);
            }
            return(Color.Gray);
        }
Exemple #4
0
        private void _Initialise(PaletteSkinType skin, PaletteBaseColors baseColors, Dictionary <PaletteItemType, Color> userTable)
        {
            this._Clear();

            Array types = Enum.GetValues(typeof(PaletteItemType));

            foreach (object item in types)
            {
                PaletteItemType type  = (PaletteItemType)item;
                Color           color = _GetColorForType(type, baseColors, userTable);
                this._PaletteItems.Add(type, new PaletteItem(type, color));
            }
            this._Skin       = skin;
            this._BaseColors = baseColors;
        }
Exemple #5
0
        private void _Initialise(Dictionary <PaletteItemType, Color> userTable)
        {
            PaletteBaseColors baseColors = PaletteBaseColors.GetForSkin(PaletteSkinType.CurrentWindows);

            this._Initialise(PaletteSkinType.UserDefined, baseColors, userTable);
        }
Exemple #6
0
 private void _Initialise(PaletteBaseColors baseColors)
 {
     this._Initialise(PaletteSkinType.UserDefined, baseColors, null);
 }
Exemple #7
0
        private void _Initialise(PaletteSkinType skin)
        {
            PaletteBaseColors baseColors = PaletteBaseColors.GetForSkin(skin);

            this._Initialise(skin, baseColors, null);
        }