private void button8_Click(object sender, EventArgs e) { DialogResult dr1 = MessageBox.Show("确认删除此条路线吗?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (dr1 == DialogResult.No) { return; } else { string str1 = textBox6.Text.ToString(); string str2 = textBox7.Text.ToString(); if (!grp1.Road_True(str1, str2)) { MessageBox.Show("当前旅途未建立路线"); return; } grp1.Del_Trans(str1, str2); MessageBox.Show("路线删除完毕"); } }