private void initCharacter(string characterName) { string hex; using (DBConnection conn = new DBConnection()) { currentCharacter = conn.characters.Single(c => c.Name == characterName); hex = BitConverter.ToString(currentCharacter.Inventory).Replace("-", ""); } if (hex != null) { currentInventory = new InventoryStorage(hex); initCharacterDisplay(); initInventoryDisplay(); } }
private void initCharacter(string characterName) { string hex; using(DBConnection conn = new DBConnection()) { currentCharacter = conn.characters.Single(c => c.Name == characterName); hex = BitConverter.ToString(currentCharacter.Inventory).Replace("-", ""); } if (hex != null) { currentInventory = new InventoryStorage(hex); initCharacterDisplay(); initInventoryDisplay(); } }