Esempio n. 1
0
        public async void ContinueTimeEntry(int index)
        {
            // Get data holder
            var timeEntryHolder = GetHolderFromIndex(index);

            if (timeEntryHolder == null)
            {
                return;
            }

            var timeEntry = timeEntryHolder.TimeEntryData;

            if (timeEntry.State == TimeEntryState.Running)
            {
                await TimeEntryModel.StopAsync(timeEntryHolder.TimeEntryData);

                ServiceContainer.Resolve <ITracker> ().SendTimerStopEvent(TimerStopSource.App);
            }
            else
            {
                await TimeEntryModel.ContinueTimeEntryDataAsync(timeEntryHolder.TimeEntryData);

                ServiceContainer.Resolve <ITracker> ().SendTimerStartEvent(TimerStartSource.AppContinue);
            }
        }