示例#1
0
        async Task HandleSixPlay()
        {
            var sixPlay = GetSixPlay(Game);

            if (sixPlay != null)
            {
                var mods          = _missionsViewModel.Mods.Value;
                var mod           = mods.ContentManager.FindMod(sixPlay);
                var currentModSet = Game.CalculatedSettings.Collection;
                if (currentModSet != null)
                {
                    if (!currentModSet.EnabledMods.Contains(mod))
                    {
                        var modSet = mods.ContentManager.CloneCollection(currentModSet);
                        modSet.AddModAndUpdateState(mod, _contentList);
                        mods.LibraryVM.ActiveItem = modSet;
                    }
                }
                else
                {
                    mods.LibraryVM.ActiveItem = mod;
                }
                try {
                    await
                    _updateManager.HandleConvertOrInstallOrUpdate().ConfigureAwait(false);
                } catch (BusyStateHandler.BusyException) {
                    _dialogManager.BusyDialog();
                }
            }
        }