private void LoadCharacterIcons() { string resourceFolderPath = Path.Combine(Directory.GetParent(Application.StartupPath).Parent.FullName, "Resources", "dbd"); foreach (var file in Directory.GetFiles(resourceFolderPath, "*.png")) { string fileName = Path.GetFileNameWithoutExtension(file).ToLower(); System.Drawing.Image characterImage = System.Drawing.Image.FromFile(file); characterIcons[fileName] = characterImage; } }