Only allow username changes when not in game
This commit is contained in:
@@ -20,5 +20,13 @@ namespace YJMPD_UWP.ViewModels
|
||||
Settings.Username = value;
|
||||
}
|
||||
}
|
||||
|
||||
public bool UsernameEnabled
|
||||
{
|
||||
get
|
||||
{
|
||||
return App.Game.Status == Model.GameHandler.GameStatus.STOPPED;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<StackPanel Style="{StaticResource BaseStackPanel}" >
|
||||
<StackPanel>
|
||||
<TextBlock Text="Username" Style="{StaticResource Header}" />
|
||||
<TextBox Text="{Binding Username, Mode=TwoWay}" />
|
||||
<TextBox Text="{Binding Username, Mode=TwoWay}" IsEnabled="{Binding UsernameEnabled}"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
|
||||
Reference in New Issue
Block a user