/// <summary> /// This is a mock function. /// </summary> virtual public void MockInstantiate(UInt64 maxWealth) { /**** ORDER IS ESSENTIAL ****/ Amiability = new Amiability.Amiability(Seed); // Will have a bearing on TechLevel TechLevel = Tech.TechLevel.WESTERN; // Need to determine how to set this Wealth = new Wealth(Seed, TechLevel, maxWealth); // Dependent on TechLevel Population = new Population(this); // Dependent on Tech, Amiability, and Wealth RaceMakeup = new RaceMakeup(Seed); Weather = new Weather.Weather(); Flora = new Flora(Weather); Fauna = new Fauna(Weather); }
private void UpdatePanelData(Panel panel, Weather.Weather weatherResult) { if (weatherResult == null) { for (int i = 0; i < 7; i++) { panel.Controls[1 + i].Text = "No data"; } return; } panel.Controls[1].Text = weatherResult.CelsiusTemperature.ToString() + "°"; panel.Controls[2].Text = weatherResult.FahrenheitTemperature.ToString() + "°"; panel.Controls[3].Text = weatherResult.CloudCover.ToString() + "%"; panel.Controls[4].Text = weatherResult.Precipitation.ToString(); panel.Controls[5].Text = weatherResult.Humidity.ToString() + "%"; panel.Controls[6].Text = weatherResult.WindDirection.ToString(); panel.Controls[7].Text = weatherResult.WindSpeed.ToString() + "m/s"; }
protected void Button1_Click(object sender, EventArgs e) { String zip = TextBox1.Text; Weather.Weather myservice = new Weather.Weather(); Label1.Text = myservice.GetCityWeatherByZIP(zip).Description; Label2.Text = myservice.GetCityWeatherByZIP(zip).Temperature; Label3.Text = myservice.GetCityWeatherByZIP(zip).City; Label4.Text = myservice.GetCityWeatherByZIP(zip).State; int k = myservice.GetCityWeatherByZIP(zip).WeatherID; if (k == 1) { Image1.ImageUrl = "http://ws.cdyne.com/WeatherWS/Images/thunderstorms.gif"; } if (k == 2) { Image1.ImageUrl = "http://ws.cdyne.com/WeatherWS/Images/partlycloudy.gif"; } if (k == 3) { Image1.ImageUrl = "http://ws.cdyne.com/WeatherWS/Images/mostlycloudly.gif"; } if (k == 4) { Image1.ImageUrl = "http://ws.cdyne.com/WeatherWS/Images/sunny.gif"; } if (k == 5) { Image1.ImageUrl = "http://ws.cdyne.com/WeatherWS/Images/rain.gif"; if (k == 6) { Image1.ImageUrl = "http://ws.cdyne.com/WeatherWS/Images/showers.gif"; } if (k == 7) { Image1.ImageUrl = "http://ws.cdyne.com/WeatherWS/Images/haze.gif"; } if (k == 9) { Image1.ImageUrl = "http://ws.cdyne.com/WeatherWS/Images/mostlycloudy.gif"; } if (k == 10) { Image1.ImageUrl = "http://ws.cdyne.com/WeatherWS/Images/partlycloudy.gif"; } if (k == 11) { Image1.ImageUrl = "http://ws.cdyne.com/WeatherWS/Images/sunny.gif"; } if (k == 12) { Image1.ImageUrl = "http://ws.cdyne.com/WeatherWS/Images/partlycloudy.gif"; } if (k == 14) { Image1.ImageUrl = "http://ws.cdyne.com/WeatherWS/Images/mostlycloudy.gif"; } if (k == 14) { Image1.ImageUrl = "http://ws.cdyne.com/WeatherWS/Images/mostlycloudy.gif"; } if (k == 15) { Image1.ImageUrl = "http://ws.cdyne.com/WeatherWS/Images/na.gif"; } if (k == 17) { Image1.ImageUrl = "http://ws.cdyne.com/WeatherWS/Images/drizzle.gif"; } if (k == 18) { Image1.ImageUrl = "http://ws.cdyne.com/WeatherWS/Images/fog.gif"; } if (k == 20) { Image1.ImageUrl = "http://ws.cdyne.com/WeatherWS/Images/blowingsnow.gif"; } if (k == 21) { Image1.ImageUrl = "http://ws.cdyne.com/WeatherWS/Images/blowingsnow.gif"; } if (k == 26) { Image1.ImageUrl = "http://ws.cdyne.com/WeatherWS/Images/blowingsnow.gif"; } if (k == 27) { Image1.ImageUrl = "http://ws.cdyne.com/WeatherWS/Images/snow.gif"; } if (k == 28) { Image1.ImageUrl = "http://ws.cdyne.com/WeatherWS/Images/rain.gif"; } if (k == 29) { Image1.ImageUrl = "http://ws.cdyne.com/WeatherWS/Images/blowingsnow.gif"; } if (k == 32) { Image1.ImageUrl = "http://ws.cdyne.com/WeatherWS/Images/rain.gif"; } if (k == 33) { Image1.ImageUrl = "http://ws.cdyne.com/WeatherWS/Images/rain.gif"; } if (k == 34) { Image1.ImageUrl = "http://ws.cdyne.com/WeatherWS/Images/na.gif"; } if (k == 35) { Image1.ImageUrl = "http://ws.cdyne.com/WeatherWS/Images/blowingsnow.gif"; } if (k == 36) { Image1.ImageUrl = "http://ws.cdyne.com/WeatherWS/Images/na.gif"; } if (k == 37) { Image1.ImageUrl = "http://ws.cdyne.com/WeatherWS/Images/partlycloudy.gif"; } } }
/// <summary> /// Construct fauna class for the particular weather /// </summary> /// <param name="weather">Weather of the region this fauna exists</param> public Fauna(Weather.Weather weather) { // Presumaby won't need the weather object after initial setup }
/// <summary> /// Constructs a weather system based on current weather. /// </summary> /// <param name="weather">WeatherSystems are based on current weather</param> public WeatherSystem(Weather weather) { }