public WeatherAppForm() { InitializeComponent(); MainPanel.Controls.Add(new MainView()); mainInfoPresenter = new MainInfoPresenter(MainPanel.Controls[0] as IMainView, new OpenWeatherMapWeatherInfoGetter(ConfigurationManager.AppSettings.Get("Api"))); InitializeTasksInConstuctor(); UpdateAllCitiesThroughTimer(); }
public WeatherInfoView(IMainInfoPresenter mainInfoPresenter) { InitializeComponent(); this.Dock = DockStyle.Fill; hourlyGraph = new HourlyGraphUserControl(); hourlyDetails = new HourlyDetailsUserControl(); HourlyColumnTableLayoutPanel.Controls.Add(hourlyGraph); this.mainInfoPresenter = mainInfoPresenter; }
public MainView() { InitializeComponent(); this.Dock = DockStyle.Fill; mainInfoPresenter = new MainInfoPresenter(this, new OpenWeatherMapWeatherInfoGetter(ConfigurationManager.AppSettings.Get("Api"))); weatherInfoView = new WeatherInfoView(mainInfoPresenter); noCitiesView = new NoCitiesView(); MainTableLayoutPanel.Controls.Add(noCitiesView); }
public RemoveView(IMainInfoPresenter mainInfoPresenter) { InitializeComponent(); this.mainInfoPresenter = mainInfoPresenter; CitiesListBox.DataSource = mainInfoPresenter.CityWeathers.Keys.ToList(); }