private void button_StartTesting_Click(object sender, EventArgs e) { result = Stat.HypothesisTesting2(MainForm.MainDT, comboBox_Cols.Text, comboBox_Cols2.Text, comboBox_Statistics.Text, comboBox_Operation.Text, comboBox_Tail.Text, Convert.ToDouble(comboBox_Significance.Text), Convert.ToDouble(textBox_NullHypothesis.Text), comboBox_proportion.Text, Convert.ToDouble(textBox_comapre.Text)); MainForm.S.richTextBox1.AppendText(result); MainForm.S.richTextBox1.Select(); //让RichTextBox获得焦点 MainForm.S.richTextBox1.Select(MainForm.S.richTextBox1.TextLength, 0); //将插入符号置于文本结束处 MainForm.S.richTextBox1.ScrollToCaret(); }