public void OpenDatabaseExplorer() { CarWorkshopDBContext context = new CarWorkshopDBContext(); Repository clientRepository = new Repository(context); ShellViewModel viewModel = new ShellViewModel(clientRepository); Shell s1 = new Shell(viewModel); s1.Show(); CarViewModel viewModel1 = new CarViewModel(clientRepository); CarsWindow c1 = new CarsWindow(viewModel1); c1.Show(); RepairViewModel viewModel2 = new RepairViewModel(clientRepository); RepairsWindow r1 = new RepairsWindow(viewModel2); r1.Show(); MechanicViewModel viewModel3 = new MechanicViewModel(clientRepository); MechanicsWindow m1 = new MechanicsWindow(viewModel3); m1.Show(); }
private void CarsButton_Click(object sender, RoutedEventArgs e) { CarsWindow window = new CarsWindow(new CarsViewModel()); window.Show(); }