C# Class ComponentFactory.Krypton.Toolkit.ViewLayoutMonths

Extends the ViewComposite by creating/destroying month instances in a grid.
Inheritance: ViewComposite, IContentValues
Mostra file Open project: ComponentFactory/Krypton Class Usage Examples

Private Properties

Property Type Description
FirstDayOfMonth System.DateTime
JustDay System.DateTime
LastDayOfMonth System.DateTime
MaxGridCellDay System.Drawing.Size
MaxGridCellDayOfWeek System.Drawing.Size
OnCancelToolTip void
OnShowToolTip void
OnTodayClick void
OnVisualPopupToolTipDisposed void
SyncData void
SyncMonths void

Public Methods

Method Description
DayFromPoint ( Point pt, bool exact ) : DateTime?

Gets the button for the day that is under the provided point.

DayNearPoint ( Point pt ) : System.DateTime

Gets the button for the day that is nearest (date wise) to the point provided.

GetExtraSize ( ViewLayoutContext context ) : Size

Gets the size required to draw extra elements such as headers.

GetImage ( PaletteState state ) : Image

Gets the content image.

GetImageTransparentColor ( PaletteState state ) : Color

Gets the image color that should be transparent.

GetLongText ( ) : string

Gets the content long text.

GetPreferredSize ( ViewLayoutContext context ) : Size

Discover the preferred size of the element.

GetShortText ( ) : string

Gets the content short text.

GetSingleMonthSize ( ViewLayoutContext context ) : Size

Gets the size required to draw a single month.

Layout ( ViewLayoutContext context ) : void

Perform a layout of the elements.

NextMonth ( ) : void

Move to the next month.

PrevMonth ( ) : void

Move to the previous month.

ProcessKeyDown ( Control c, KeyEventArgs e ) : bool

Process a key down by finding the correct month and calling the associated key controller.

RecreateButtons ( ) : void

Recreate the set of button spec instances.

ToString ( ) : string

Obtains the String representation of this instance.

ViewLayoutMonths ( IContextMenuProvider provider, KryptonContextMenuMonthCalendar monthCalendar, ViewContextMenuManager viewManager, IKryptonMonthCalendar calendar, PaletteRedirect redirector, NeedPaintHandler needPaintDelegate ) : System

Initialize a new instance of the ViewLayoutMonths class.

Private Methods

Method Description
FirstDayOfMonth ( System.DateTime dt ) : System.DateTime
JustDay ( System.DateTime dt ) : System.DateTime
LastDayOfMonth ( System.DateTime dt ) : System.DateTime
MaxGridCellDay ( ViewLayoutContext context ) : Size
MaxGridCellDayOfWeek ( ViewLayoutContext context ) : Size
OnCancelToolTip ( object sender, EventArgs e ) : void
OnShowToolTip ( object sender, ToolTipEventArgs e ) : void
OnTodayClick ( object sender, EventArgs e ) : void
OnVisualPopupToolTipDisposed ( object sender, EventArgs e ) : void
SyncData ( ViewLayoutContext context ) : void
SyncMonths ( ) : void

Method Details

DayFromPoint() public method

Gets the button for the day that is under the provided point.
public DayFromPoint ( Point pt, bool exact ) : DateTime?
pt Point Point to lookup.
exact bool Exact requires that the day must be with the month range.
return DateTime?

DayNearPoint() public method

Gets the button for the day that is nearest (date wise) to the point provided.
public DayNearPoint ( Point pt ) : System.DateTime
pt Point Point to lookup.
return System.DateTime

GetExtraSize() public method

Gets the size required to draw extra elements such as headers.
public GetExtraSize ( ViewLayoutContext context ) : Size
context ViewLayoutContext Layout context.
return System.Drawing.Size

GetImage() public method

Gets the content image.
public GetImage ( PaletteState state ) : Image
state PaletteState The state for which the image is needed.
return Image

GetImageTransparentColor() public method

Gets the image color that should be transparent.
public GetImageTransparentColor ( PaletteState state ) : Color
state PaletteState The state for which the image is needed.
return Color

GetLongText() public method

Gets the content long text.
public GetLongText ( ) : string
return string

GetPreferredSize() public method

Discover the preferred size of the element.
public GetPreferredSize ( ViewLayoutContext context ) : Size
context ViewLayoutContext Layout context.
return System.Drawing.Size

GetShortText() public method

Gets the content short text.
public GetShortText ( ) : string
return string

GetSingleMonthSize() public method

Gets the size required to draw a single month.
public GetSingleMonthSize ( ViewLayoutContext context ) : Size
context ViewLayoutContext Layout context.
return System.Drawing.Size

Layout() public method

Perform a layout of the elements.
public Layout ( ViewLayoutContext context ) : void
context ViewLayoutContext Layout context.
return void

NextMonth() public method

Move to the next month.
public NextMonth ( ) : void
return void

PrevMonth() public method

Move to the previous month.
public PrevMonth ( ) : void
return void

ProcessKeyDown() public method

Process a key down by finding the correct month and calling the associated key controller.
public ProcessKeyDown ( Control c, KeyEventArgs e ) : bool
c System.Windows.Forms.Control Owning control.
e System.Windows.Forms.KeyEventArgs A KeyEventArgs that contains the event data.
return bool

RecreateButtons() public method

Recreate the set of button spec instances.
public RecreateButtons ( ) : void
return void

ToString() public method

Obtains the String representation of this instance.
public ToString ( ) : string
return string

ViewLayoutMonths() public method

Initialize a new instance of the ViewLayoutMonths class.
public ViewLayoutMonths ( IContextMenuProvider provider, KryptonContextMenuMonthCalendar monthCalendar, ViewContextMenuManager viewManager, IKryptonMonthCalendar calendar, PaletteRedirect redirector, NeedPaintHandler needPaintDelegate ) : System
provider IContextMenuProvider Provider of context menu information.
monthCalendar KryptonContextMenuMonthCalendar Reference to owning month calendar entry.
viewManager ViewContextMenuManager Owning view manager instance.
calendar IKryptonMonthCalendar Reference to calendar provider.
redirector PaletteRedirect Redirector for getting values.
needPaintDelegate NeedPaintHandler Delegate for requesting paint changes.
return System