상속: IDisposable
 protected override void OnAssignSlot(int id, Inventory.Entry entry)
 {
     base.OnAssignSlot(id, entry);
     if (entry == null || !entry.IsValid)
     {
         CollectionManager.ClearMaskId(id);
         CollectionManager.AssignCollectionId(id, CollectionInventory.Entry.Null);
         return;
     }
     CollectionManager.AssignCollectionId(id, (CollectionInventory.Entry)entry);
 }
예제 #2
0
 protected override void OnAssignSlot(int id, Inventory.Entry entry)
 {
     base.OnAssignSlot(id, entry);
     if (entry == null || !entry.IsValid)
     {
         TerrainManager.ClearTextureId(id);
         TerrainManager.AssignTextureId(id, TextureInventory.Entry.Null);
         return;
     }
     TerrainManager.AssignTextureId(id, (TextureInventory.Entry)entry);
 }
예제 #3
0
 protected override void OnAssignSlot(int id, Inventory.Entry entry)
 {
     base.OnAssignSlot(id, entry);
     if (entry == null || !entry.IsValid)
     {
         SplineManager.DestroyRoad(id);
         return;
     }
     SplineRoad splineRoad = SplineManager.GetRoadFromId(id);
     if (!splineRoad.IsValid)
     {
         splineRoad = SplineManager.CreateRoad(id);
     }
     SplineInventory.Entry entry2 = (SplineInventory.Entry)entry;
     splineRoad.Entry = entry2;
     splineRoad.Width = entry2.DefaultWidth;
     splineRoad.UpdateSpline();
 }
예제 #4
0
 private void AssignSlot(int id, Inventory.Entry entry)
 {
     Win32.SetRedraw(this, false);
     UndoManager.RecordUndo();
     this.OnAssignSlot(id, entry);
     UndoManager.CommitUndo();
     if (entry != null)
     {
         this.OnValueChanged(id);
     }
     else
     {
         this.OnValueChanged(-1);
     }
     this.UpdateList();
     Win32.SetRedraw(this, true);
     this.Refresh();
 }
예제 #5
0
 public void SetChildIndex(Inventory.Entry child, int index)
 {
     Binding.FCE_Inventory_Entry_SetChildIndex(this.m_entryPtr, child.Pointer, index);
 }
예제 #6
0
 private void FillCategories(Inventory.Entry entry, IndentedComboBox.Item item)
 {
     if (!entry.IsDirectory)
     {
         return;
     }
     if (entry.Deleted)
     {
         return;
     }
     IndentedComboBox.Item item2 = new IndentedComboBox.Item();
     item2.Tag = entry;
     item2.Text = entry.DisplayName;
     item2.Image = entry.Icon;
     item.Add(item2);
     int num = 0;
     Inventory.Entry[] children = entry.Children;
     for (int i = 0; i < children.Length; i++)
     {
         Inventory.Entry entry2 = children[i];
         if (entry2.IsDirectory)
         {
             this.FillCategories(entry2, item2);
         }
         else
         {
             num++;
         }
     }
     if (num > 0)
     {
         item2.SubText = "(" + num + ")";
     }
 }
예제 #7
0
 private void FillNodes(Inventory.Entry root, TreeNodeCollection nodes)
 {
     Inventory.Entry[] children = root.Children;
     for (int i = 0; i < children.Length; i++)
     {
         Inventory.Entry entry = children[i];
         if ((!this.m_onlyDirectories || entry.IsDirectory) && !entry.Deleted)
         {
             TreeNode treeNode = this.CreateNode(entry);
             nodes.Add(treeNode);
             this.FillNodes(entry, treeNode.Nodes);
         }
     }
 }
예제 #8
0
 public void RemoveEntry(Inventory.Entry entry)
 {
     TreeNode treeNode;
     this.m_nodes.TryGetValue(entry, out treeNode);
     if (treeNode == null)
     {
         return;
     }
     Inventory.Entry[] children = entry.Children;
     for (int i = 0; i < children.Length; i++)
     {
         Inventory.Entry entry2 = children[i];
         this.RemoveEntry(entry2);
     }
     treeNode.Remove();
     this.m_nodes.Remove(entry);
 }
