Clock
A heavily customisable Clock .NET Control for WinForms .NET.
public class Clock : DoubleBufferedControlBase
Inherits from / implements: DoubleBufferedControlBase
Members at a glance
Clock | Initializes a new instance of the Clock class. |
BackgroundEndColor | Gets or sets the end color of the background. |
BackgroundStartColor | Gets or sets the start color of the background. |
BorderEndColor | Gets or sets the end color of the border. |
BorderGlassEndColor | Gets or sets the end color of the border glass. |
BorderGlassRenderingAlphaComponent | Gets or sets the border glass rendering alpha component. |
BorderGlassStartColor | Gets or sets the start color of the border glass. |
BorderStartColor | Gets or sets the start color of the border. |
BorderThickness | Gets or sets the border thickness. |
DropShadowColor | Gets or sets the color of the drop-shadow. |
GlassEndColor | Gets or sets the end color of the glass. |
GlassRenderingAlphaComponent | Gets or sets the glass rendering alpha component. |
GlassStartColor | Gets or sets the start color of the glass. |
GradientDrawingAngleForCircularArtefacts | Gets or sets the gradient drawing angle for circular artefacts. |
GradientDrawingAngleForTimeNeedles | Gets or sets the gradient drawing angle for time needles. |
HourHandEndColor | Gets or sets the end color of the hour hand. |
HourHandStartColor | Gets or sets the start color of the hour hand. |
HourNeedleWidth | Gets or sets the width of the hour needle, in logical (96 DPI) units. The default is 9. |
InnerRingEndColor | Gets or sets the end color of the inner ring. |
InnerRingShapeBounds | Gets or sets the inner ring shape bounds. |
InnerRingStartColor | Gets or sets the start color of the inner ring. |
MaxBorderThickness | Gets or sets the maximum border thickness. |
MinuteHandEndColor | Gets or sets the end color of the minute hand. |
MinuteHandStartColor | Gets or sets the start color of the minute hand. |
MinuteIndicatorVisual | Gets or sets the minute indicator visual. |
MinuteIndicatorVisualColor | Gets or sets the color of the minute indicator visual. |
MinuteIndicatorVisualFont | Gets or sets the minute indicator visual's font. |
MinuteNeedleWidth | Gets or sets the width of the minute needle, in logical (96 DPI) units. The default is 6. |
NumeralsColor | Gets or sets the color of the numerals. |
NumeralsFont | Gets or sets the numerals font. |
RefreshInterval | Gets or sets the refresh interval. |
SecondHandEndColor | Gets or sets the end color of the second hand. |
SecondHandStartColor | Gets or sets the start color of the second hand. |
SecondNeedleWidth | Gets or sets the width of the second needle, in logical (96 DPI) units. The default is 2. |
ShouldDrawBorder | Gets or sets a value indicating whether the control should draw border. |
ShouldDrawDropShadowForTimeHandles | Gets or sets a value indicating whether the control should draw drop-shadow for time handles. |
ShouldDrawGlassEffect | Gets or sets a value indicating whether the control should draw glass effect. |
ShouldDrawGlassEffectOnBorder | Gets or sets a value indicating whether the control should draw glass effect on its border. |
ShouldDrawInnerRing | Gets or sets a value indicating whether the control should draw inner ring. |
ShouldDrawMinuteIndicatorVisual | Gets or sets a value indicating whether the control should draw minute indicator visual. |
ShouldDrawNumerals | Gets or sets a value indicating whether the control shouldshould draw numerals. |
ShouldDropShadowBeEnabled | Gets or sets a value indicating whether the control should enable the drop-shadow for the clock. |
StaticTime | Gets or sets the static time. |
Time | Gets the time the clock shows: StaticTime when it is set, otherwise the time now in TimeZoneId's zone, or on this computer when that is empty. |
TimeRepresentationMode | Gets or sets the time representation mode. |
TimeZoneId | Gets or sets the identifier of the time zone whose time the clock shows - a Windows time-zone id such as "Eastern Standard Time" or "Tokyo Standard Time" - or null for the computer's own. |
OnPaint | Raises the Paint event. Clock overrides it so the control's own handling runs alongside the base behavior. |
Restart | Restarts the timer in the control. |
Constructors
Clock
Initializes a new instance of the Clock class.
Properties
BackgroundEndColor
Gets or sets the end color of the background.
BackgroundStartColor
Gets or sets the start color of the background.
BorderEndColor
Gets or sets the end color of the border.
BorderGlassEndColor
Gets or sets the end color of the border glass.
Value. The end color of the border glass.
BorderGlassRenderingAlphaComponent
Gets or sets the border glass rendering alpha component.
Value. The border glass rendering alpha component.
BorderGlassStartColor
Gets or sets the start color of the border glass.
Value. The start color of the border glass.
BorderStartColor
Gets or sets the start color of the border.
BorderThickness
Gets or sets the border thickness.
DropShadowColor
Gets or sets the color of the drop-shadow.
GlassEndColor
Gets or sets the end color of the glass.
Value. The end color of the glass.
GlassRenderingAlphaComponent
Gets or sets the glass rendering alpha component.
Value. The glass rendering alpha component.
GlassStartColor
Gets or sets the start color of the glass.
Value. The start color of the glass.
GradientDrawingAngleForCircularArtefacts
Gets or sets the gradient drawing angle for circular artefacts.
Value. The gradient drawing angle for circular artefacts.
GradientDrawingAngleForTimeNeedles
Gets or sets the gradient drawing angle for time needles.
Value. The gradient drawing angle for time needles.
HourHandEndColor
Gets or sets the end color of the hour hand.
HourHandStartColor
Gets or sets the start color of the hour hand.
HourNeedleWidth
Gets or sets the width of the hour needle, in logical (96 DPI) units. The default is 9.
Value. The width of the hour needle.
InnerRingEndColor
Gets or sets the end color of the inner ring.
InnerRingShapeBounds
Gets or sets the inner ring shape bounds.
InnerRingStartColor
Gets or sets the start color of the inner ring.
MaxBorderThickness
Gets or sets the maximum border thickness.
Value. The maximum border thickness.
MinuteHandEndColor
Gets or sets the end color of the minute hand.
MinuteHandStartColor
Gets or sets the start color of the minute hand.
MinuteIndicatorVisual
Gets or sets the minute indicator visual.
Value. The minute indicator visual.
MinuteIndicatorVisualColor
Gets or sets the color of the minute indicator visual.
Value. The color of the minute indicator visual.
MinuteIndicatorVisualFont
Gets or sets the minute indicator visual's font.
Value. The minute indicator visual's font.
MinuteNeedleWidth
Gets or sets the width of the minute needle, in logical (96 DPI) units. The default is 6.
Value. The width of the minute needle.
NumeralsColor
Gets or sets the color of the numerals.
Value. The color of the numerals.
NumeralsFont
Gets or sets the numerals font.
Value. The numerals font.
RefreshInterval
Gets or sets the refresh interval.
SecondHandEndColor
Gets or sets the end color of the second hand.
SecondHandStartColor
Gets or sets the start color of the second hand.
SecondNeedleWidth
Gets or sets the width of the second needle, in logical (96 DPI) units. The default is 2.
Value. The width of the second needle.
ShouldDrawBorder
Gets or sets a value indicating whether the control should draw border.
Value. true if the control should draw border; otherwise, false .
ShouldDrawDropShadowForTimeHandles
Gets or sets a value indicating whether the control should draw drop-shadow for time handles.
ShouldDrawGlassEffect
Gets or sets a value indicating whether the control should draw glass effect.
Value. true if the control should draw glass effect; otherwise, false .
ShouldDrawGlassEffectOnBorder
Gets or sets a value indicating whether the control should draw glass effect on its border.
Value. true if the control should draw glass effect on its border; otherwise, false .
ShouldDrawInnerRing
Gets or sets a value indicating whether the control should draw inner ring.
Value. true if the control should draw inner ring; otherwise, false .
ShouldDrawMinuteIndicatorVisual
Gets or sets a value indicating whether the control should draw minute indicator visual.
Value. true if the control should draw minute indicator visual; otherwise, false .
ShouldDrawNumerals
Gets or sets a value indicating whether the control shouldshould draw numerals.
Value. true if the control should draw numerals; otherwise, false .
ShouldDropShadowBeEnabled
Gets or sets a value indicating whether the control should enable the drop-shadow for the clock.
StaticTime
Gets or sets the static time.
Value. The static time.
Time
Gets the time the clock shows: StaticTime when it is set, otherwise the time now in TimeZoneId's zone, or on this computer when that is empty.
Value. The time.
TimeRepresentationMode
Gets or sets the time representation mode.
Value. The time representation mode.
TimeZoneId
Gets or sets the identifier of the time zone whose time the clock shows - a Windows time-zone id such as "Eastern Standard Time" or "Tokyo Standard Time" - or null for the computer's own.
StaticTime can only stop a hand, and a demo that used it to show four faces showed three that never moved (HANDOVER 3bb). StaticTime still wins while it is set. An id the computer does not know throws TimeZoneNotFoundException, so a mistyped one is seen at once rather than quietly showing local time.Methods
OnPaint
Raises the Paint event. Clock overrides it so the control's own handling runs alongside the base behavior.
- e
- The data for the event.
Restart
Restarts the timer in the control.