Пример #1
0
        void uiListView_ItemDrag(object sender, ItemDragEventArgs e)
        {
            var item = (ListViewItem)e.Item;

            var itemPath = item.Tag as string;

            if (itemPath == FOLDER_MONIKER)
            {
                return;
            }

            IoC.MainForm.SetToolStripStatusLabel1(item.ToolTipText);

            var bitmap = new Bitmap(uiListView.LargeImageList.Images[item.ImageKey]);

            new Cursor(bitmap.GetHicon());

            var creationProperties = new TextureCreationProperties(itemPath, UiAction.Dragging);

            IHandleDragDrop dragDropHandler = new TextureEditorPlugin().CreateDragDropHandler(creationProperties);

            uiListView.DoDragDrop(new HandleDraggingOfAssets(dragDropHandler), DragDropEffects.Move);
        }
Пример #2
0
        void uiListView_ItemDrag(object sender, ItemDragEventArgs e)
        {
            var item = (ListViewItem)e.Item;

            var itemPath = item.Tag as string;

            if (itemPath == FOLDER_MONIKER)
            {
                return;
            }

            IoC.MainForm.SetToolStripStatusLabel1( item.ToolTipText );

            var bitmap = new Bitmap(uiListView.LargeImageList.Images[item.ImageKey]);

            new Cursor(bitmap.GetHicon());

            var creationProperties = new TextureCreationProperties(itemPath, UiAction.Dragging);

            IHandleDragDrop dragDropHandler = new TextureEditorPlugin().CreateDragDropHandler(creationProperties);

            uiListView.DoDragDrop(new HandleDraggingOfAssets(dragDropHandler), DragDropEffects.Move);
        }