예제 #9
0
 public CollectionTreeItem(int id, Inventory.Entry entry)
 {
     this.m_id = id;
     this.m_entry = entry;
 }
예제 #10
0
 private ListViewItem CreateItem(Inventory.Entry entry)
 {
     if (entry.Deleted)
     {
         return null;
     }
     ListViewItem listViewItem = new ListViewItem(entry.DisplayName);
     this.m_listItems[entry] = listViewItem;
     listViewItem.Tag = entry;
     base.Items.Add(listViewItem);
     return listViewItem;
 }
예제 #11
0
 public void RemoveEntry(Inventory.Entry entry)
 {
     ListViewItem listViewItem;
     this.m_listItems.TryGetValue(entry, out listViewItem);
     if (listViewItem == null)
     {
         return;
     }
     listViewItem.Remove();
 }
예제 #12
0
 public ListViewItem FindEntry(Inventory.Entry entry)
 {
     ListViewItem result;
     this.m_listItems.TryGetValue(entry, out result);
     return result;
 }
예제 #13
0
 public void AddEntry(Inventory.Entry entry)
 {
     ListViewItem listViewItem;
     this.m_listItems.TryGetValue(entry, out listViewItem);
     if (listViewItem == null)
     {
         listViewItem = this.CreateItem(entry);
         if (listViewItem == null)
         {
             return;
         }
     }
     base.SelectedItems.Clear();
     if (listViewItem != null)
     {
         listViewItem.Selected = true;
     }
 }
예제 #14
0
 protected virtual void DestroyFilterDirectory(Inventory.Entry entry)
 {
 }
예제 #15
0
 public virtual void SearchInventory(string criteria, Inventory.Entry resultEntry)
 {
 }
예제 #16
0
 public override void SearchInventory(string criteria, Inventory.Entry resultEntry)
 {
     Binding.FCE_Inventory_Object_SearchInventoryEntry(this.Root.Pointer, criteria, resultEntry.Pointer);
 }
예제 #17
0
 protected override void DestroyFilterDirectory(Inventory.Entry entry)
 {
     Binding.FCE_Inventory_Object_DestroyFilterDirectory(entry.Pointer);
 }
예제 #18
0
 public TextureTreeItem(int id, Inventory.Entry entry)
 {
     this.m_id = id;
     this.m_entry = entry;
 }
예제 #19
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;
 }
예제 #20
0
 private bool IsNotRootEntry(Inventory.Entry entry)
 {
     return this.IsValidEntry(entry) && entry != ObjectInventory.Instance.Root;
 }
예제 #21
0
 private TreeNode CreateNode(Inventory.Entry entry)
 {
     TreeNode treeNode = new TreeNode();
     treeNode.Text = entry.DisplayName;
     treeNode.Tag = entry;
     string iconName = entry.IconName;
     if (!this.imageList.Images.ContainsKey(iconName))
     {
         this.imageList.Images.Add(iconName, entry.Icon);
     }
     treeNode.ImageKey = iconName;
     treeNode.SelectedImageKey = iconName;
     this.m_nodes.Add(entry, treeNode);
     return treeNode;
 }
예제 #22
0
 private bool IsValidEntry(Inventory.Entry entry)
 {
     return entry != null && entry.IsValid;
 }
예제 #23
0
 private IndentedComboBox.Item FindCategory(Inventory.Entry entry)
 {
     foreach (IndentedComboBox.Item current in this.categoryComboBox.GetItems())
     {
         Inventory.Entry entry2 = (Inventory.Entry)current.Tag;
         if (entry2.Pointer == entry.Pointer)
         {
             return current;
         }
     }
     return null;
 }
예제 #24
0
 public SlotItem(int id, Inventory.Entry entry)
 {
     this.m_id = id;
     this.m_entry = entry;
 }
예제 #25
0
 protected virtual void OnAssignSlot(int id, Inventory.Entry entry)
 {
 }
예제 #26
0
 public void AddChild(Inventory.Entry child)
 {
     Binding.FCE_Inventory_Entry_AddChild(this.Pointer, child.Pointer);
 }