Develop #10

Merged
SemvdH merged 229 commits from develop into master 2020-10-29 22:50:49 +00:00
2 changed files with 4 additions and 5 deletions
Showing only changes of commit e410e9ec88 - Show all commits

View File

@@ -14,7 +14,7 @@ namespace ClientApp.ViewModels
{
public string Username { get; set; }
public ICommand LoginCommand { get; set; }
public bool LoginStatus { get; set; }
public bool InvertedLoginStatus { get; set; }
private MainWindowViewModel mainWindowViewModel;
public LoginViewModel(MainWindowViewModel mainWindowViewModel)
{
@@ -31,7 +31,7 @@ namespace ClientApp.ViewModels
internal void setLoginStatus(bool status)
{
this.mainWindowViewModel.InfoModel.ConnectedToServer = status;
this.LoginStatus = status;
this.InvertedLoginStatus = !status;
if (status)
{
this.mainWindowViewModel.SelectedViewModel = new MainViewModel(mainWindowViewModel);

View File

@@ -14,9 +14,8 @@
<Label Content="Password" HorizontalContentAlignment="Center"/>
<PasswordBox x:Name="Password" Width="120"/>
<Button x:Name="Login" Content="Login" Command="{Binding LoginCommand}" CommandParameter="{Binding ElementName=Password}" Margin="0,20,0,0" Width="120"/>
<CheckBox Name = "PCheckBox" Margin = "198,94,208,194" Content = "Checked Me"/>
<Popup IsOpen="{Binding LoginStatus}" PopupAnimation = "Slide">
<Label Content="Login failed" Foreground="Red"/>
<Popup IsOpen="{Binding InvertedLoginStatus}" PopupAnimation = "Fade" HorizontalAlignment="Left">
<Label Content="Login failed" Foreground="Red" Background="#FFFF" />
</Popup>
</StackPanel>
</DockPanel>