示例#1
0
 private void AchievementOfPurpose()
 {
     try
     {
         VariantsAnswers.Clear();
         Question       = "";
         CurrentPurpose = User.ListPurposes[IndexCurrentPurpose];
         CheckMode      = true;
         Change();
     }
     catch
     {
         MessageErorDeleg?.Invoke("Цель не выбрана");
     }
 }
示例#2
0
        private void ToAnswerTheQuestion()
        {
            if (ObjectIsExist)
            {
                User.ListOfCurrentEqualities.Add(ListObjectsForQuestions[NumberQuestion], VariantsAnswers[IndexVariantsAnswers]);
            }
            else
            {
                User.ListOfCurrentEqualities.Add(ListObjectsForQuestions[NumberQuestion], VariantAnsverText);
            }

            NumberQuestion++;
            VariantsAnswers.Clear();
            VariantAnsverText = "";
            ToAsk();
        }
示例#3
0
        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();
            }
        }