Exemple #1
0
        private void setQuestionDialogEntryTypes(QuestionDialogType qType)
        {
            switch (qType)
            {
            case QuestionDialogType.Unknown:
                break;

            case QuestionDialogType.Information:
                QuestionEntryType = QuestionDialogButtonType.OK;
                break;

            case QuestionDialogType.Question:
                QuestionEntryType = QuestionDialogButtonType.Yes | QuestionDialogButtonType.No;
                break;

            case QuestionDialogType.Warning:
                QuestionEntryType = QuestionDialogButtonType.OK | QuestionDialogButtonType.Abort;
                break;

            case QuestionDialogType.Error:
                QuestionEntryType = QuestionDialogButtonType.OK | QuestionDialogButtonType.Abort;
                break;

            default: break;
            }
        }
Exemple #2
0
        public Question_Dialog(
            string title,
            string id,
            DialogType type          = DialogType.Question,
            string question          = "",
            QuestionDialogType qType = QuestionDialogType.Unknown,
            bool isActivated         = false,
            Dialog parentDialog      = null)
            : base(title, id, type, isActivated, parentDialog)
        {
            Question = new SelfRenderingDialogEntry(id + "_Question", ll.GetTrans("question.qType." + qType.ToString()) + ": " + question, ll.GetTrans("question.question.help.question"), DialogEntryType.Label);

            QuestionType = qType;

            setQuestionDialogEntryTypes(qType);
            addQuestionDialogEntries(id);
        }