private void Child_SuggestionDismissed(ActivitySuggestion suggestion) { ActivitySkip skip = this.activityRecommender.DeclineSuggestion(new ActivitiesSuggestion(suggestion)); double numSecondsThinking = skip.ThinkingTime.TotalSeconds; this.UpdateStatus("Recorded " + (int)numSecondsThinking + " seconds wasted"); }
private void DeclineSuggestion(ActivitiesSuggestion suggestion) { this.previousDeclinedSuggestion = suggestion; this.suggestions.Remove(suggestion); ActivitySkip skip = this.recommender.DeclineSuggestion(suggestion); double numSecondsThinking = skip.ThinkingTime.TotalSeconds; string message = "Recorded " + (int)numSecondsThinking + " seconds (wasted) considering " + suggestion.Children[0].ActivityDescriptor.ActivityName; if (suggestion.Children.Count > 1) { message += ", ..."; } this.SetErrorMessage(message); this.Update_Suggestion_StartTimes(); this.UpdateLayout_From_Suggestions(); }