public MainWindow(CaseContainerViewModel caseContainerViewModel, CountryLookupViewModel countryLookupViewModel)
        {
            var countryLookupView = new CountryLookupView(countryLookupViewModel)
            {
                AutoSize = true,
                Location = new System.Drawing.Point(0, 0),
                Name     = "countryLookupView",
                Size     = new System.Drawing.Size(437, 1),
                TabIndex = 0
            };

            var caseContainerView = new CaseContainerView(caseContainerViewModel)
            {
                AutoScroll  = true,
                BorderStyle = BorderStyle.FixedSingle,
                Location    = new System.Drawing.Point(11, 135),
                Name        = "caseContainerView",
                Size        = new System.Drawing.Size(415, 364),
                TabIndex    = 1
            };

            InitializeComponent();

            Controls.Add(caseContainerView);
            Controls.Add(countryLookupView);
        }
        public CountryLookupView(CountryLookupViewModel viewModel)
        {
            InitializeComponent();
            mFileSystemText.Text  = Path.Combine(Environment.CurrentDirectory, "Covid19Countries_Europe_2020_06_18.csv");
            mOpenCsvButton.Click += (sender, args) => OpenCsvFileDialog();

            mViewModel = viewModel;
            OnApiRadButtonCheckedChanged(this, null);
        }
Esempio n. 3
0
        public MainWindowController()
        {
            mCountryLookupModel = new CountryLookupModel(new Covid19ApiRepository(), new MockSampleRepository(), new CsvRepository());
            var countryLookupViewModel = new CountryLookupViewModel(mCountryLookupModel);

            countryLookupViewModel.CountryAdded += OnCountryAddedToList;

            mCaseContainerViewModel = new CaseContainerViewModel(new CaseContainerModel());

            MainWindow = new MainWindow(mCaseContainerViewModel, countryLookupViewModel);
        }