public void ChangeTimeEntryDuration(TimeSpan newDuration, TimeEntryData timeEntryData) { // TODO: for the moment, old style methods // using existing models. var entryModel = new TimeEntryModel(timeEntryData); entryModel.SetDuration(newDuration); timeEntryList [timeEntryList.IndexOf(p => p.Id == entryModel.Id)] = entryModel.Data; UpdateView(); ServiceContainer.Resolve <ITracker> ().CurrentScreen = "Change Group Duration"; }
private async void OnOkClicked(object sender, DialogClickEventArgs e) { if (enabled && model != null) { var duration = model.GetDuration(); if (model.State == TimeEntryState.New) { duration = new TimeSpan(newDuration.Hours, newDuration.Minutes, 0); } else { // Keep the current seconds and milliseconds duration = new TimeSpan(0, newDuration.Hours, newDuration.Minutes, duration.Seconds, duration.Milliseconds); } model.SetDuration(duration); await model.SaveAsync(); } }
public void ChangeTimeEntryDuration(TimeSpan newDuration) { data = TimeEntryModel.SetDuration(data, newDuration); UpdateView(); ServiceContainer.Resolve <ITracker> ().CurrentScreen = "Change Duration"; }
public void ChangeTimeEntryDuration (TimeSpan newDuration, TimeEntryData timeEntryData) { // TODO: for the moment, old style methods // using existing models. var entryModel = new TimeEntryModel (timeEntryData); entryModel.SetDuration (newDuration); timeEntryList [timeEntryList.IndexOf (p => p.Id == entryModel.Id)] = entryModel.Data; UpdateView (); ServiceContainer.Resolve<ITracker> ().CurrentScreen = "Change Group Duration"; }