public LoginWindow() { InitializeComponent(); DataContext = new LoginViewModel(this, ClientLogger.GetOrCreate(), new RailwayServiceConnector()); }
public MainWindow(User user) { MainViewModel mainViewModel = new MainViewModel(user, this, new RailwayServiceConnector(), ClientLogger.GetOrCreate(), new PrimaryEntityCommandManager()); DataContext = mainViewModel; ClientEventManager.GetOrCreate().RegisterEventObserver(mainViewModel); InitializeComponent(); }