public void DeleteOrphan(OrphanObject toDelete) { if (orphanChars.Contains(toDelete)) { orphanChars.Remove(toDelete); } }
public CharacterEditor() { assocAcct = null; selSlot = null; selOrph = null; InitializeComponent(); }
public void Clear() { assocAcct = null; selSlot = null; selOrph = null; listCharacters.Items.Clear(); listCharacters.Update(); txtCharName.Clear(); txtCharSer.Clear(); cbBlockSlot.Checked = false; listOrphans.Items.Clear(); listOrphans.Update(); txtOrphName.Clear(); txtOrphSerial.Clear(); btnRestore.Enabled = false; }
private void listOrphans_SelectedIndexChanged(object sender, EventArgs e) { selOrph = null; if (assocAcct == null || listOrphans.Items.Count <= 0 || listOrphans.SelectedIndex == -1) { txtOrphName.Clear(); txtOrphSerial.Clear(); btnRestore.Enabled = false; return; } int index = listOrphans.SelectedIndex; OrphanObject tmpSlot = assocAcct.OrphanChars[index]; txtOrphName.Text = tmpSlot.Name; txtOrphSerial.Text = UOXData.Conversion.ToHexString(tmpSlot.Serial); btnRestore.Enabled = true; selOrph = tmpSlot; }