Beispiel #1
0
 public override bool redoTool()
 {
     descriptionsController.addDescription(description);
     descriptionsController.addDescriptionController(descriptionController);
     descriptionsController.setSelectedDescription(descriptionsController.getDescriptionCount() - 1);
     Controller.Instance.updatePanel();
     return(false);
 }
Beispiel #2
0
 public override bool doTool()
 {
     description = (Description)descriptionsController.getSelectedDescription();
     descriptionsController.addDescription(description);
     descriptionController = new DescriptionController(description);
     descriptionsController.addDescriptionController(descriptionController);
     descriptionsController.setSelectedDescription(descriptionsController.getDescriptionCount() - 1);
     return(true);
 }
Beispiel #3
0
        public override bool doTool()
        {
            bool elementDeleted = false;

            lastSelectedDescription = descriptionsController.getSelectedDescriptionNumber();
            if (descriptionsController.getSelectedDescriptionNumber() > 0)
            {
                deletedDescriptionController = descriptionsController.removeSelectedDescription();
                descriptionsController.setSelectedDescription(descriptionsController.getDescriptionCount() - 1);
                elementDeleted = true;
            }



            // If it was the last one, show an error message
            else
            {
                //TODO cambiar cadenas
                Controller.Instance.ShowErrorDialog(TC.get("Operation.DeleteResourcesTitle"), TC.get("Operation.DeleteResourcesErrorLastResources"));
            }

            return(elementDeleted);
        }