Inheritance: IEntityCreationProperties
示例#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
 public TextureDragDropHandler(TextureCreationProperties creationProperties)
 {
     _creationProperties = creationProperties;
 }
示例#4
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
                        });
            }
        }
示例#5
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);
        }
示例#6
0
 public TextureDragDropHandler( TextureCreationProperties creationProperties)
 {
     _creationProperties = creationProperties;
 }