Example #1
0
 private void setUIToRunningState(Toggl.TogglTimeEntryView item)
 {
     this.resetUIState(true);
     this.timeEntryLabel.ViewModel = item.ToTimeEntryLabelViewModel();
     this.durationLabel.Text       = Toggl.FormatDurationInSecondsHHMMSS(item.DurationInSeconds);
     this.durationPanel.ToolTip    = "started at " + item.StartTimeString;
 }
Example #2
0
        private void setupSecondsTimer()
        {
            this.secondsTimer.Interval = TimeSpan.FromSeconds(1);
            this.secondsTimer.Tick    += (sender, args) =>
            {
                if (!this.isRunning)
                {
                    return;
                }

                var s = Toggl.FormatDurationInSecondsHHMMSS(this.runningTimeEntry.DurationInSeconds);
                durationLabel.Text = s;
            };
        }
Example #3
0
        private void timerRunningDuration_Tick(object sender, EventArgs e)
        {
            if (duration_in_seconds >= 0)
            {
                // Timer is not running
                return;
            }
            string s = Toggl.FormatDurationInSecondsHHMMSS(duration_in_seconds);

            if (s != linkLabelDuration.Text)
            {
                linkLabelDuration.Text = s;
            }
        }
        private void timerRunningDuration_Tick(object sender, EventArgs e)
        {
            if (timeEntry.Equals(null) || timeEntry.DurationInSeconds >= 0)
            {
                return;
            }
            if (textBoxDuration.Focused)
            {
                return;
            }
            string s = Toggl.FormatDurationInSecondsHHMMSS(timeEntry.DurationInSeconds);

            if (s != textBoxDuration.Text)
            {
                textBoxDuration.Text = s;
            }
        }
Example #5
0
        private void setupSecondsTimer()
        {
            this.secondsTimer.Interval = TimeSpan.FromSeconds(1);
            this.secondsTimer.Tick    += (sender, args) =>
            {
                if (!this.isRunning)
                {
                    return;
                }

                var s = Toggl.FormatDurationInSecondsHHMMSS(this.runningTimeEntry.DurationInSeconds);

                if (this.RunningTimeEntrySecondPulse != null)
                {
                    this.RunningTimeEntrySecondPulse(this, s);
                }
            };
        }
Example #6
0
        private void setRunningDurationLabels()
        {
            var s = Toggl.FormatDurationInSecondsHHMMSS(this.runningTimeEntry.DurationInSeconds);

            this.setRunningDurationLabels(s);
        }