Implement storage for palette content text details.
Inheritance: Storage
Example #1
0
        /// <summary>
        /// Initialize a new instance of the PaletteContent class.
        /// </summary>
        /// <param name="inherit">Source for inheriting defaulted values.</param>
        /// <param name="needPaint">Delegate for notifying paint requests.</param>
        public PaletteContent(IPaletteContent inherit,
                              NeedPaintHandler needPaint)
        {
            Debug.Assert(inherit != null);

            // Remember inheritance
            _inherit = inherit;

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

            // Create the content storage for sub objects
            _image     = new PaletteContentImage(needPaint);
            _shortText = new PaletteContentText(needPaint);
            _longText  = new PaletteContentText(needPaint);
        }
Example #2
0
        /// <summary>
        /// Initialize a new instance of the PaletteContent class.
        /// </summary>
        /// <param name="inherit">Source for inheriting defaulted values.</param>
        /// <param name="needPaint">Delegate for notifying paint requests.</param>
        public PaletteContent(IPaletteContent inherit,
                              NeedPaintHandler needPaint)
        {
            Debug.Assert(inherit != null);

            // Remember inheritance
            _inherit = inherit;

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

            // Create the content storage for sub objects
            _image = new PaletteContentImage(needPaint);
            _shortText = new PaletteContentText(needPaint);
            _longText = new PaletteContentText(needPaint);
        }