Exemple #1
0
        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();
        }
Exemple #2
0
 private void OnCreateTimer(object sender, TimerEventArgs e)
 {
     _timerUc           = new TimerUC(e);
     _timerUc.EndTimer += OnEndTimer;
     LoadUserControl(_timerUc);
 }