Exemplo n.º 1
0
 private void deleteToolStripMenuItem_Click(object sender, EventArgs e)
 {
     //删除对象
     try
     {
         CommandDelete command = new CommandDelete(currentlyDrawForm.getDrawArea().GraphicsList);
         command.Execute();
         if (currentlyDrawForm.getDrawArea().GraphicsList.DeleteSelection())
         {
             currentlyDrawForm.getDrawArea().SetDirty();
             currentlyDrawForm.getDrawArea().Refresh();
             currentlyDrawForm.getDrawArea().AddCommandToHistory(command);
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("删除设备发生异常:" + ex);
     }
 }