Add Net 5.0 target, remove deprecated WinForms widget classes
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2006-2016, openmetaverse.co
|
||||
* Copyright (c) 2019-2021, Sjofn LLC
|
||||
* All rights reserved.
|
||||
*
|
||||
* - Redistribution and use in source and binary forms, with or without
|
||||
@@ -38,13 +39,13 @@ namespace OpenMetaverse.GUI
|
||||
public class InventoryTree : TreeView
|
||||
{
|
||||
private GridClient _Client;
|
||||
private ContextMenu _ContextMenu;
|
||||
private ContextMenuStrip _ContextMenu;
|
||||
private UUID _SelectedItemID;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the context menu associated with this control
|
||||
/// </summary>
|
||||
public ContextMenu Menu
|
||||
public ContextMenuStrip Menu
|
||||
{
|
||||
get { return _ContextMenu; }
|
||||
set { _ContextMenu = value; }
|
||||
@@ -65,9 +66,9 @@ namespace OpenMetaverse.GUI
|
||||
public InventoryTree()
|
||||
{
|
||||
EventHandler clickHandler = new EventHandler(defaultMenuItem_Click);
|
||||
_ContextMenu = new ContextMenu();
|
||||
_ContextMenu.MenuItems.Add("Wear", clickHandler);
|
||||
_ContextMenu.MenuItems.Add("Detach", clickHandler);
|
||||
_ContextMenu = new ContextMenuStrip();
|
||||
_ContextMenu.Items.Add("Wear", null, clickHandler);
|
||||
_ContextMenu.Items.Add("Detach", null, clickHandler);
|
||||
|
||||
this.NodeMouseClick += new TreeNodeMouseClickEventHandler(InventoryTree_NodeMouseClick);
|
||||
this.BeforeExpand += new TreeViewCancelEventHandler(InventoryTree_BeforeExpand);
|
||||
@@ -172,7 +173,7 @@ namespace OpenMetaverse.GUI
|
||||
|
||||
private void defaultMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
MenuItem menuItem = (MenuItem)sender;
|
||||
ToolStripMenuItem menuItem = (ToolStripMenuItem)sender;
|
||||
|
||||
InventoryItem item = (InventoryItem)Client.Inventory.Store[_SelectedItemID];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user