Ejemplo n.º 1
0
 private void CalcBtn_Click(object sender, EventArgs e)
 {
     try
     {
         List <int> list      = ConvertList.StrToList(ListInput.Text);
         ToolsList  toolsList = new ToolsList(list);
         List <int> listNew   = (List <int>)toolsList.Process((int)InputN.Value);
         Output.Text = ConvertList.ListToStr(listNew, ", ");
     }
     catch (Exception)
     {
         MessageBox.Show("ошибка ввода", "ошибка");
     }
 }
Ejemplo n.º 2
0
 private void CalcBtn_Click(object sender, EventArgs e)
 {
     try
     {
         List <int> list      = ConvertList.StrToList(ListInput.Text);
         ToolsList  toolsList = new ToolsList(list);
         List <int> listNew   = toolsList.Process(out bool success);
         Output.Text = ConvertList.ListToStr(listNew) + "\n" + (success ? "успешно" : "не успешно");
     }
     catch (Exception)
     {
         MessageBox.Show("ошибка ввода", "ошибка");
     }
 }