//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 }); } }
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); }
//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 }); } }
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); }
public TextureDragDropHandler(TextureCreationProperties creationProperties) { _creationProperties = creationProperties; }