Storage of palette grid states.
Наследование: Storage
        /// <summary>
        /// Initialize a new instance of the KryptonPaletteGrids class.
        /// </summary>
        /// <param name="redirector">Palette redirector for sourcing inherited values.</param>
        /// <param name="needPaint">Delegate for notifying paint requests.</param>
        internal KryptonPaletteGrids(PaletteRedirect redirector,
                                     NeedPaintHandler needPaint)
        {
            Debug.Assert(redirector != null);

            _gridCommon = new KryptonPaletteGrid(redirector, GridStyle.List, needPaint);
            _gridList = new KryptonPaletteGrid(redirector, GridStyle.List, needPaint);
            _gridSheet = new KryptonPaletteGrid(redirector, GridStyle.Sheet, needPaint);
            _gridCustom1 = new KryptonPaletteGrid(redirector, GridStyle.Custom1, needPaint);

            // Create redirectors for inheriting from style specific to style common
            PaletteRedirectGrids redirectCommon = new PaletteRedirectGrids(redirector, _gridCommon);

            // Ensure the specific styles inherit to the common grid style
            _gridList.SetRedirector(redirectCommon);
            _gridSheet.SetRedirector(redirectCommon);
            _gridCustom1.SetRedirector(redirectCommon);
        }
Пример #2
0
        /// <summary>
        /// Initialize a new instance of the KryptonPaletteGrids class.
        /// </summary>
        /// <param name="redirector">Palette redirector for sourcing inherited values.</param>
        /// <param name="needPaint">Delegate for notifying paint requests.</param>
        internal KryptonPaletteGrids(PaletteRedirect redirector,
                                     NeedPaintHandler needPaint)
        {
            Debug.Assert(redirector != null);

            _gridCommon  = new KryptonPaletteGrid(redirector, GridStyle.List, needPaint);
            _gridList    = new KryptonPaletteGrid(redirector, GridStyle.List, needPaint);
            _gridSheet   = new KryptonPaletteGrid(redirector, GridStyle.Sheet, needPaint);
            _gridCustom1 = new KryptonPaletteGrid(redirector, GridStyle.Custom1, needPaint);

            // Create redirectors for inheriting from style specific to style common
            PaletteRedirectGrids redirectCommon = new PaletteRedirectGrids(redirector, _gridCommon);

            // Ensure the specific styles inherit to the common grid style
            _gridList.SetRedirector(redirectCommon);
            _gridSheet.SetRedirector(redirectCommon);
            _gridCustom1.SetRedirector(redirectCommon);
        }
Пример #3
0
 /// <summary>
 /// Initialize a new instance of the PaletteRedirectTriple class.
 /// </summary>
 /// <param name="target">Initial palette target for redirection.</param>
 /// <param name="grid">Grid reference for directing palette requests.</param>
 public PaletteRedirectGrids(IPalette target, KryptonPaletteGrid grid)
     : base(target)
 {
     Debug.Assert(grid != null);
     _grid = grid;
 }