示例#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);
        }
示例#2
0
        public QuestionEditControl(QuestionInfo question = null)
        {
            InitializeComponent();

            manager = AppManager.Instance;

            Question     = question;
            selectedCard = null;
        }
示例#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;
 }
示例#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;
            }
        }
示例#5
0
 public AnswerEditControl()
 {
     InitializeComponent();
     AnswerMinEditControl = null;
     manager = AppManager.Instance;
 }