IsFullPerm() 공개 정적인 메소드

public static IsFullPerm ( InventoryItem item ) : bool
item OpenMetaverse.InventoryItem
리턴 bool
예제 #1
0
        bool CanExportTexture(UUID id, out string name)
        {
            name = id.ToString();
            if (BuiltInTextures.Contains(id) || Instance.Netcom.LoginOptions.Grid.Platform != "SecondLife")
            {
                return(true);
            }

            InventoryItem item = null;

            foreach (var pair in Client.Inventory.Store.Items)
            {
                if (pair.Value.Data is InventoryItem)
                {
                    var i = (InventoryItem)pair.Value.Data;
                    if (i.AssetUUID == id && (InventoryConsole.IsFullPerm(i) || Instance.advancedDebugging))
                    {
                        item = i;
                        break;
                    }
                }
            }

            if (item != null)
            {
                name = item.Name;
                return(true);
            }
            else if (Instance.advancedDebugging)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
예제 #2
0
        private void cmsImage_Opening(object sender, System.ComponentModel.CancelEventArgs e)
        {
            e.Cancel = false;
            if (AllowUpdateImage)
            {
                tbtnClear.Visible = tbtnPaste.Visible = true;
                tbtnPaste.Enabled = false;
                if (instance.InventoryClipboard != null)
                {
                    if (instance.InventoryClipboard.Item is InventoryTexture ||
                        instance.InventoryClipboard.Item is InventorySnapshot)
                    {
                        tbtnPaste.Enabled = true;
                    }
                }
            }
            else
            {
                tbtnClear.Visible = tbtnPaste.Visible = false;
            }

            tbtbInvShow.Enabled = false;

            InventoryItem found = null;

            foreach (var traversed in client.Inventory.Store.Items.Values)
            {
                if (traversed.Data is InventoryItem)
                {
                    InventoryItem item = (InventoryItem)traversed.Data;
                    if (item.AssetUUID == imageID)
                    {
                        found = item;
                        break;
                    }
                }
            }

            bool save = allowSave;

            if (found == null)
            {
                tbtbInvShow.Enabled = false;
                tbtbInvShow.Tag     = null;
            }
            else
            {
                tbtbInvShow.Enabled = true;
                tbtbInvShow.Tag     = found;
                save |= InventoryConsole.IsFullPerm(found);
            }

            save |= instance.advancedDebugging;

            if (save)
            {
                tbtnCopy.Visible     = true;
                tbtnCopyUUID.Visible = true;
                tbtnSave.Visible     = true;
            }
            else
            {
                tbtnCopy.Visible     = false;
                tbtnCopyUUID.Visible = false;
                tbtnSave.Visible     = false;
            }
        }