Exemplo n.º 1
0
        private void button2_Click(object sender, EventArgs e)
        {
            string txt = richTextBox1.Text.Trim().Replace("\n", "");

            if (!ValidateService.IsAllNumber(txt))
            {
                MessageBox.Show("包含非数字字符,请认真核对!");
                return;
            }
            //else if(txt))
            //{
            //    MessageBox.Show("内容为空!");
            //    return;
            //}
            else
            {
                int x = txt.Length / 14;
                for (int i = 0; i < x; i++)
                {
                    string s = txt.Substring(0, 14);
                    txt = txt.Remove(0, 14);
                    batchList.Add(s);
                }
                this.Close();
            }
        }