Siticone Analog Clock
The SiticoneAnalogClock is a high-performance, fully customizable analog clock control.
It features a modern design with independent hand styling, optional face numbers, and precise time event triggers. It is optimized for minimal CPU usage even when updating every second.
Appearance & Styling
Customize every aspect of the clock's visual presentation.
| Property | Type | Description & Usage Example |
|---|---|---|
FaceColor |
Color | clock.FaceColor = Color.FromArgb(30, 30, 30); The background color of the clock dial. |
BorderColor |
Color | clock.BorderColor = Color.Silver; The color of the outer rim. |
HourHandColor |
Color | clock.HourHandColor = Color.White; Color of the hour hand. |
MinuteHandColor |
Color | clock.MinuteHandColor = Color.White; Color of the minute hand. |
SecondHandColor |
Color | clock.SecondHandColor = Color.Red; Color of the second hand. |
TickColor |
Color | clock.TickColor = Color.Gray; Color of the minute/hour markers. |
Numerals
Control the display of numbers on the clock face.
| Property | Type | Description & Usage Example |
|---|---|---|
ShowNumbers |
bool | clock.ShowNumbers = true; Toggles the display of numbers (1-12). |
NumbersColor |
Color | clock.NumbersColor = Color.LightGray; The color of the clock numbers. |
NumbersFont |
Font | clock.NumbersFont = new Font("Segoe UI", 12f, FontStyle.Bold); The font used for drawing the numbers. |
Performance
Optimization settings for resource-constrained environments.
| Property | Type | Description & Usage Example |
|---|---|---|
UltraFastPerformance |
bool | clock.UltraFastPerformance = true; Disables high-quality rendering (anti-aliasing) and reduces refresh rate to 1 FPS for maximum efficiency. |
Events
Respond to time changes.
// 1. SecondChanged Event
// Fires when the second value changes.
clock.SecondChanged += (s, e) =>
{
Console.WriteLine($"Tick: {e.NewValue}");
};
// 2. HourChanged Event
// Fires when the hour value changes.
clock.HourChanged += (s, e) =>
{
PlayHourlyChime();
};
// 3. TimeChanged Event
// Fires every update tick.
clock.TimeChanged += (s, e) =>
{
// Custom logic per tick
};
Detailed Usage Examples
Example 1: Dark Theme Clock
Creating a modern dark-themed clock suitable for dashboard applications.
private void ApplyDarkTheme()
{
clock.FaceColor = Color.FromArgb(30, 30, 30);
clock.BorderColor = Color.FromArgb(50, 50, 50);
clock.HourHandColor = Color.WhiteSmoke;
clock.MinuteHandColor = Color.WhiteSmoke;
clock.SecondHandColor = Color.OrangeRed;
clock.NumbersColor = Color.LightGray;
clock.TickColor = Color.DimGray;
// Optional: Disable numbers for a cleaner look
clock.ShowNumbers = false;
}
Example 2: "Swiss Railway" Style
Mimicking the classic Swiss railway clock design.
private void ApplySwissStyle()
{
clock.FaceColor = Color.White;
clock.BorderColor = Color.Black;
// Thick black hands
clock.HourHandColor = Color.Black;
clock.MinuteHandColor = Color.Black;
// Distinctive red second hand
clock.SecondHandColor = Color.Red;
clock.ShowNumbers = false;
clock.TickColor = Color.Black;
}
Example 3: Power Saving Mode
Dynamically switching to ultra-fast performance mode when battery is low.
private void OnPowerStatusChanged(object sender, EventArgs e)
{
if (SystemInformation.PowerStatus.PowerLineStatus == PowerLineStatus.Offline)
{
// Reduce CPU usage by lowering refresh rate and disabling anti-aliasing
clock.UltraFastPerformance = true;
}
else
{
// Restore high-quality rendering
clock.UltraFastPerformance = false;
}
}