예제 #1
0
        //todo: move this out into an event
        void uiListView_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            ListViewItem focusedItem = uiListView.FocusedItem;

            string pathToTexture = focusedItem.Tag.ToString();

            if (pathToTexture == FOLDER_MONIKER)
            {
                loadFolder(focusedItem.Name);

                return;
            }

            if (TextureChosen != null)
            {
                var creationProperties = new TextureCreationProperties(pathToTexture, UiAction.DoubleClicking);

                TextureChosen(
                    this,
                    new EntityChosenEventArgs
                {
                    EntityCreationProperties = creationProperties
                });
            }
        }
예제 #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);
        }
예제 #3
0
        //todo: move this out into an event
        void uiListView_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            ListViewItem focusedItem = uiListView.FocusedItem;

            string pathToTexture = focusedItem.Tag.ToString();

            if (pathToTexture == FOLDER_MONIKER)
            {
                loadFolder(focusedItem.Name);

                return;
            }

            if (TextureChosen != null)
            {
                var creationProperties=new TextureCreationProperties(pathToTexture, UiAction.DoubleClicking);

                TextureChosen(
                    this,
                    new EntityChosenEventArgs
                        {
                            EntityCreationProperties = creationProperties
                        });
            }
        }
예제 #4
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);
        }
예제 #5
0
 public TextureDragDropHandler(TextureCreationProperties creationProperties)
 {
     _creationProperties = creationProperties;
 }