Help to deal with the timer. It is necessary that it shows minutes and seconds, as well as a countdown.
I can't add minutes. Time is stupid and that's all. Type field 00:60, the first minute should appear, and seconds to go from the beginning (01:00), but I just have seconds to go (60, 61, 62, etc.), how can I fix this?
public int sec, min; private void Timer_Tick(object sender, object e) { if (sec == 60) { sec = 60; min += 1; } if (min == 60) min = 1; } private void progressBar_ValueChanged(object sender, RangeBaseValueChangedEventArgs e) { textBlock1.Text = ProgressPos.Value.ToString(); textBlock2.Text = ProgressPos.Value.ToString(":"+min + "" + sec); }
if (sec == 60) sec = 60;
what is this for? - qzavyertimer = new DispatcherTimer() { Interval = new TimeSpan() }; timer.Tick += Timer_Tick; timer.Start();
- Cocaine Snow