added popup not binded yet

This commit is contained in:
shinichi
2020-10-09 12:18:34 +02:00
parent c87c190d14
commit 50a2ae9521
3 changed files with 14 additions and 4 deletions

View File

@@ -13,6 +13,8 @@ namespace ClientApp.ViewModels
class LoginViewModel : ObservableObject
{
public string Username { get; set; }
public ICommand LoginCommand { get; set; }
public bool LoginStatus { get; set; }
private MainWindowViewModel mainWindowViewModel;
public LoginViewModel(MainWindowViewModel mainWindowViewModel)
{
@@ -24,11 +26,12 @@ namespace ClientApp.ViewModels
});
}
public ICommand LoginCommand { get; set; }
internal void setLoginStatus(bool status)
{
this.mainWindowViewModel.InfoModel.ConnectedToServer = true;
this.mainWindowViewModel.InfoModel.ConnectedToServer = status;
this.LoginStatus = status;
if (status)
{
this.mainWindowViewModel.SelectedViewModel = new MainViewModel(mainWindowViewModel);