Esempio n. 1
0
        public NgbhItem InsertNew(int index, SimMemoryType type)
        {
            NgbhItem item = new NgbhItem(parent, type);

            Insert(index, item);
            return(item);
        }
Esempio n. 2
0
        public NgbhItem AddNew(SimMemoryType type)
        {
            NgbhItem item = new NgbhItem(parent, type);

            Add(item);
            return(item);
        }
Esempio n. 3
0
 void SetGuidForType(SimMemoryType type)
 {
     foreach (SimPe.Cache.MemoryCacheItem mci in SimPe.PackedFiles.Wrapper.ObjectComboBox.ObjectCache.List)
     {
         if (type == SimMemoryType.Inventory || type == SimMemoryType.GossipInventory || type == SimMemoryType.Object)
         {
             if (mci.IsInventory && !mci.IsToken)
             {
                 Guid = mci.Guid;
                 return;
             }
         }
         else if (type == SimMemoryType.Memory || type == SimMemoryType.Gossip)
         {
             if (!mci.IsInventory && !mci.IsToken && mci.IsMemory)
             {
                 Guid = mci.Guid;
                 return;
             }
         }
         else
         {
             if (!mci.IsInventory && mci.IsToken)
             {
                 Guid = mci.Guid;
                 return;
             }
         }
     }
 }
Esempio n. 4
0
        internal NgbhItem(NgbhSlotList parentslot, SimMemoryType type)
        {
            this.parentslot = parentslot;
            this.parent     = parentslot.Parent;
            data            = new ushort[0];
            flags           = new NgbhItemFlags();
            objd            = null;

            if (type == SimMemoryType.Aspiration || type == SimMemoryType.Skill || type == SimMemoryType.ValueToken || type == SimMemoryType.Badge)
            {
                Flags.IsVisible   = false;
                Flags.IsControler = true;
                data = new ushort[2];
            }
            else if (type == SimMemoryType.Token)
            {
                Flags.IsVisible   = false;
                Flags.IsControler = true;
            }
            else if (type == SimMemoryType.Object)
            {
                Flags.IsVisible   = false;
                Flags.IsControler = true;
                data = new ushort[3];
            }
            else if (type == SimMemoryType.Gossip || type == SimMemoryType.Memory)
            {
                PutValue(0x01, 0x07CD);
                PutValue(0x02, 0x0006);
                PutValue(0x0B, 0);
                Flags.IsVisible   = true;
                Flags.IsControler = false;
                if (type == SimMemoryType.Gossip)
                {
                    this.SimInstance = 1;
                }
            }
            else if (type == SimMemoryType.GossipInventory || type == SimMemoryType.Inventory)
            {
                Flags.IsVisible   = true;
                Flags.IsControler = true;

                if (type == SimMemoryType.GossipInventory)
                {
                    data = new ushort[8];
                    PutValue(0x01, 0x0);
                }

                this.InventoryNumber = this.ParentSlot.GetNextInventoryNumber();
            }

            //SetGuidForType(type);
        }
Esempio n. 5
0
        private void cbtype_SelectedIndexChanged(object sender, System.EventArgs e)
        {
            SimMemoryType smt = (SimMemoryType)cbtype.SelectedValue;

            this.pnOwner.Visible      = (smt == SimMemoryType.Memory || smt == SimMemoryType.Gossip || smt == SimMemoryType.GossipInventory);
            this.pnSub1.Visible       = (smt == SimMemoryType.Memory || smt == SimMemoryType.Gossip);
            this.pnSub2.Visible       = this.pnSub1.Visible;
            this.pnSubject.Visible    = (smt == SimMemoryType.Memory || smt == SimMemoryType.Gossip);
            this.pnObjectGuid.Visible = (smt == SimMemoryType.Memory || smt == SimMemoryType.Gossip || smt == SimMemoryType.Object);

            this.pnInventory.Visible = (smt == SimMemoryType.Inventory || smt == SimMemoryType.GossipInventory);
            this.pnValue.Visible     = (smt == SimMemoryType.Skill || smt == SimMemoryType.Badge || smt == SimMemoryType.ValueToken);
            this.pnFlags.Visible     = true;

            this.pnListing.Visible = Helper.WindowsRegistry.HiddenMode;
        }
Esempio n. 6
0
        private void lladd_LinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e)
        {
            if (items == null || cbadd.SelectedIndex < 0)
            {
                return;
            }

            Data.Alias    a   = cbadd.SelectedItem as Data.Alias;
            SimMemoryType smt = (SimMemoryType)a.Id;

            int      index = this.NextItemIndex(true);
            NgbhItem item  = items.InsertNew(index, smt);

            item.SetInitialGuid(smt);
            InsertItemToList(index, item);

            lv.Items[index].Selected = true;
            lv.Items[index].EnsureVisible();
        }
Esempio n. 7
0
 public void SetInitialGuid(SimMemoryType type)
 {
     SetGuidForType(type);
 }