예제 #1
0
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

            login = new LoginView();
            var loginVM = new LoginViewModel(authoService);
            login.DataContext = loginVM;
            login.Show();
        }
예제 #2
0
 private void OnLoggedInMessageReceived(string username)
 {
     if (username == "un_authorized_user")
     {
         login = new LoginView();
         var loginVM = new LoginViewModel(authoService);
         login.DataContext = loginVM;
         login.Show();
         app.Close();
     }
     else
     {
         app = new ApplicationView();
         var appVM = new ApplicationViewModel();
         app.DataContext = appVM;
         app.Show();
         login.Close();
     }
 }
 public LoginView()
 {
     InitializeComponent();
     ViewModel = new LoginViewModel(_authService);
     this.DataContext = ViewModel;
 }