Siticone Orbital Clock
The SiticoneOrbitalClock is a visually striking, celestial-themed timekeeping control.
It replaces traditional hands with planets orbiting a central star, set against a dynamic, randomly generated starfield background.
Celestial Appearance
Customize the colors of the space environment and the planetary bodies.
| 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 distant stars scattered in the background. |
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 & Effects
Control the visibility of orbits and glow effects to enhance the cosmic feel.
| Property | Type | Description & Usage Example |
|---|---|---|
ShowOrbits |
bool | clock.ShowOrbits = true; Toggles the visibility of the circular path lines (orbits). |
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. |
Events
Precise time-tracking events for synchronizing application logic.
// 1. SecondChanged Event
// Fires every second. Useful for updating other UI elements.
clock.SecondChanged += (s, e) =>
{
Console.WriteLine($"Orbit position: {e.NewSecond}");
};
// 2. HourChanged Event
// Fires when the hour changes. Ideal for day/night cycle logic.
clock.HourChanged += (s, e) =>
{
TriggerShiftChange();
};
// 3. TimeChanged Event
// Fires on every internal tick update (approx 40ms) for smooth animation.
clock.TimeChanged += (s, e) =>
{
// e.CurrentTime holds the precise time
};
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
}
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;
}
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;
}
Example 4: Event-Driven Logic
Triggering logic based on the clock's specific `HourChanged` event.
public void InitializeClockEvents()
{
siticoneOrbitalClock1.HourChanged += CheckShiftChange;
}
private void CheckShiftChange(object sender, SiticoneOrbitalHourChangedEventArgs e)
{
// Change space color based on time of day (Day/Night cycle)
if (e.NewHour >= 6 && e.NewHour < 18)
{
// Day Shift
siticoneOrbitalClock1.SpaceColor = Color.SkyBlue;
siticoneOrbitalClock1.SunColor = Color.Orange;
}
else
{
// Night Shift
siticoneOrbitalClock1.SpaceColor = Color.FromArgb(10, 20, 40);
siticoneOrbitalClock1.SunColor = Color.White;
}
}