From 3dad6d5a46b38758891198c184f32e841710e9d7 Mon Sep 17 00:00:00 2001 From: Kenneth van Ewijk Date: Tue, 19 Jan 2016 15:10:26 +0100 Subject: [PATCH] Only allow username changes when not in game --- YJMPD-UWP/ViewModels/SettingsVM.cs | 8 ++++++++ YJMPD-UWP/Views/SettingsView.xaml | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/YJMPD-UWP/ViewModels/SettingsVM.cs b/YJMPD-UWP/ViewModels/SettingsVM.cs index c6ff439..eadcf80 100644 --- a/YJMPD-UWP/ViewModels/SettingsVM.cs +++ b/YJMPD-UWP/ViewModels/SettingsVM.cs @@ -20,5 +20,13 @@ namespace YJMPD_UWP.ViewModels Settings.Username = value; } } + + public bool UsernameEnabled + { + get + { + return App.Game.Status == Model.GameHandler.GameStatus.STOPPED; + } + } } } diff --git a/YJMPD-UWP/Views/SettingsView.xaml b/YJMPD-UWP/Views/SettingsView.xaml index 18b572e..b8d2382 100644 --- a/YJMPD-UWP/Views/SettingsView.xaml +++ b/YJMPD-UWP/Views/SettingsView.xaml @@ -11,7 +11,7 @@ - +