Example #1
0
 public IEnumerable <Inventory.Entry> GetRecursiveEntries()
 {
     try
     {
         Inventory.Entry[] children = this.Children;
         for (int i = 0; i < children.Length; i++)
         {
             Inventory.Entry entry = children[i];
             if (entry.IsDirectory)
             {
                 foreach (Inventory.Entry current in entry.GetRecursiveEntries())
                 {
                     yield return(current);
                 }
             }
             else
             {
                 yield return(entry);
             }
         }
     }
     finally
     {
     }
     yield break;
 }
Example #2
0
 public Inventory.Entry CreateDirectory()
 {
     Inventory.Entry entry = this.CreateFilterDirectory();
     if (entry != null)
     {
         this.m_ownedDirectories.Add(entry);
     }
     return(entry);
 }
Example #3
0
 public override bool Equals(object obj)
 {
     Inventory.Entry entry = obj as Inventory.Entry;
     if (entry == null)
     {
         return(base.Equals(obj));
     }
     return(this.Pointer == entry.Pointer);
 }
Example #4
0
 public void AddEntry(Inventory.Entry entry)
 {
     if (this.OnlyDirectories && !entry.IsDirectory)
     {
         return;
     }
     TreeNode treeNode;
     this.m_nodes.TryGetValue(entry.Parent, out treeNode);
     if (treeNode == null)
     {
         return;
     }
     TreeNode treeNode2 = this.CreateNode(entry);
     int num = -1;
     Inventory.Entry[] children = entry.Parent.Children;
     for (int i = 0; i < children.Length; i++)
     {
         Inventory.Entry entry2 = children[i];
         if (entry2 == entry)
         {
             break;
         }
         TreeNode treeNode3;
         this.m_nodes.TryGetValue(entry2, out treeNode3);
         if (treeNode3 != null && treeNode3.Parent == treeNode)
         {
             num = treeNode3.Index + 1;
         }
     }
     if (num == -1)
     {
         treeNode.Nodes.Add(treeNode2);
     }
     else
     {
         treeNode.Nodes.Insert(num, treeNode2);
     }
     this.FillNodes(entry, treeNode2.Nodes);
     this.Value = entry;
 }
 public CollectionTreeItem(int id, Inventory.Entry entry)
 {
     this.m_id = id;
     this.m_entry = entry;
 }
Example #6
0
 private void UpdateList()
 {
     List<SlotItem> list = new List<SlotItem>();
     for (int i = 0; i < this.SlotCount; i++)
     {
         SlotItem slot = this.GetSlot(i);
         if (slot != null)
         {
             list.Add(slot);
         }
     }
     this.m_slots = list.ToArray();
     Inventory.Entry[] array = new Inventory.Entry[this.m_slots.Length];
     for (int j = 0; j < this.m_slots.Length; j++)
     {
         array[j] = this.m_slots[j].Entry;
     }
     this.inventoryList.Entries = array;
     this.labelCount.Text = this.m_slots.Length + "/" + this.SlotCount;
     this.UpdateSelection();
 }
Example #7
0
 public SlotItem(int id, Inventory.Entry entry)
 {
     this.m_id = id;
     this.m_entry = entry;
 }
Example #8
0
 public virtual void SearchInventory(string criteria, Inventory.Entry resultEntry)
 {
 }
Example #9
0
 protected virtual void DestroyFilterDirectory(Inventory.Entry entry)
 {
 }
Example #10
0
 public void SetChildIndex(Inventory.Entry child, int index)
 {
     Binding.FCE_Inventory_Entry_SetChildIndex(this.m_entryPtr, child.Pointer, index);
 }
Example #11
0
 public void AddChild(Inventory.Entry child)
 {
     Binding.FCE_Inventory_Entry_AddChild(this.Pointer, child.Pointer);
 }
Example #12
0
 public TextureTreeItem(int id, Inventory.Entry entry)
 {
     this.m_id = id;
     this.m_entry = entry;
 }
Example #13
0
 private void InitializeComponent()
 {
     this.components = new Container();
     this.label1 = new Label();
     this.buttonCancel = new NomadButton();
     this.buttonOK = new NomadButton();
     this.inventoryTree = new InventoryTree();
     base.SuspendLayout();
     this.label1.AutoSize = true;
     this.label1.Location = new Point(12, 9);
     this.label1.Name = "label1";
     this.label1.Size = new Size(156, 13);
     this.label1.TabIndex = 0;
     this.label1.Text = "PROMPT_INVENTORY_TEXT";
     this.buttonCancel.Anchor = (AnchorStyles.Bottom | AnchorStyles.Right);
     this.buttonCancel.DialogResult = DialogResult.Cancel;
     this.buttonCancel.Location = new Point(209, 273);
     this.buttonCancel.Name = "buttonCancel";
     this.buttonCancel.Size = new Size(75, 23);
     this.buttonCancel.TabIndex = 3;
     this.buttonCancel.Text = "PROMPT_CANCEL";
     this.buttonCancel.UseVisualStyleBackColor = true;
     this.buttonOK.Anchor = (AnchorStyles.Bottom | AnchorStyles.Right);
     this.buttonOK.DialogResult = DialogResult.OK;
     this.buttonOK.Enabled = false;
     this.buttonOK.Location = new Point(128, 273);
     this.buttonOK.Name = "buttonOK";
     this.buttonOK.Size = new Size(75, 23);
     this.buttonOK.TabIndex = 2;
     this.buttonOK.Text = "PROMPT_OK";
     this.buttonOK.UseVisualStyleBackColor = true;
     this.inventoryTree.Anchor = (AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right);
     this.inventoryTree.HideSelection = false;
     this.inventoryTree.ImageIndex = 0;
     this.inventoryTree.Location = new Point(15, 25);
     this.inventoryTree.Name = "inventoryTree";
     this.inventoryTree.Root = null;
     this.inventoryTree.SelectedImageIndex = 0;
     this.inventoryTree.Size = new Size(269, 244);
     this.inventoryTree.TabIndex = 1;
     this.inventoryTree.Value = null;
     this.inventoryTree.NodeMouseDoubleClick += new TreeNodeMouseClickEventHandler(this.inventoryTree_NodeMouseDoubleClick);
     this.inventoryTree.ValueChanged += new EventHandler(this.inventoryTree_ValueChanged);
     base.AcceptButton = this.buttonOK;
     base.AutoScaleDimensions = new SizeF(6f, 13f);
     base.AutoScaleMode = AutoScaleMode.Font;
     base.CancelButton = this.buttonCancel;
     base.ClientSize = new Size(296, 300);
     base.Controls.Add(this.buttonOK);
     base.Controls.Add(this.buttonCancel);
     base.Controls.Add(this.inventoryTree);
     base.Controls.Add(this.label1);
     base.Name = "PromptInventory";
     base.StartPosition = FormStartPosition.CenterParent;
     this.Text = "PROMPT_INVENTORY_TITLE";
     base.ResumeLayout(false);
     base.PerformLayout();
 }
Example #14
0
 public override void SearchInventory(string criteria, Inventory.Entry resultEntry)
 {
     Binding.FCE_Inventory_Object_SearchInventoryEntry(this.Root.Pointer, criteria, resultEntry.Pointer);
 }
Example #15
0
 protected override void DestroyFilterDirectory(Inventory.Entry entry)
 {
     Binding.FCE_Inventory_Object_DestroyFilterDirectory(entry.Pointer);
 }