protected override void OnStartup(StartupEventArgs e) { NotABookLibraryStandart.Models.Base.ProjectType = NotABookLibraryStandart.Models.TypeOfRunningProject.WPF; Principal principal = new Principal(); AppDomain.CurrentDomain.SetThreadPrincipal(principal); base.OnStartup(e); LogInWindowViewModel viewModel = new LogInWindowViewModel(new Service(new Repository(new DataBaseContext()))); var window = new Windows.LogInWindow(viewModel); window.Show(); }
public LogInWindow(LogInWindowViewModel viewModel) { ViewModel = viewModel; InitializeComponent(); Messenger.Default.Register(this, new Action <string>(ProcessMessage)); }