示例#1
0
        private void lvwObjects_DragDrop(object sender, DragEventArgs e)
        {
            Point        local = lvwObjects.PointToClient(new Point(e.X, e.Y));
            ListViewItem litem = lvwObjects.GetItemAt(local.X, local.Y);

            if (litem == null)
            {
                return;
            }
            TreeNode node = e.Data.GetData(typeof(TreeNode)) as TreeNode;

            if (node == null)
            {
                return;
            }

            if (node.Tag is InventoryItem)
            {
                InventoryItem item = node.Tag as InventoryItem;
                client.Inventory.GiveItem(item.UUID, item.Name, item.AssetType, (UUID)litem.Tag, true);
                chatManager.DisplayNotificationInChat("Offered item " + item.Name + " to " + instance.getAvatarName((UUID)litem.Tag) + ".");
            }
            else if (node.Tag is InventoryFolder)
            {
                InventoryFolder folder = node.Tag as InventoryFolder;
                client.Inventory.GiveFolder(folder.UUID, folder.Name, AssetType.Folder, (UUID)litem.Tag, true);
                chatManager.DisplayNotificationInChat("Offered folder " + folder.Name + " to " + instance.getAvatarName((UUID)litem.Tag) + ".");
            }
        }
 private void SubHook(object sender, EventArgs e)
 {
     TryCatch(() =>
                  {
                      if (sender != lastObject && sender is ToolStripItem)
                          FakeEvent(sender, "Click", lastObject, e);
                  });
     Plugin.DisplayNotificationInChat(
         string.Format("SubHook sender={0}\nlastObect={1}", ToString(sender),
                       ToString(lastObject)));
 }
示例#3
0
 public void DebugLog(string s)
 {
     Plugin.DisplayNotificationInChat(string.Format("ContextAction {0}: {1}", Label, s));
 }