Example #1
0
        public void DragSelectedItem(Gtk.Widget source, Gdk.DragContext ctx)
        {
            if ((CurrentConsumer == null) || (selectedItem == null))
            {
                return;
            }

            try {
                CurrentConsumer.DragItem(selectedItem, source, ctx);
                OnToolboxUsed(CurrentConsumer, selectedItem);
            } catch (Exception ex) {
                MonoDevelop.Core.LoggingService.LogError("Error dragging toolbox item.", ex);
            }
        }
        public void DragSelectedItem(Gtk.Widget source, Gdk.DragContext ctx)
        {
            if ((CurrentConsumer == null) || (selectedItem == null))
            {
                return;
            }

            try {
                CurrentConsumer.DragItem(selectedItem, source, ctx);
                OnToolboxUsed(CurrentConsumer, selectedItem);
            } catch (Exception ex) {
                MonoDevelop.Core.LoggingService.LogError("Error dragging toolbox item.", ex);
                //run this dialog on a timeout so it doesn't block the drag completing
                GLib.Timeout.Add(100, delegate {
                    MessageService.ShowException(ex, "Error dragging toolbox item.");
                    return(false);
                });
            }
        }