private void Form1_Load(object sender, EventArgs e) { pictureBox1.ImageLocation = Application.StartupPath + "//images//224.png"; MainImageTry(); button1.Image = Properties.Resources.close.ToImage(); btnTry.Image = Properties.Resources.Retry.ToImage(); pictureBox3.Image = Properties.Resources.map.ToImage(); pictureBox2.Image = Properties.Resources.ticket.ToImage(); pictureBox4.Image = Properties.Resources.time.ToImage(); privateFonts = new PrivateFontCollection(); privateFonts.AddFontFile(Application.StartupPath + "\\Font\\HannaPro.ttf"); Font font = new Font(privateFonts.Families[0], 12f); Font font16 = new Font(privateFonts.Families[0], 16f); lbl4.Font = lbl3.Font = lbl2.Font = lbl2.Font = lbl1.Font = lblweather.Font = lblTemp.Font = font; btn1.Font = btn2.Font = btnHoneyTip.Font = btn4.Font = font16; fweather = new FormWeather(); weather = fweather.CheckWeather(fweather.getJsonWeather("seoul")); if (weather.HowWeather.ToUpper() == "CLOUDS") { btnWeather.Image = Properties.Resources.Clouds.ToImage(); } else if (weather.HowWeather.ToUpper() == "CLEAR") { btnWeather.Image = Properties.Resources.Clear.ToImage(); } else if (weather.HowWeather.ToUpper() == "HAZE") { btnWeather.Image = Properties.Resources.Haze.ToImage(); } else if (weather.HowWeather.ToUpper() == "RAIN") { btnWeather.Image = Properties.Resources.Rain.ToImage(); } else if (weather.HowWeather.ToUpper() == "MIST") { btnWeather.Image = Properties.Resources.Mist.ToImage(); } else if (weather.HowWeather.ToUpper() == "FOG") { btnWeather.Image = Properties.Resources.Fog.ToImage(); } lblTemp.Text = Math.Round(weather.Temp - kalvin, 2).ToString() + " 도(섭씨)"; }
private void btnWeather_Click(object sender, EventArgs e) { FormWeather fw = new FormWeather(); fw.Show(); }