Implement storage but remove accesss to the non image properties.
상속: PaletteContent
        /// <summary>
        /// Initialize a new instance of the PaletteTripleJustImage class.
        /// </summary>
        /// <param name="inherit">Source for inheriting values.</param>
        /// <param name="needPaint">Delegate for notifying paint requests.</param>
        public PaletteTripleJustImage(IPaletteTriple inherit,
                                      NeedPaintHandler needPaint)
        {
            Debug.Assert(inherit != null);

            // Store the provided paint notification delegate
            NeedPaint = needPaint;

            // Create storage that maps onto the inherit instances
            Back = new PaletteBack(inherit.PaletteBack, needPaint);
            Border = new PaletteBorder(inherit.PaletteBorder, needPaint);
            Content = new PaletteContentJustImage(inherit.PaletteContent, needPaint);
        }
예제 #2
0
        /// <summary>
        /// Initialize a new instance of the PaletteTripleJustImage class.
        /// </summary>
        /// <param name="inherit">Source for inheriting values.</param>
        /// <param name="needPaint">Delegate for notifying paint requests.</param>
        public PaletteTripleJustImage(IPaletteTriple inherit,
                                      NeedPaintHandler needPaint)
        {
            Debug.Assert(inherit != null);

            // Store the provided paint notification delegate
            NeedPaint = needPaint;

            // Create storage that maps onto the inherit instances
            _back = new PaletteBack(inherit.PaletteBack, needPaint);
            _border = new PaletteBorder(inherit.PaletteBorder, needPaint);
            _content = new PaletteContentJustImage(inherit.PaletteContent, needPaint);
        }
        /// <summary>
        /// Initialize a new instance of the PaletteTripleJustImageRedirect class.
        /// </summary>
        /// <param name="redirect">Inheritence redirection instance.</param>
        /// <param name="backStyle">Initial background style.</param>
        /// <param name="borderStyle">Initial border style.</param>
        /// <param name="contentStyle">Initial content style.</param>
        /// <param name="needPaint">Delegate for notifying paint requests.</param>
        public PaletteTripleJustImageRedirect(PaletteRedirect redirect,
                                              PaletteBackStyle backStyle,
                                              PaletteBorderStyle borderStyle,
                                              PaletteContentStyle contentStyle,
                                              NeedPaintHandler needPaint)
        {
            // Store the provided paint notification delegate
            NeedPaint = needPaint;

            // Store the inherit instances
            _backInherit    = new PaletteBackInheritRedirect(redirect, backStyle);
            _borderInherit  = new PaletteBorderInheritRedirect(redirect, borderStyle);
            _contentInherit = new PaletteContentInheritRedirect(redirect, contentStyle);

            // Create storage that maps onto the inherit instances
            Back    = new PaletteBack(_backInherit, needPaint);
            Border  = new PaletteBorder(_borderInherit, needPaint);
            Content = new PaletteContentJustImage(_contentInherit, needPaint);
        }
        /// <summary>
        /// Initialize a new instance of the PaletteTripleJustImageRedirect class.
        /// </summary>
        /// <param name="redirect">Inheritence redirection instance.</param>
        /// <param name="backStyle">Initial background style.</param>
        /// <param name="borderStyle">Initial border style.</param>
        /// <param name="contentStyle">Initial content style.</param>
        /// <param name="needPaint">Delegate for notifying paint requests.</param>
        public PaletteTripleJustImageRedirect(PaletteRedirect redirect,
									          PaletteBackStyle backStyle,
									          PaletteBorderStyle borderStyle,
									          PaletteContentStyle contentStyle,
                                              NeedPaintHandler needPaint)
        {
            // Store the provided paint notification delegate
            NeedPaint = needPaint;

            // Store the inherit instances
            _backInherit = new PaletteBackInheritRedirect(redirect, backStyle);
            _borderInherit = new PaletteBorderInheritRedirect(redirect, borderStyle);
            _contentInherit = new PaletteContentInheritRedirect(redirect, contentStyle);

            // Create storage that maps onto the inherit instances
            _back = new PaletteBack(_backInherit, needPaint);
            _border = new PaletteBorder(_borderInherit, needPaint);
            _content = new PaletteContentJustImage(_contentInherit, needPaint);
        }