private void button_test_Click(object sender, EventArgs e) { try { int cnt = Convert.ToInt32(textBox_test.Text); List <int> yoSTR = new List <int>(); for (int i = 0; i < cnt; i++) { yoSTR.Add(theSTR[i]); } StatFuncs.CalcStats(yoSTR); ShowStats_test(yoSTR); ShowAmpCnts(yoSTR); } catch (Exception E) { Console.WriteLine(E.ToString()); } }
private void button_stats1_Click(object sender, EventArgs e) { //button_StopLog1.PerformClick(); try { char[] delimiterChars = { ':', '\n', ' ', '\t', '\r' }; string[] words = richTextBox1.Text.Split(delimiterChars); //STR = "0:" + words[0] + "\n1:" + words[1] + "\n2:" + words[2] + "\n3:" + words[3]; theSTR = new List <int>(); foreach (string s in words) { if (s != "") { int temp = Convert.ToInt32(s); theSTR.Add(temp); } } //button_stats1.Text = StatFuncs.CalcStats(); button_stats1.Text = StatFuncs.CalcStats(theSTR); ShowStats(theSTR); } catch (Exception E) { button_stats1.Text = E.Message; } }