예제 #1
0
        private PresetViewModel MakePresetViewModel(Preset preset)
        {
            var viewModel = new PresetViewModel(preset, initialization.ModManager, initialization.PresetManager);

            viewModel.OnDisband += () => OnPresetDisband(viewModel);
            return(viewModel);
        }
예제 #2
0
 private void OnPresetDisband(PresetViewModel viewModel)
 {
     foreach (var mod in viewModel.Mods)
     {
         var newViewModel = MakeModViewModel(mod.Mod);
         newViewModel.Mod.LoadIcon();
         modItemsInternal.Add(newViewModel);
     }
     modItemsInternal.Remove(viewModel);
 }
 private void OnPresetDisband(PresetViewModel viewModel)
 {
     foreach (var mod in viewModel.Mods)
     {
         var newViewModel = MakeModViewModel(mod.Mod);
         newViewModel.Mod.LoadIcon();
         modItemsInternal.Add(newViewModel);
     }
     modItemsInternal.Remove(viewModel);
 }
 private PresetViewModel MakePresetViewModel(Preset preset)
 {
     var viewModel = new PresetViewModel(preset, initialization.ModManager, initialization.PresetManager);
     viewModel.OnDisband += () => OnPresetDisband(viewModel);
     return viewModel;
 }