private void listBox_Events_SelectedIndexChanged(object sender, EventArgs e) { if (listBox_Events.SelectedItem != null) { EventWithWeather selectedEvent = listBox_Events.SelectedItem as EventWithWeather; textBox_eventName.Text = m_Manager.GetEventName(selectedEvent); textBox_eventLocation.Text = m_Manager.GetEventCity(selectedEvent); textBox_eventDescription.Text = m_Manager.GetEventDescription(selectedEvent); textBox_eventDate.Text = m_Manager.GetEventTime(selectedEvent); pictureBox_event.LoadAsync(m_Manager.GetEventURLPicture(selectedEvent)); string cityName = textBox_eventLocation.Text; CityWeather cityWeather = selectedEvent.CityWeather; //m_Manager.GetWeather(cityName); textBox_Temp.Text = cityWeather.m_Temperature; textBox_humidity.Text = cityWeather.m_humidity; double temperature = double.Parse(textBox_Temp.Text); pictureBox_whether.ImageLocation = m_Manager.GetPathOfImageWeather(temperature); panel_eventDetails.Visible = true; } }
internal static string GetPicture(EventWithWeather i_Event) { return(i_Event.Event.PictureSmallURL); }
internal static string GetTime(EventWithWeather i_Event) { return(i_Event.Event.TimeString); }
internal static string GetDescription(EventWithWeather i_Event) { return(i_Event != null ? i_Event.Event.Description : ""); }
internal static string GetPlaceCity(EventWithWeather i_Event) { return(i_Event.Event.Place != null ? i_Event.Event.Place.Location.City : ""); }
internal static string GetName(EventWithWeather i_Event) { return(i_Event.Event.Name); }
public string GetEventTime(EventWithWeather i_Event) { return(FacebookEventHandler.GetTime(i_Event)); }
public string GetEventURLPicture(EventWithWeather i_Event) { return(FacebookEventHandler.GetPicture(i_Event)); }
public string GetEventCity(EventWithWeather i_Event) { return(FacebookEventHandler.GetPlaceCity(i_Event)); }
public string GetEventDescription(EventWithWeather i_Event) { return(FacebookEventHandler.GetDescription(i_Event)); }