Extend the ProfessionalColorTable with some Krypton specific properties.
Inheritance: System.Windows.Forms.ProfessionalColorTable
Exemplo n.º 1
0
        /// <summary>
        /// Initialize a new instance of the KryptonPaletteKCT class.
        /// </summary>
        /// <param name="palette">Associated palettte instance.</param>
        /// <param name="baseKCT">Initial base KCT to inherit values from.</param>
        /// <param name="needPaint">Delegate for notifying paint requests.</param>
        internal KryptonPaletteTMS(IPalette palette,
                                   KryptonColorTable baseKCT,
                                   NeedPaintHandler needPaint)
        {
            Debug.Assert(baseKCT != null);

            // Create actual KCT for storage
            InternalKCT = new KryptonInternalKCT(baseKCT, palette);

            // Create the set of sub objects that expose the palette properties
            Button      = new KryptonPaletteTMSButton(InternalKCT, needPaint);
            Grip        = new KryptonPaletteTMSGrip(InternalKCT, needPaint);
            Menu        = new KryptonPaletteTMSMenu(InternalKCT, needPaint);
            MenuStrip   = new KryptonPaletteTMSMenuStrip(InternalKCT, needPaint);
            Rafting     = new KryptonPaletteTMSRafting(InternalKCT, needPaint);
            Separator   = new KryptonPaletteTMSSeparator(InternalKCT, needPaint);
            StatusStrip = new KryptonPaletteTMSStatusStrip(InternalKCT, needPaint);
            ToolStrip   = new KryptonPaletteTMSToolStrip(InternalKCT, needPaint);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Initialize a new instance of the KryptonPaletteKCT class.
        /// </summary>
        /// <param name="palette">Associated palettte instance.</param>
        /// <param name="baseKCT">Initial base KCT to inherit values from.</param>
        /// <param name="needPaint">Delegate for notifying paint requests.</param>
        internal KryptonPaletteTMS(IPalette palette,
                                   KryptonColorTable baseKCT,
                                   NeedPaintHandler needPaint)
        {
            Debug.Assert(baseKCT != null);

            // Create actual KCT for storage
            _internalKCT = new KryptonInternalKCT(baseKCT, palette);

            // Create the set of sub objects that expose the palette properties
            _paletteButton = new KryptonPaletteTMSButton(_internalKCT, needPaint);
            _paletteGrip = new KryptonPaletteTMSGrip(_internalKCT, needPaint);
            _paletteMenu = new KryptonPaletteTMSMenu(_internalKCT, needPaint);
            _paletteMenuStrip = new KryptonPaletteTMSMenuStrip(_internalKCT, needPaint);
            _paletteRafting = new KryptonPaletteTMSRafting(_internalKCT, needPaint);
            _paletteSeparator = new KryptonPaletteTMSSeparator(_internalKCT, needPaint);
            _paletteStatusStrip = new KryptonPaletteTMSStatusStrip(_internalKCT, needPaint);
            _paletteToolStrip = new KryptonPaletteTMSToolStrip(_internalKCT, needPaint);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Initialize a new instance of the KryptonInternalKCT class.
        /// </summary>
        /// <param name="baseKCT">Initial base KCT to inherit values from.</param>
        /// <param name="palette">Reference to associated palette.</param>
        public KryptonInternalKCT(KryptonColorTable baseKCT,
                                  IPalette palette)
            : base(palette)
        {
            Debug.Assert(baseKCT != null);

            // Remember the base used for inheriting
            _baseKCT = baseKCT;

            // Always assume the same use of system colors
            UseSystemColors = _baseKCT.UseSystemColors;

            // Create the array for storing colors
            _colors = new Color[(int)PaletteColorIndex.Count];

            // Initialise all the colors to empty
            for (int i = 0; i < _colors.Length; i++)
                _colors[i] = Color.Empty;

            // Initialise other storage values
            _useRoundedEdges = InheritBool.Inherit;
        }
Exemplo n.º 4
0
 /// <summary>
 /// Initialise a new instance of the KryptonStandardRenderer class.
 /// </summary>
 /// <param name="kct">Source for text colors.</param>
 public KryptonStandardRenderer(KryptonColorTable kct)
     : base(kct)
 {
 }
 /// <summary>
 /// Initialise a new instance of the KryptonProfessionalRenderer class.
 /// </summary>
 /// <param name="kct">Source for text colors.</param>
 public KryptonProfessionalRenderer(KryptonColorTable kct)
     : base(kct)
 {
     Debug.Assert(kct != null);
     KCT = kct;
 }
 /// <summary>
 /// Initialise a new instance of the KryptonProfessionalRenderer class.
 /// </summary>
 /// <param name="kct">Source for text colors.</param>
 public KryptonProfessionalRenderer(KryptonColorTable kct)
     : base(kct)
 {
     Debug.Assert(kct != null);
     _kct = kct;
 }
Exemplo n.º 7
0
 /// <summary>
 /// Initialise a new instance of the KryptonSparkleRenderer class.
 /// </summary>
 /// <param name="kct">Source for text colors.</param>
 public KryptonSparkleRenderer(KryptonColorTable kct)
     : base(kct)
 {
 }
 /// <summary>
 /// Initialise a new instance of the KryptonOffice2010Renderer class.
 /// </summary>
 /// <param name="kct">Source for text colors.</param>
 public KryptonOffice2013Renderer(KryptonColorTable kct)
     : base(kct)
 {
 }
Exemplo n.º 9
0
 /// <summary>
 /// Initialise a new instance of the KryptonStandardRenderer class.
 /// </summary>
 /// <param name="kct">Source for text colors.</param>
 public KryptonStandardRenderer(KryptonColorTable kct)
     : base(kct)
 {
 }
Exemplo n.º 10
0
 /// <summary>
 /// Initialise a new instance of the KryptonOffice2010Renderer class.
 /// </summary>
 /// <param name="kct">Source for text colors.</param>
 public KryptonNeoAxisRenderer(KryptonColorTable kct)
     : base(kct)
 {
 }
        /// <summary>
        /// Generate an appropriate color table.
        /// </summary>
        /// <returns>KryptonProfessionalKCT instance.</returns>
        internal virtual KryptonProfessionalKCT GenerateColorTable()
        {
            // Create the color table to use as the base for getting krypton colors
            KryptonColorTable kct = new KryptonColorTable(this);

            // Always turn off the use of any theme specific colors
            kct.UseSystemColors = true;

            // Calculate the krypton specific colors
            Color[] colors = new Color[] { kct.OverflowButtonGradientEnd,   // Header1Begin
                                           kct.OverflowButtonGradientEnd,   // Header1End
                                         };

            // Create a krypton extension color table
            return new KryptonProfessionalKCT(colors, true, this);
        }