コード例 #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();
            }
        }
コード例 #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();
            }
        }