private void Form1_Load(object sender, EventArgs e) { zodiac["aries"] = new Sign() { name = "ARIES", period = "March 21 - April 20", image = "aries.jpg", predictions = new List <string> { "aries prediction 1", "aries prediction 2", "aries prediction 3" } }; zodiac["taurus"] = new Sign() { name = "TAURUS", period = "Apr 21 - May 21", image = "taurus.jpg", predictions = new List <string> { "taurus prediction 1", "taurus prediction 2", "taurus prediction 3" } }; zodiac["gemini"] = new Sign() { name = "GEMINI", period = "May 22 - Jun 21", image = "gemini.jpg", predictions = new List <string> { "gemini prediction 1", "gemini prediction 2", "gemini prediction 3" } }; zodiac["cancer"] = new Sign() { name = "CANCER", period = "Jun 22 - Jul 23", image = "cancer.jpg", predictions = new List <string> { "cancer prediction 1", "cancer prediction 2", "cancer prediction 3" } }; zodiac["leo"] = new Sign() { name = "LEO", period = "Jul 24 - Aug 23", image = "leo.jpg", predictions = new List <string> { "leo prediction 1", "leo prediction 2", "leo prediction 3" } }; zodiac["virgo"] = new Sign() { name = "VIRGO", period = "Aug 24 - Sep 23", image = "virgo.jpg", predictions = new List <string> { "virgo prediction 1", "virgo prediction 2", "virgo prediction 3" } }; zodiac["libra"] = new Sign() { name = "LIBRA", period = "Sep 24 - Oct 23", image = "libra.jpg", predictions = new List <string> { "libra prediction 1", "libra prediction 2", "libra prediction 3" } }; zodiac["scorpio"] = new Sign() { name = "SCORPIO", period = "Oct 24 - Nov 22", image = "scorpio.jpg", predictions = new List <string> { "scorpio prediction 1", "scorpio prediction 2", "scorpio prediction 3" } }; zodiac["scorpio"] = new Sign() { name = "SCORPIO", period = "Oct 24 - Nov 22", image = "scorpio.jpg", predictions = new List <string> { "scorpio prediction 1", "scorpio prediction 2", "scorpio prediction 3" } }; zodiac["sagittarius"] = new Sign() { name = "SAGITTARIUS", period = "Nov 23 - Dec 21", image = "sagittarius.jpg", predictions = new List <string> { "sagittarius prediction 1", "sagittarius prediction 2", "sagittarius prediction 3" } }; zodiac["capricorn"] = new Sign() { name = "CAPRICORN", period = "Dec 22 - Jan 20", image = "capricorn.jpg", predictions = new List <string> { "capricorn prediction 1", "capricorn prediction 2", "capricorn prediction 3" } }; zodiac["aquarius"] = new Sign() { name = "AQUARIUS", period = "Jan 21 - Feb 19", image = "aquarius.jpg", predictions = new List <string> { "aquarius prediction 1", "aquarius prediction 2", "aquarius prediction 3" } }; zodiac["pisces"] = new Sign() { name = "PISCES", period = "Feb 20 - Mar 20", image = "pisces.jpg", predictions = new List <string> { "pisces prediction 1", "pisces prediction 2", "pisces prediction 3" } }; cmbZodiac.DataSource = new BindingSource(zodiac.Values, null); }
private void loadImage(Sign sign) { pbImages.Image = (sign.image == null) ? null : Image.FromFile(Environment.CurrentDirectory + "\\images\\" + sign.image); pbImages.SizeMode = PictureBoxSizeMode.CenterImage; }