ComponentFactory.Krypton.Toolkit.ViewDrawToday.ViewDrawToday C# (CSharp) Method

ViewDrawToday() public method

Initialize a new instance of the ViewDrawToday class.
public ViewDrawToday ( IKryptonMonthCalendar calendar, IPaletteTriple paletteDisabled, IPaletteTriple paletteNormal, IPaletteTriple paletteTracking, IPaletteTriple palettePressed, NeedPaintHandler needPaintHandler ) : System
calendar IKryptonMonthCalendar Provider of month calendar values.
paletteDisabled IPaletteTriple Palette source for the disabled state.
paletteNormal IPaletteTriple Palette source for the normal state.
paletteTracking IPaletteTriple Palette source for the tracking state.
palettePressed IPaletteTriple Palette source for the pressed state.
needPaintHandler NeedPaintHandler Delegate for requested repainting.
return System
        public ViewDrawToday(IKryptonMonthCalendar calendar,
                             IPaletteTriple paletteDisabled,
                             IPaletteTriple paletteNormal,
                             IPaletteTriple paletteTracking,
                             IPaletteTriple palettePressed,
                             NeedPaintHandler needPaintHandler)
            : base(paletteDisabled, paletteNormal, paletteTracking, palettePressed,
                   paletteNormal, paletteTracking, palettePressed, null,
                   null, VisualOrientation.Top, false)
        {
            _calendar = calendar;

            // We provide the content values for display
            base.ButtonValues = this;

            // Define a controller so the button can be clicked
            ButtonController controller = new ButtonController(this, needPaintHandler);
            controller.Click += new MouseEventHandler(OnClick);
            MouseController = controller;
            SourceController = controller;
            KeyController = controller;
        }