Redirect button spec requests to provided target.
상속: PaletteRedirect
예제 #1
0
        /// <summary>
        /// Initialize a new instance of the KryptonPaletteButtonSpecs class.
        /// </summary>
        /// <param name="redirector">Palette redirector for sourcing inherited values.</param>
        internal KryptonPaletteButtonSpecs(PaletteRedirect redirector)
        {
            Debug.Assert(redirector != null);

            // Create exposed button specifications
            _common            = new KryptonPaletteButtonSpecTyped(redirector);
            _generic           = new KryptonPaletteButtonSpecTyped(redirector);
            _close             = new KryptonPaletteButtonSpecTyped(redirector);
            _context           = new KryptonPaletteButtonSpecTyped(redirector);
            _next              = new KryptonPaletteButtonSpecTyped(redirector);
            _previous          = new KryptonPaletteButtonSpecTyped(redirector);
            _arrowLeft         = new KryptonPaletteButtonSpecTyped(redirector);
            _arrowRight        = new KryptonPaletteButtonSpecTyped(redirector);
            _arrowUp           = new KryptonPaletteButtonSpecTyped(redirector);
            _arrowDown         = new KryptonPaletteButtonSpecTyped(redirector);
            _dropDown          = new KryptonPaletteButtonSpecTyped(redirector);
            _pinVertical       = new KryptonPaletteButtonSpecTyped(redirector);
            _pinHorizontal     = new KryptonPaletteButtonSpecTyped(redirector);
            _formClose         = new KryptonPaletteButtonSpecTyped(redirector);
            _formMax           = new KryptonPaletteButtonSpecTyped(redirector);
            _formMin           = new KryptonPaletteButtonSpecTyped(redirector);
            _formRestore       = new KryptonPaletteButtonSpecTyped(redirector);
            _pendantClose      = new KryptonPaletteButtonSpecTyped(redirector);
            _pendantMin        = new KryptonPaletteButtonSpecTyped(redirector);
            _pendantRestore    = new KryptonPaletteButtonSpecTyped(redirector);
            _workspaceMaximize = new KryptonPaletteButtonSpecTyped(redirector);
            _workspaceRestore  = new KryptonPaletteButtonSpecTyped(redirector);
            _ribbonMinimize    = new KryptonPaletteButtonSpecTyped(redirector);
            _ribbonExpand      = new KryptonPaletteButtonSpecTyped(redirector);

            // Create redirector for inheriting from style specific to style common
            PaletteRedirectButtonSpec redirectCommon = new PaletteRedirectButtonSpec(redirector, _common);

            // Inform the button spec to use the new redirector
            _generic.SetRedirector(redirectCommon);
            _close.SetRedirector(redirectCommon);
            _context.SetRedirector(redirectCommon);
            _next.SetRedirector(redirectCommon);
            _previous.SetRedirector(redirectCommon);
            _arrowLeft.SetRedirector(redirectCommon);
            _arrowRight.SetRedirector(redirectCommon);
            _arrowUp.SetRedirector(redirectCommon);
            _arrowDown.SetRedirector(redirectCommon);
            _dropDown.SetRedirector(redirectCommon);
            _pinVertical.SetRedirector(redirectCommon);
            _pinHorizontal.SetRedirector(redirectCommon);
            _formClose.SetRedirector(redirectCommon);
            _formMax.SetRedirector(redirectCommon);
            _formMin.SetRedirector(redirectCommon);
            _formRestore.SetRedirector(redirectCommon);
            _pendantClose.SetRedirector(redirectCommon);
            _pendantMin.SetRedirector(redirectCommon);
            _pendantRestore.SetRedirector(redirectCommon);
            _workspaceMaximize.SetRedirector(redirectCommon);
            _workspaceRestore.SetRedirector(redirectCommon);
            _ribbonMinimize.SetRedirector(redirectCommon);
            _ribbonExpand.SetRedirector(redirectCommon);

            // Hook into the storage change events
            _common.ButtonSpecChanged            += new EventHandler(OnButtonSpecChanged);
            _generic.ButtonSpecChanged           += new EventHandler(OnButtonSpecChanged);
            _close.ButtonSpecChanged             += new EventHandler(OnButtonSpecChanged);
            _context.ButtonSpecChanged           += new EventHandler(OnButtonSpecChanged);
            _next.ButtonSpecChanged              += new EventHandler(OnButtonSpecChanged);
            _previous.ButtonSpecChanged          += new EventHandler(OnButtonSpecChanged);
            _arrowLeft.ButtonSpecChanged         += new EventHandler(OnButtonSpecChanged);
            _arrowRight.ButtonSpecChanged        += new EventHandler(OnButtonSpecChanged);
            _arrowUp.ButtonSpecChanged           += new EventHandler(OnButtonSpecChanged);
            _arrowDown.ButtonSpecChanged         += new EventHandler(OnButtonSpecChanged);
            _dropDown.ButtonSpecChanged          += new EventHandler(OnButtonSpecChanged);
            _pinVertical.ButtonSpecChanged       += new EventHandler(OnButtonSpecChanged);
            _pinHorizontal.ButtonSpecChanged     += new EventHandler(OnButtonSpecChanged);
            _formClose.ButtonSpecChanged         += new EventHandler(OnButtonSpecChanged);
            _formMax.ButtonSpecChanged           += new EventHandler(OnButtonSpecChanged);
            _formMin.ButtonSpecChanged           += new EventHandler(OnButtonSpecChanged);
            _formRestore.ButtonSpecChanged       += new EventHandler(OnButtonSpecChanged);
            _pendantClose.ButtonSpecChanged      += new EventHandler(OnButtonSpecChanged);
            _pendantMin.ButtonSpecChanged        += new EventHandler(OnButtonSpecChanged);
            _pendantRestore.ButtonSpecChanged    += new EventHandler(OnButtonSpecChanged);
            _workspaceMaximize.ButtonSpecChanged += new EventHandler(OnButtonSpecChanged);
            _workspaceRestore.ButtonSpecChanged  += new EventHandler(OnButtonSpecChanged);
            _ribbonMinimize.ButtonSpecChanged    += new EventHandler(OnButtonSpecChanged);
            _ribbonExpand.ButtonSpecChanged      += new EventHandler(OnButtonSpecChanged);
        }
        /// <summary>
        /// Initialize a new instance of the KryptonPaletteButtonSpecs class.
        /// </summary>
        /// <param name="redirector">Palette redirector for sourcing inherited values.</param>
        internal KryptonPaletteButtonSpecs(PaletteRedirect redirector)
        {
            Debug.Assert(redirector != null);

            // Create exposed button specifications
            Common            = new KryptonPaletteButtonSpecTyped(redirector);
            Generic           = new KryptonPaletteButtonSpecTyped(redirector);
            Close             = new KryptonPaletteButtonSpecTyped(redirector);
            Context           = new KryptonPaletteButtonSpecTyped(redirector);
            Next              = new KryptonPaletteButtonSpecTyped(redirector);
            Previous          = new KryptonPaletteButtonSpecTyped(redirector);
            ArrowLeft         = new KryptonPaletteButtonSpecTyped(redirector);
            ArrowRight        = new KryptonPaletteButtonSpecTyped(redirector);
            ArrowUp           = new KryptonPaletteButtonSpecTyped(redirector);
            ArrowDown         = new KryptonPaletteButtonSpecTyped(redirector);
            DropDown          = new KryptonPaletteButtonSpecTyped(redirector);
            PinVertical       = new KryptonPaletteButtonSpecTyped(redirector);
            PinHorizontal     = new KryptonPaletteButtonSpecTyped(redirector);
            FormClose         = new KryptonPaletteButtonSpecTyped(redirector);
            FormMax           = new KryptonPaletteButtonSpecTyped(redirector);
            FormMin           = new KryptonPaletteButtonSpecTyped(redirector);
            FormRestore       = new KryptonPaletteButtonSpecTyped(redirector);
            PendantClose      = new KryptonPaletteButtonSpecTyped(redirector);
            PendantMin        = new KryptonPaletteButtonSpecTyped(redirector);
            PendantRestore    = new KryptonPaletteButtonSpecTyped(redirector);
            WorkspaceMaximize = new KryptonPaletteButtonSpecTyped(redirector);
            WorkspaceRestore  = new KryptonPaletteButtonSpecTyped(redirector);
            RibbonMinimize    = new KryptonPaletteButtonSpecTyped(redirector);
            RibbonExpand      = new KryptonPaletteButtonSpecTyped(redirector);

            // Create redirector for inheriting from style specific to style common
            PaletteRedirectButtonSpec redirectCommon = new PaletteRedirectButtonSpec(redirector, Common);

            // Inform the button spec to use the new redirector
            Generic.SetRedirector(redirectCommon);
            Close.SetRedirector(redirectCommon);
            Context.SetRedirector(redirectCommon);
            Next.SetRedirector(redirectCommon);
            Previous.SetRedirector(redirectCommon);
            ArrowLeft.SetRedirector(redirectCommon);
            ArrowRight.SetRedirector(redirectCommon);
            ArrowUp.SetRedirector(redirectCommon);
            ArrowDown.SetRedirector(redirectCommon);
            DropDown.SetRedirector(redirectCommon);
            PinVertical.SetRedirector(redirectCommon);
            PinHorizontal.SetRedirector(redirectCommon);
            FormClose.SetRedirector(redirectCommon);
            FormMax.SetRedirector(redirectCommon);
            FormMin.SetRedirector(redirectCommon);
            FormRestore.SetRedirector(redirectCommon);
            PendantClose.SetRedirector(redirectCommon);
            PendantMin.SetRedirector(redirectCommon);
            PendantRestore.SetRedirector(redirectCommon);
            WorkspaceMaximize.SetRedirector(redirectCommon);
            WorkspaceRestore.SetRedirector(redirectCommon);
            RibbonMinimize.SetRedirector(redirectCommon);
            RibbonExpand.SetRedirector(redirectCommon);

            // Hook into the storage change events
            Common.ButtonSpecChanged            += OnButtonSpecChanged;
            Generic.ButtonSpecChanged           += OnButtonSpecChanged;
            Close.ButtonSpecChanged             += OnButtonSpecChanged;
            Context.ButtonSpecChanged           += OnButtonSpecChanged;
            Next.ButtonSpecChanged              += OnButtonSpecChanged;
            Previous.ButtonSpecChanged          += OnButtonSpecChanged;
            ArrowLeft.ButtonSpecChanged         += OnButtonSpecChanged;
            ArrowRight.ButtonSpecChanged        += OnButtonSpecChanged;
            ArrowUp.ButtonSpecChanged           += OnButtonSpecChanged;
            ArrowDown.ButtonSpecChanged         += OnButtonSpecChanged;
            DropDown.ButtonSpecChanged          += OnButtonSpecChanged;
            PinVertical.ButtonSpecChanged       += OnButtonSpecChanged;
            PinHorizontal.ButtonSpecChanged     += OnButtonSpecChanged;
            FormClose.ButtonSpecChanged         += OnButtonSpecChanged;
            FormMax.ButtonSpecChanged           += OnButtonSpecChanged;
            FormMin.ButtonSpecChanged           += OnButtonSpecChanged;
            FormRestore.ButtonSpecChanged       += OnButtonSpecChanged;
            PendantClose.ButtonSpecChanged      += OnButtonSpecChanged;
            PendantMin.ButtonSpecChanged        += OnButtonSpecChanged;
            PendantRestore.ButtonSpecChanged    += OnButtonSpecChanged;
            WorkspaceMaximize.ButtonSpecChanged += OnButtonSpecChanged;
            WorkspaceRestore.ButtonSpecChanged  += OnButtonSpecChanged;
            RibbonMinimize.ButtonSpecChanged    += OnButtonSpecChanged;
            RibbonExpand.ButtonSpecChanged      += OnButtonSpecChanged;
        }
        /// <summary>
        /// Initialize a new instance of the KryptonPaletteButtonSpecs class.
        /// </summary>
        /// <param name="redirector">Palette redirector for sourcing inherited values.</param>
        internal KryptonPaletteButtonSpecs(PaletteRedirect redirector)
        {
            Debug.Assert(redirector != null);

            // Create exposed button specifications
            _common = new KryptonPaletteButtonSpecTyped(redirector);
            _generic = new KryptonPaletteButtonSpecTyped(redirector);
            _close = new KryptonPaletteButtonSpecTyped(redirector);
            _context = new KryptonPaletteButtonSpecTyped(redirector);
            _next = new KryptonPaletteButtonSpecTyped(redirector);
            _previous = new KryptonPaletteButtonSpecTyped(redirector);
            _arrowLeft = new KryptonPaletteButtonSpecTyped(redirector);
            _arrowRight = new KryptonPaletteButtonSpecTyped(redirector);
            _arrowUp = new KryptonPaletteButtonSpecTyped(redirector);
            _arrowDown = new KryptonPaletteButtonSpecTyped(redirector);
            _dropDown = new KryptonPaletteButtonSpecTyped(redirector);
            _pinVertical = new KryptonPaletteButtonSpecTyped(redirector);
            _pinHorizontal = new KryptonPaletteButtonSpecTyped(redirector);
            _formClose = new KryptonPaletteButtonSpecTyped(redirector);
            _formMax = new KryptonPaletteButtonSpecTyped(redirector);
            _formMin = new KryptonPaletteButtonSpecTyped(redirector);
            _formRestore = new KryptonPaletteButtonSpecTyped(redirector);
            _pendantClose = new KryptonPaletteButtonSpecTyped(redirector);
            _pendantMin = new KryptonPaletteButtonSpecTyped(redirector);
            _pendantRestore = new KryptonPaletteButtonSpecTyped(redirector);
            _workspaceMaximize = new KryptonPaletteButtonSpecTyped(redirector);
            _workspaceRestore = new KryptonPaletteButtonSpecTyped(redirector);
            _ribbonMinimize = new KryptonPaletteButtonSpecTyped(redirector);
            _ribbonExpand = new KryptonPaletteButtonSpecTyped(redirector);

            // Create redirector for inheriting from style specific to style common
            PaletteRedirectButtonSpec redirectCommon = new PaletteRedirectButtonSpec(redirector, _common);

            // Inform the button spec to use the new redirector
            _generic.SetRedirector(redirectCommon);
            _close.SetRedirector(redirectCommon);
            _context.SetRedirector(redirectCommon);
            _next.SetRedirector(redirectCommon);
            _previous.SetRedirector(redirectCommon);
            _arrowLeft.SetRedirector(redirectCommon);
            _arrowRight.SetRedirector(redirectCommon);
            _arrowUp.SetRedirector(redirectCommon);
            _arrowDown.SetRedirector(redirectCommon);
            _dropDown.SetRedirector(redirectCommon);
            _pinVertical.SetRedirector(redirectCommon);
            _pinHorizontal.SetRedirector(redirectCommon);
            _formClose.SetRedirector(redirectCommon);
            _formMax.SetRedirector(redirectCommon);
            _formMin.SetRedirector(redirectCommon);
            _formRestore.SetRedirector(redirectCommon);
            _pendantClose.SetRedirector(redirectCommon);
            _pendantMin.SetRedirector(redirectCommon);
            _pendantRestore.SetRedirector(redirectCommon);
            _workspaceMaximize.SetRedirector(redirectCommon);
            _workspaceRestore.SetRedirector(redirectCommon);
            _ribbonMinimize.SetRedirector(redirectCommon);
            _ribbonExpand.SetRedirector(redirectCommon);

            // Hook into the storage change events
            _common.ButtonSpecChanged += new EventHandler(OnButtonSpecChanged);
            _generic.ButtonSpecChanged += new EventHandler(OnButtonSpecChanged);
            _close.ButtonSpecChanged += new EventHandler(OnButtonSpecChanged);
            _context.ButtonSpecChanged += new EventHandler(OnButtonSpecChanged);
            _next.ButtonSpecChanged += new EventHandler(OnButtonSpecChanged);
            _previous.ButtonSpecChanged += new EventHandler(OnButtonSpecChanged);
            _arrowLeft.ButtonSpecChanged += new EventHandler(OnButtonSpecChanged);
            _arrowRight.ButtonSpecChanged += new EventHandler(OnButtonSpecChanged);
            _arrowUp.ButtonSpecChanged += new EventHandler(OnButtonSpecChanged);
            _arrowDown.ButtonSpecChanged += new EventHandler(OnButtonSpecChanged);
            _dropDown.ButtonSpecChanged += new EventHandler(OnButtonSpecChanged);
            _pinVertical.ButtonSpecChanged += new EventHandler(OnButtonSpecChanged);
            _pinHorizontal.ButtonSpecChanged += new EventHandler(OnButtonSpecChanged);
            _formClose.ButtonSpecChanged += new EventHandler(OnButtonSpecChanged);
            _formMax.ButtonSpecChanged += new EventHandler(OnButtonSpecChanged);
            _formMin.ButtonSpecChanged += new EventHandler(OnButtonSpecChanged);
            _formRestore.ButtonSpecChanged += new EventHandler(OnButtonSpecChanged);
            _pendantClose.ButtonSpecChanged += new EventHandler(OnButtonSpecChanged);
            _pendantMin.ButtonSpecChanged += new EventHandler(OnButtonSpecChanged);
            _pendantRestore.ButtonSpecChanged += new EventHandler(OnButtonSpecChanged);
            _workspaceMaximize.ButtonSpecChanged += new EventHandler(OnButtonSpecChanged);
            _workspaceRestore.ButtonSpecChanged += new EventHandler(OnButtonSpecChanged);
            _ribbonMinimize.ButtonSpecChanged += new EventHandler(OnButtonSpecChanged);
            _ribbonExpand.ButtonSpecChanged += new EventHandler(OnButtonSpecChanged);
        }