private void SetStartEnabled(bool IsEnabled) {
this.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Normal, new Action(delegate () {
//Убираем задачу обновления
RemoveTask();
TaskBar.ProgressState = TaskbarItemProgressState.None;
ProfileManager.OnProfileLocked(false);
EnvironmentManager.OnClosingLocked(false);
EnvironmentManager.OnFileSystemLocked(false);
UpdateRequired = false;
WrapElement.Content = StartButton;
StartButton.SetBinding(Button.ContentProperty, StartButtonBinding);
StartButton.IsEnabled = false;
//Проверяем наличие необходимых файлов стандартного лаунчера. Если нету - просто показываем неактивную кнопку "Обновить игру" и сообщение об ошибке.
if (!ConfigurationManager.CheckGame(ProfileManager.CurrentProfile.GameModel)) {
DialogManager.ShowErrorDialog(LanguageManager.Model.PleaseSelectGamePath);
return;
}
StartButton.IsEnabled = IsEnabled;
}));
}