Exemplo n.º 1
0
        private void AddMapQuestion()
        {
            MapQuestion     mapQn    = (MapQuestion)_section.Questions.Add(QuestionTypes.Map);
            MapQuestionForm MapQnFrm = new MapQuestionForm();

            MapQnFrm.PickValues(mapQn);
            if (MapQnFrm.ShowDialog() == DialogResult.OK)
            {
                RefreshQuestions();
            }
        }
Exemplo n.º 2
0
        private void AddMapQuestion()
        {
            if (!(Tree.SelectedNode.Tag is Questions))
            {
                return;
            }
            Questions       questions = Tree.SelectedNode.Tag as Questions;
            MapQuestion     mapQn     = (MapQuestion)questions.Add(QuestionTypes.Map);
            MapQuestionForm MapQnFrm  = new MapQuestionForm();

            MapQnFrm.PickValues(mapQn);
            if (MapQnFrm.ShowDialog() == DialogResult.OK)
            {
                TreeNode questionsNode = Tree.SelectedNode;
                if (questionsNode != null)
                {
                    var questionNode = AddToParentNode(questionsNode, mapQn, mapQn.Name);
                    questionNode.ImageIndex         = 10;
                    questionNode.SelectedImageIndex = 10;
                }
            }
        }