protected override void OnTimer() { PointerCollection pointers = c1RadialGauge1.MorePointers; double seconds = DateTime.Now.TimeOfDay.TotalSeconds; pointers["hours"].Value = Math.Floor((seconds % 43200.0) / 3600.0); pointers["minutes"].Value = Math.Floor((seconds - (Math.Floor(seconds / 3600.0) * 3600.0)) / 60.0); pointers["seconds"].Value = seconds - (Math.Floor(seconds / 60.0) * 60.0); }
private void timer1_Tick_1(object sender, EventArgs e) { UpdateValue(c1RadialGauge1, 5); UpdateValue(c1RadialGauge2, 5); PointerCollection pointers = c1RadialGauge2.MorePointers; pointers["pointerOffset"].Value = c1RadialGauge2.Value > 95 ? 100 : c1RadialGauge2.Value + 5; UpdateValue(c1LinearGauge1, 5); UpdateValue(c1LinearGauge2, 5); }