コード例 #1
0
 private void Init()
 {
     TxtIssue.Text       = Model.Issue;
     DpDate.SelectedDate = Model.Date;
     TxtStart.Text       = Model.Start;
     TxtEnd.Text         = Model.End;
     TxtDuration.Text    = WorkLogHelper.SecondsToString(Model.DurationSeconds);
     TxtComment.Text     = Model.Comment;
     SetTxtDuration();
     TxtIssue.Focus();
 }
コード例 #2
0
        /// <summary>
        /// Calculates and sets the total value for the day
        /// </summary>
        private void CalculateDayTotal()
        {
            var totalSeconds = _logs.Sum(log => log.DurationSeconds);

            LblCurrentDayTotal.Content = WorkLogHelper.SecondsToString(totalSeconds);
        }
コード例 #3
0
        private void SetTxtDuration()
        {
            var durationSeconds = WorkLogHelper.CalculateDurationSeconds(TxtStart.Text, TxtEnd.Text);

            TxtDuration.Text = WorkLogHelper.SecondsToString(durationSeconds);
        }