Ejemplo n.º 1
0
        public void AddAnswer(AnswerInfo answer = null)
        {
            CtrlErrorAnswers.Visibility = Visibility.Collapsed;
            AnswerMinEditControl amec = new AnswerMinEditControl(CtrlIsRadio.IsChecked == true, answer);

            amec.MouseLeftButtonUp += CtrlAnswerCard_Click;
            CtrlAnswers.Children.Add(amec);
        }
Ejemplo n.º 2
0
        public QuestionEditControl(QuestionInfo question = null)
        {
            InitializeComponent();

            manager = AppManager.Instance;

            Question     = question;
            selectedCard = null;
        }
Ejemplo n.º 3
0
 private void CtrlAnswerCard_Click(object sender, RoutedEventArgs e)
 {
     if (selectedCard != null)
     {
         selectedCard.IsSelected = false;
         selectedCard.Text       = CtrlEditAnswer.CtrlText.Text;
     }
     selectedCard                        = sender as AnswerMinEditControl;
     selectedCard.IsSelected             = true;
     CtrlEditAnswer.AnswerMinEditControl = selectedCard;
 }
Ejemplo n.º 4
0
        public void RemoveAnswer(AnswerMinEditControl amec)
        {
            if (amec == selectedCard)
            {
                selectedCard = null;
                CtrlEditAnswer.AnswerMinEditControl = null;
            }
            CtrlAnswers.Children.Remove(amec);

            if (CtrlAnswers.Children.Count == 0)
            {
                CtrlErrorAnswers.Visibility = Visibility.Visible;
            }
        }
Ejemplo n.º 5
0
 public AnswerEditControl()
 {
     InitializeComponent();
     AnswerMinEditControl = null;
     manager = AppManager.Instance;
 }