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 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); }
public CaseContainerView(CaseContainerViewModel viewModel) { InitializeComponent(); mViewModel = viewModel; mViewModel.CountryCaseInfoAdded += ViewModelOnCountryCaseInfoAdded; }