/// <summary> /// Initialize a new instance of the PaletteTripleRedirect class. /// </summary> /// <param name="redirect">inheritance 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 PaletteTripleRedirect(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 PaletteContent(_contentInherit, needPaint); }
/// <summary> /// Initialize a new instance of the PaletteTreeStateRedirect class. /// </summary> /// <param name="redirect">inheritance redirection instance.</param> /// <param name="back">Storage for back values.</param> /// <param name="backInherit">inheritance for back values.</param> /// <param name="border">Storage for border values.</param> /// <param name="borderInherit">inheritance for border values.</param> /// <param name="needPaint">Delegate for notifying paint requests.</param> public PaletteTreeStateRedirect(PaletteRedirect redirect, PaletteBack back, PaletteBackInheritRedirect backInherit, PaletteBorder border, PaletteBorderInheritRedirect borderInherit, NeedPaintHandler needPaint) : base(redirect, back, backInherit, border, borderInherit, needPaint) { Debug.Assert(redirect != null); // Remember the redirect reference _redirect = redirect; // Create the item redirector Node = new PaletteTripleRedirect(redirect, PaletteBackStyle.ButtonListItem, PaletteBorderStyle.ButtonListItem, PaletteContentStyle.ButtonListItem, needPaint); }
/// <summary> /// Initialize a new instance of the PaletteInputControlTripleRedirect class. /// </summary> /// <param name="redirect">inheritance 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 PaletteInputControlTripleRedirect(PaletteRedirect redirect, PaletteBackStyle backStyle, PaletteBorderStyle borderStyle, PaletteContentStyle contentStyle, NeedPaintHandler needPaint) { Debug.Assert(redirect != null); // 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); _metricRedirect = new PaletteMetricRedirect(redirect); // Create storage that maps onto the inherit instances Back = new PaletteInputControlBackStates(_backInherit, needPaint); Border = new PaletteBorder(_borderInherit, needPaint); Content = new PaletteInputControlContentStates(_contentInherit, needPaint); }
/// <summary> /// Constructor /// </summary> public KryptonOutlookGridGroupBox() { // To remove flicker we use double buffering for drawing SetStyle( ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer | ControlStyles.ResizeRedraw, true); InitializeComponent(); columnsList = new List <OutlookGridGroupBoxColumn>(); // Cache the current global palette setting _palette = KryptonManager.CurrentGlobalPalette; // Hook into palette events if (_palette != null) { _palette.PalettePaint += new EventHandler <PaletteLayoutEventArgs>(OnPalettePaint); } // (4) We want to be notified whenever the global palette changes KryptonManager.GlobalPaletteChanged += new EventHandler(OnGlobalPaletteChanged); // Create redirection object to the base palette _paletteRedirect = new PaletteRedirect(_palette); // Create accessor objects for the back, border and content // Store the inherit instances _paletteBack = new PaletteBackInheritRedirect(_paletteRedirect); _paletteBorder = new PaletteBorderInheritRedirect(_paletteRedirect); _paletteContent = new PaletteContentInheritRedirect(_paletteRedirect); _paletteDataGridView = new PaletteDataGridViewRedirect(_paletteRedirect, null); _paletteDataGridViewAll = new PaletteDataGridViewAll(_paletteDataGridView, null); // Create storage that maps onto the inherit instances _border = new PaletteBorder(_paletteBorder, null); }
/// <summary> /// Initialize a new instance of the PaletteTreeState class. /// </summary> /// <param name="inherit">Source for inheriting values.</param> /// <param name="back">Reference to back storage.</param> /// <param name="border">Reference to border storage.</param> /// <param name="needPaint">Delegate for notifying paint requests.</param> public PaletteTreeState(PaletteTreeStateRedirect inherit, PaletteBack back, PaletteBorder border, NeedPaintHandler needPaint) : base(inherit, back, border, needPaint) =>