public TimerUC(TimerEventArgs timerInfo) { InitializeComponent(); _workTime = FormatTime(timerInfo.WorkTime, timerInfo.WorkTimeUnit); _breakTime = FormatTime(timerInfo.BreakTime, timerInfo.BreakTimeUnit); SetTimer(_workTime); progressBar1.Maximum = _seconds + _minutes * 60 + _hours * 3600; workTimeLbl.Text = timerInfo.WorkTime.ToString(); breakTimeLbl.Text = timerInfo.BreakTime.ToString(); }
private void OnCreateTimer(object sender, TimerEventArgs e) { _timerUc = new TimerUC(e); _timerUc.EndTimer += OnEndTimer; LoadUserControl(_timerUc); }