private void RefreshPropertiesPane() { if (treInventory.SelectedNode == null) return; InventoryBase io = (InventoryBase)treInventory.SelectedNode.Tag; if (io is InventoryItem) { InventoryItemConsole console = new InventoryItemConsole(instance, (InventoryItem)io); console.Dock = DockStyle.Fill; splitContainer1.Panel2.Controls.Add(console); ClearCurrentProperties(); currentProperties = console; } else { ClearCurrentProperties(); } }
private void ClearCurrentProperties() { if (currentProperties == null) return; currentProperties.CleanUp(); currentProperties.Dispose(); currentProperties = null; }