private void OnAssign() { using (PromptInventoryList promptInventoryList = new PromptInventoryList()) { promptInventoryList.Root = WaterInventory.Instance.Root; promptInventoryList.Value = this.m_entry; if (promptInventoryList.ShowDialog(this) == DialogResult.OK) { this.Entry = (WaterInventory.Entry)promptInventoryList.Value; } } }
private void PromptSlotAssignment(SlotItem item) { using (PromptInventoryList promptInventoryList = new PromptInventoryList()) { promptInventoryList.Root = this.Root; if (item != null) { promptInventoryList.Value = item.Entry; } if (promptInventoryList.ShowDialog(this) != DialogResult.Cancel) { int num = (item != null) ? item.Id : this.FindFreeSlot(); if (num >= 0) { this.AssignSlot(num, promptInventoryList.Value); } } } }