private void AchievementOfPurpose() { try { VariantsAnswers.Clear(); Question = ""; CurrentPurpose = User.ListPurposes[IndexCurrentPurpose]; CheckMode = true; Change(); } catch { MessageErorDeleg?.Invoke("Цель не выбрана"); } }
private void ToAnswerTheQuestion() { if (ObjectIsExist) { User.ListOfCurrentEqualities.Add(ListObjectsForQuestions[NumberQuestion], VariantsAnswers[IndexVariantsAnswers]); } else { User.ListOfCurrentEqualities.Add(ListObjectsForQuestions[NumberQuestion], VariantAnsverText); } NumberQuestion++; VariantsAnswers.Clear(); VariantAnsverText = ""; ToAsk(); }
private void ToAsk() { if (NumberQuestion < ListObjectsForQuestions.Count) { string key = ListObjectsForQuestions[NumberQuestion]; if (User.ListAsks.Keys.Contains(key)) { if (User.ListAsks[key].ListValues != null) { ObjectIsExist = true; Question = (User.ListAsks[key].Question != null) ? User.ListAsks[key].Question : "_Выберите значение для '" + key + "'."; foreach (var varAns in User.ListAsks[key].ListValues) { VariantsAnswers.Add(varAns); } } else { ObjectIsExist = false; Question = (User.ListAsks[key].Question != null) ? User.ListAsks[key].Question : "_Выберите значение для '" + key + "'."; } } else { ObjectIsExist = false; Question = "_Введите значение для '" + key + "' "; } } else { VariantsAnswers.Clear(); Question = ""; Change(); } }