Siticone Celestial Clock
The SiticoneCelestialClock is a unique, space-themed timekeeping component.
Instead of traditional hands, it visualizes time using planetary bodies orbiting a central star. The component includes a dynamic starfield background, glow effects, and smooth orbital animations.
Cosmic Appearance
Customize the colors of the celestial bodies and the deep space environment.
| Property | Type | Description & Usage Example |
|---|---|---|
SpaceColor |
Color | clock.SpaceColor = Color.FromArgb(10, 20, 40); The background color representing deep space. |
StarColor |
Color | clock.StarColor = Color.LightYellow; The color of the randomly generated background stars. |
SunColor |
Color | clock.SunColor = Color.Gold; The color of the central star (pivot point). |
HourPlanetColor |
Color | clock.HourPlanetColor = Color.CornflowerBlue; The color of the planet representing the Hour hand (innermost orbit). |
MinutePlanetColor |
Color | clock.MinutePlanetColor = Color.LightBlue; The color of the planet representing the Minute hand. |
SecondCometColor |
Color | clock.SecondCometColor = Color.White; The color of the small body representing Seconds (outermost orbit). |
Orbital Mechanics & Overlay
Control the visual elements of the orbits and the numeric overlay.
| Property | Type | Description & Usage Example |
|---|---|---|
ShowOrbits |
bool | clock.ShowOrbits = true; Toggles the visibility of the circular path lines. |
OrbitColor |
Color | clock.OrbitColor = Color.DimGray; The color of the orbital path lines. |
EnableGlow |
bool | clock.EnableGlow = true; Adds a radiant glow effect to the Sun and Planets. |
ShowNumbers |
bool | clock.ShowNumbers = true; Displays standard clock numbers (1-12) overlaid on the solar system. |
NumberColor |
Color | clock.NumberColor = Color.White; The color of the clock numbers. |
Events
Precise time-tracking events for application logic.
// 1. SecondChanged Event
// Fires every second. Useful for synchronization.
clock.SecondChanged += (s, e) =>
{
Console.WriteLine($"Current Second: {e.NewSecond}");
};
// 2. HourChanged Event
// Fires when the hour changes. Ideal for alarms.
clock.HourChanged += (s, e) =>
{
PlayHourChime();
};
// 3. TimeChanged Event
// Fires on every internal tick update (approx 40ms).
clock.TimeChanged += (s, e) =>
{
// Smooth animation logic
};
Detailed Usage Examples
Example 1: Deep Space Theme
A high-contrast, dark theme resembling deep space exploration.
private void ApplyDeepSpaceTheme()
{
// Background
clock.SpaceColor = Color.FromArgb(10, 15, 30);
clock.StarColor = Color.FromArgb(200, 200, 255);
// Celestial Bodies
clock.SunColor = Color.FromArgb(255, 200, 50); // Yellow Dwarf
clock.HourPlanetColor = Color.CornflowerBlue; // Earth-like
clock.MinutePlanetColor = Color.OrangeRed; // Mars-like
clock.SecondCometColor = Color.White; // Comet
// Effects
clock.EnableGlow = true;
clock.OrbitColor = Color.FromArgb(50, 255, 255, 255); // Faint trails
clock.ShowNumbers = true;
clock.NumberColor = Color.FromArgb(100, 255, 255, 255);
}
Example 2: Realistic Solar System
A theme mimicking the actual colors of our solar system components.
private void ApplySolarSystemTheme()
{
clock.SpaceColor = Color.Black;
clock.SunColor = Color.Gold;
// Mercury/Venus tone for Hour
clock.HourPlanetColor = Color.SandyBrown;
// Earth tone for Minute
clock.MinutePlanetColor = Color.DodgerBlue;
// Moon/asteroid for Second
clock.SecondCometColor = Color.LightGray;
clock.ShowOrbits = true;
clock.OrbitColor = Color.DarkGray;
// Hide numbers for realism
clock.ShowNumbers = false;
}
Example 3: Retrowave / Cyberpunk
A neon-infused aesthetic typical of synthwave designs.
private void ApplyNeonTheme()
{
clock.SpaceColor = Color.FromArgb(20, 0, 40); // Deep Purple
clock.SunColor = Color.Magenta;
clock.HourPlanetColor = Color.Cyan;
clock.MinutePlanetColor = Color.LimeGreen;
clock.SecondCometColor = Color.Yellow;
clock.OrbitColor = Color.DeepPink;
clock.EnableGlow = true;
clock.ShowNumbers = true;
clock.NumberFont = new Font("Consolas", 12f, FontStyle.Bold);
clock.NumberColor = Color.Cyan;
}
Example 4: Minimalist Void
A clean, high-contrast look suitable for white backgrounds.
private void ApplyMinimalTheme()
{
clock.SpaceColor = Color.White;
clock.StarColor = Color.Transparent; // Hide stars
clock.SunColor = Color.Black;
clock.HourPlanetColor = Color.DimGray;
clock.MinutePlanetColor = Color.Gray;
clock.SecondCometColor = Color.LightGray;
clock.ShowOrbits = true;
clock.OrbitColor = Color.LightGray;
clock.EnableGlow = false; // Flat look
clock.ShowNumbers = true;
clock.NumberColor = Color.Black;
}
Example 5: Event-Driven Alarm
Triggering logic based on the clock's specific `HourChanged` event.
public void InitializeClockEvents()
{
siticoneCelestialClock1.HourChanged += CheckShiftChange;
}
private void CheckShiftChange(object sender, SiticoneCelestialHourChangedEventArgs e)
{
// Change space color based on time of day (Day/Night cycle)
if (e.NewHour >= 6 && e.NewHour < 18)
{
// Day Shift
siticoneCelestialClock1.SpaceColor = Color.SkyBlue;
siticoneCelestialClock1.SunColor = Color.Orange;
}
else
{
// Night Shift
siticoneCelestialClock1.SpaceColor = Color.FromArgb(10, 20, 40);
siticoneCelestialClock1.SunColor = Color.White;
}
}