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;
        }
Example #3
0
        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);
        }
Example #4
0
 public RemoveView(IMainInfoPresenter mainInfoPresenter)
 {
     InitializeComponent();
     this.mainInfoPresenter   = mainInfoPresenter;
     CitiesListBox.DataSource = mainInfoPresenter.CityWeathers.Keys.ToList();
 }