private void deleteAllToolStripMenuItem_Click(object sender, EventArgs e) { //删除所有 try { CommandDeleteAll command = new CommandDeleteAll(currentlyDrawForm.getDrawArea().GraphicsList); command.Execute(); currentlyDrawForm.getDrawArea().SetDirty(); currentlyDrawForm.getDrawArea().Refresh(); currentlyDrawForm.getDrawArea().AddCommandToHistory(command); } catch (Exception ex) { MessageBox.Show("删除所有设备发生异常:" + ex); } }