Example #1
0
        public CharacterSlot(Character c)
        {
            InitializeComponent();

            OChar = c;
            lbl_Name.Text = c.Name;

            string pathloc = Paths.RootDirectory;
            string iconname = c.GetImageIcon();

            try
            {
                pb_Image.Image = new Bitmap(Path.Combine(pathloc, "Images", "Icons", iconname));
                pb_Image.Dock=DockStyle.Fill;
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error creating image!");
            }
        }