예제 #1
0
파일: cmdManage.cs 프로젝트: Heide172/dpR
        private void button1_Click(object sender, EventArgs e)
        {
            command a = new command();

            a.name = textBox1.Text;
            a.cmd  = textBox2.Text;
            foreach (command c in cmdList)
            {
                int i = 0;
                if (c.name == a.name)
                {
                    replaceElem(a.cmd, i);
                    return;
                }
            }
            cmdList.Add(a);
            listBox1.Items.Add(a.name);
            textBox1.Text = null;
            textBox2.Text = null;
        }