private void SystemFeedback_Loaded(object sender, RoutedEventArgs e) { Q2.Labels = new List <string>() { "非常不流畅", "不流畅", "一般", "流畅", "非常流畅" }; for (int i = 3; i <= 18; i++) { EvaluationControl ec = QContent.FindName("Q" + i.ToString()) as EvaluationControl; ec.Labels = new List <string>() { "非常弱", "比较弱", "一般", "比较强", "非常强" }; } Q19.Labels = new List <string>() { "非常不准确", "不准确", "一般", "准确", "非常准确" }; for (int i = 21; i <= 35; i += 2) { TextBlock tb = QContent.FindName("R" + i.ToString()) as TextBlock; tb.Visibility = Visibility.Hidden; TextBox tbox = QContent.FindName("Q" + i.ToString()) as TextBox; tbox.Visibility = Visibility.Hidden; } }
private string FormatQuestionaire() { String ques = ""; ques += Q1.Text + @"|"; for (int i = 3; i <= 19; i++) { EvaluationControl ec = QContent.FindName("Q" + i.ToString()) as EvaluationControl; ques += ec.GetSelectionValue() + @"|"; } for (int i = 20; i <= 34; i += 2) { CheckBox cb = QContent.FindName("Q" + i.ToString()) as CheckBox; TextBox tbox = QContent.FindName("Q" + (i + 1).ToString()) as TextBox; if (cb.IsChecked.HasValue && cb.IsChecked.Value) { ques += cb.Tag + tbox.Text + @"|"; } } ques += Q36.Text + @"|"; ques += Q37.Text + @"|"; return(ques); }