private void CalcBtn_Click(object sender, EventArgs e) { try { int[] Arr = ArrayConvert.StrToArray <int>(ArrInput.Text); ArrayTools At = new ArrayTools(Arr); CountOut.Text = At.GetCountSumEl().ToString(); } catch (Exception) { MessageBox.Show("ошибка ввода", "ошибка"); } }
private void ChangeArrBtn_Click(object sender, EventArgs e) { try { int[] Arr = ArrayConvert.StrToArray <int>(ArrInput.Text); int K = int.Parse(KInput.Text); ArrayTools At = new ArrayTools(Arr); int[] NewArr = At.GetNewArray(ArrayTools.param.less, K); LessArrOut.Text = ArrayConvert.ArrayToStr <int>(NewArr); NewArr = At.GetNewArray(ArrayTools.param.equal, K); EqualArrOut.Text = ArrayConvert.ArrayToStr <int>(NewArr); NewArr = At.GetNewArray(ArrayTools.param.more, K); MoreArrOut.Text = ArrayConvert.ArrayToStr <int>(NewArr); } catch (Exception) { MessageBox.Show("ошибка ввода", "ошибка"); } }