diff --git a/ClientApp/ViewModels/LoginViewModel.cs b/ClientApp/ViewModels/LoginViewModel.cs index ad5b348..345205e 100644 --- a/ClientApp/ViewModels/LoginViewModel.cs +++ b/ClientApp/ViewModels/LoginViewModel.cs @@ -1,11 +1,26 @@ using System; using System.Collections.Generic; +using System.Diagnostics; using System.Text; +using System.Windows.Controls; +using System.Windows.Input; using ClientApp.Utils; +using GalaSoft.MvvmLight.Command; namespace ClientApp.ViewModels { class LoginViewModel : ObservableObject { + public string Username { get; set; } + public LoginViewModel() + { + LoginCommand = new RelayCommand((parameter) => + { + Debug.WriteLine($"username {Username} password {((PasswordBox)parameter).Password}"); + //TODO send username and password to server + }); + } + + public ICommand LoginCommand { get; set; } } } diff --git a/ClientApp/Views/LoginView.xaml b/ClientApp/Views/LoginView.xaml index a24b69c..81ea950 100644 --- a/ClientApp/Views/LoginView.xaml +++ b/ClientApp/Views/LoginView.xaml @@ -6,13 +6,13 @@ xmlns:local="clr-namespace:ClientApp.Views" mc:Ignorable="d" d:DesignHeight="450" d:DesignWidth="800"> - - -