public ModListItemViewModel( IModSelectionViewModel parent, ModInfo mod, IModManager modManager, IModPatchingService modPatcher, IDialogService dialogService, IPluginLoader pluginLoader, IModServiceGetterFactory modKernelFactory) { _modKernelFactory = modKernelFactory; _parentVm = parent; _modService = modManager; _dialogService = dialogService; _modPatcher = modPatcher; Mod = mod; PluginItems = pluginLoader.LoadPlugins(out var _); PatchRomCommand = new RelayCommand(() => PatchRom(Mod)); ExportModCommand = new RelayCommand(() => ExportMod(Mod)); EditModInfoCommand = new RelayCommand(() => EditModInfo(Mod)); CreateModBasedOnCommand = new RelayCommand(() => CreateModBasedOn(Mod)); DeleteModCommand = new RelayCommand(() => DeleteMod(Mod)); RunPluginCommand = new RelayCommand <PluginInfo>(parameter => RunPlugin(Mod, parameter)); }
public MainEditorViewModel( IDialogService dialogService, IModPatchingService modPatcher, ISettingService settingService, IPluginLoader pluginLoader, IModServiceGetterFactory modKernelFactory, IEnumerable <EditorModule> modules) { _modKernelFactory = modKernelFactory; _dialogService = dialogService; _modPatcher = modPatcher; _settingService = settingService; _editorModuleOrderSetting = _settingService.Get <EditorModuleOrderSetting>(); PluginItems = pluginLoader.LoadPlugins(out var loadFailures); if (loadFailures?.AnyFailures == true) { _dialogService.ShowMessageBox(MessageBoxArgs.Ok("Failed to load some plugins", loadFailures?.ToString())); } CommitRomCommand = new RelayCommand(CommitRom); RegisterModules(modules); }
public CommitModCommand(ICurrentModService currentModService, IModPatchingService modPatcher) { _currentModService = currentModService; _modPatcher = modPatcher; }