void invTree_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e) { if (invTree.SelectedNode.Tag is InventoryItem) { InventoryItem item = invTree.SelectedNode.Tag as InventoryItem; switch (item.AssetType) { case AssetType.Landmark: instance.TabConsole.DisplayNotificationInChat("Teleporting to " + item.Name); client.Self.RequestTeleport(item.AssetUUID); break; case AssetType.Gesture: client.Self.PlayGesture(item.AssetUUID); break; case AssetType.Notecard: Notecard note = new Notecard(instance, (InventoryNotecard)item); note.Dock = DockStyle.Fill; note.ShowDetached(); break; case AssetType.LSLText: ScriptEditor script = new ScriptEditor(instance, (InventoryLSL)item); script.Dock = DockStyle.Fill; script.ShowDetached(); break; } } }
private void scriptEditorToolStripMenuItem_Click(object sender, EventArgs e) { ScriptEditor se = new ScriptEditor(instance); se.Dock = DockStyle.Fill; se.ShowDetached(); }
void invTree_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e) { if (invTree.SelectedNode.Tag is InventoryItem) { InventoryItem item = invTree.SelectedNode.Tag as InventoryItem; item = instance.COF.RealInventoryItem(item); switch (item.AssetType) { case AssetType.Landmark: instance.TabConsole.DisplayNotificationInChat("Teleporting to " + item.Name); client.Self.RequestTeleport(item.AssetUUID); break; case AssetType.Gesture: client.Self.PlayGesture(item.AssetUUID); break; case AssetType.Notecard: Notecard note = new Notecard(instance, (InventoryNotecard)item); note.Dock = DockStyle.Fill; note.ShowDetached(); break; case AssetType.LSLText: ScriptEditor script = new ScriptEditor(instance, (InventoryLSL)item); script.Dock = DockStyle.Fill; script.ShowDetached(); break; case AssetType.Object: if (IsAttached(item)) { instance.COF.Detach(item); } else { instance.COF.Attach(item, AttachmentPoint.Default, true); } break; case AssetType.Bodypart: case AssetType.Clothing: if (IsWorn(item)) { if (item.AssetType == AssetType.Clothing) { instance.COF.RemoveFromOutfit(item); } } else { instance.COF.AddToOutfit(item, true); } break; } } }