Exemple #1
0
        private void button5_Click(object sender, EventArgs e)
        {
            bool isdel = checkBox2.Checked;

            string[]      sp   = textBox7.Lines;
            List <string> tt   = new List <string>(sp);
            List <string> newt = new List <string>();

            if (isdel)
            {
                int snum = 0;
                int.TryParse(textBox6.Text, out snum);
                int dnum = 0;
                int.TryParse(textBox5.Text, out dnum);
                for (int i = 0; i < tt.Count; i++)
                {
                    if (tt[i].Length >= snum && tt[i].Length <= dnum)
                    {
                        newt.Add(tt[i]);
                    }
                }
                sp = newt.ToArray();
            }
            else
            {
                sp = AShelp.delspaceStrings(sp);
            }
            textBox7.Lines = sp;
        }
Exemple #2
0
        private void button2_Click(object sender, EventArgs e)
        {
            bool   isdel = checkBox1.Checked;
            string t     = textBox1.Text;

            string[] sp = textBox2.Lines;
            foreach (string s in sp)
            {
                t = t.Replace(s.Split('-')[0], "⊙");
            }
            t  = t.Replace("\r\n", "");
            sp = t.Split('⊙');
            List <string> tt   = new List <string>(sp);
            List <string> newt = new List <string>();

            if (isdel)
            {
                int snum = 0;
                int.TryParse(textBox3.Text, out snum);
                int dnum = 0;
                int.TryParse(textBox4.Text, out dnum);
                for (int i = 0; i < tt.Count; i++)
                {
                    if (tt[i].Length >= snum && tt[i].Length <= dnum)
                    {
                        newt.Add(tt[i]);
                    }
                }
                sp = newt.ToArray();
            }
            else
            {
                sp = AShelp.delspaceStrings(sp);
            }

            textBox1.Lines = sp;
        }