private int check_value(object sender, EventArgs e, ref int num, TextBox box)
 {
     num = 0;
     try
     {
         num = Int32.Parse(box.Text);
     }
     catch (Exception ex)
     {
         box.Text = "";
         num      = 0;
         AlertUtil.AlertIntegerParseErr();
         Console.WriteLine(ex.ToString());
     }
     return(num);
 }
        private int check_value(ref int num, TextBox target)
        {
            num = 0;
            try
            {
                num = Int32.Parse(target.Text);
            }
            catch (Exception ex)
            {
                target.Text = "";
                Console.WriteLine(ex.ToString());
                AlertUtil.AlertIntegerParseErr();
            }

            return(num);
        }