private void SelectedAnswerChanged() { Answer = (answerListBox.SelectedItem as ListBoxItem <AskAnswerModel>)?.Data; if (Answer == null) { okButton.Enabled = false; return; } okButton.Enabled = true; }
private void Events_OnSessionUnlock() { var breakAnswer = new AskAnswerModel() { Text = "Log as break", Default = true, }; var workAnswer = new AskAnswerModel() { Text = "Log as work", }; var timeIdle = _timeService.GetCurrentDate() - lockedTime; var answer = _quickActionController.Ask(new AskModel() { Text = $"You have spend {timeIdle:hh\\:mm\\:ss} as idle. Where do you want to spend time?", Answers = new List <AskAnswerModel>() { breakAnswer, workAnswer, }, });