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