//当单击删除时执行如下方法 public static bool AntennaDelMenu(TreeNode currentNode) { bool b = false; if (!StringFound.WaveOrAntennaInUse(currentNode.Text, "antenna")) { DialogResult result = MessageBox.Show("您确定要删除\"" + currentNode.Text + "\"天线吗?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question); if (result == DialogResult.OK) { //AntennaDelOfSetupAndInfo(currentNode); //AntennaDelOfWaveInfo(currentNode); if (AntennaDelOfSetupAndInfo(currentNode) && AntennaDelOfWaveInfo(currentNode)) { StringFound.DelBackIndStr(SetupContent.antennaStr1 + " " + currentNode.Text + "#"); b = true; } } } else { MessageBox.Show("您所删除的天线正在被使用,请修改辐射源或接收机后再删除此天线!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Stop); } return(b); }
public static bool WaveformDelMenu(TreeNode currentNode) { bool b = false; if (!StringFound.WaveOrAntennaInUse(currentNode.Text, "wave")) { DialogResult result = MessageBox.Show("您确定要删除\"" + currentNode.Text + "\"波形吗?", "提示", MessageBoxButtons.OKCancel, MessageBoxIcon.Question); if (result == DialogResult.OK) { //AntennaDelOfSetupAndInfo(currentNode); //AntennaDelOfWaveInfo(currentNode); if (WaveformDelOfSetupAndInfo(currentNode) && WaveformDelOfWaveInfo(currentNode)) { b = true; } } } else { MessageBox.Show("您所删除的波形正在被使用,请修改天线后再删除此波形!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Stop); //b = true; } return(b); }