Esempio n. 1
0
        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();
            }
        }
Esempio n. 2
0
        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();
            }
        }