protected override void OnStartup(StartupEventArgs e) { // Run startup code first base.OnStartup(e); Data = new UnitOfWork(); // Create Windows loginView = new LoginView(); loginVM = new LoginViewModel(Data); topBarView = new TopBarView(); answerView = new AnswerQuizQuestionView(); takeView = new TakeQuizView(); statisticsView = new StatisticsView(); makeQuizView = new MakeQuizView(); makeNewQuizView = new MakeNewQuizView(); mainWindow = new MainWindow(); mainWindowVM = new MainWindowViewModel(Data, topBarView, answerView, takeView, statisticsView, makeQuizView, makeNewQuizView); mainWindow.DataContext = mainWindowVM; Data.LoginService.UserLoggedIn += LoginSuccesfull; Data.LoginService.UserFailedToLogIn += LoginFailed; loginView.DataContext = loginVM; loginView.Show(); }
private void Awake() { _sideBarView = GetComponentInChildren <SideBarView>(); _topBarView = GetComponentInChildren <TopBarView>(); _leftSideBar = GetComponentInChildren <LeftSideBarView>(); }