Exemplo n.º 1
0
    private void OnDelete(object o, EventArgs args)
    {
        Command command = new SortedListRemoveCommand <Path.Node>("Added Path node", path, field, selectedNode);

        command.Do();
        UndoManager.AddCommand(command);
        selectedNode = null;
        dragging     = false;
        Redraw();
    }
Exemplo n.º 2
0
 private void OnDelete(object o, EventArgs args)
 {
     if (path.Nodes.Count > 1)
     {
         Command command = new SortedListRemoveCommand <Path.Node>("Deleted Path node", path, field, selectedNode);
         command.Do();
         UndoManager.AddCommand(command);
         selectedNode = null;
         dragging     = false;
         Redraw();
     }
     else
     {
         Application.EditorApplication.DeleteCurrentPath();
     }
 }
Exemplo n.º 3
0
    private void OnDragEnd(object o, DragEndArgs args)
    {
        if (draggedID > NONE)                   //Widget.DragFailed is not aviable for windows users
        {
            Command command = new SortedListRemoveCommand <string>(
                "Removed badguy \"" + draggedBadguy + "\" from the queue",
                _object, field, draggedID);
            command.Do();
            UndoManager.AddCommand(command);

            draggedID     = NONE;
            draggedBadguy = "";
            dragging      = false;
            if (badguys.Count == 0)
            {
                Gtk.Drag.SourceUnset(this);
            }
        }
    }
Exemplo n.º 4
0
 private void OnDelete(object o, EventArgs args)
 {
     if (path.Nodes.Count > 1) {
         Command command = new SortedListRemoveCommand<Path.Node>("Deleted Path node", path, field, selectedNode);
         command.Do();
         UndoManager.AddCommand(command);
         selectedNode = null;
         dragging = false;
         Redraw();
     } else {
         Application.EditorApplication.DeleteCurrentPath();
     }
 }
    private void OnDragEnd(object o, DragEndArgs args)
    {
        if (draggedID > NONE) {		//Widget.DragFailed is not aviable for windows users
            Command command = new SortedListRemoveCommand<string>(
                        "Removed badguy \"" + draggedBadguy + "\" from the queue",
                        _object, field, draggedID);
            command.Do();
            UndoManager.AddCommand(command);

            draggedID = NONE;
            draggedBadguy = "";
            dragging = false;
            if (badguys.Count == 0)
                Gtk.Drag.SourceUnset(this);
        }
    }