Only allow username changes when not in game

This commit is contained in:
2016-01-19 15:10:26 +01:00
parent 77f6217228
commit 3dad6d5a46
2 changed files with 9 additions and 1 deletions
+8
View File
@@ -20,5 +20,13 @@ namespace YJMPD_UWP.ViewModels
Settings.Username = value;
}
}
public bool UsernameEnabled
{
get
{
return App.Game.Status == Model.GameHandler.GameStatus.STOPPED;
}
}
}
}
+1 -1
View File
@@ -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>