private void StartApplication(IConfiguration configuration) { UiDispatcher.Init(Dispatcher); Configuration = configuration; var dependencyInjection = new DependencyInjection(); dependencyInjection.Initialize(configuration); DependencyInjection.Container.Resolve <IClient>().Start(configuration.ClientId, configuration.ServerAddress, configuration.ServerCommandPort, configuration.ServerPublishPort); var window = new MainWindow(); var viewModel = new MainWindowViewModel(); window.DataContext = viewModel; window.Show(); }