/// <summary>
 /// Initializes a new instance of the <see cref="ModHolderControlViewModel" /> class.
 /// </summary>
 /// <param name="promptNotificationsService">The prompt notifications service.</param>
 /// <param name="modListInstallRefreshRequestHandler">The mod list install refresh request handler.</param>
 /// <param name="modDefinitionInvalidReplaceHandler">The mod definition invalid replace handler.</param>
 /// <param name="idGenerator">The identifier generator.</param>
 /// <param name="shutDownState">State of the shut down.</param>
 /// <param name="modService">The mod service.</param>
 /// <param name="modPatchCollectionService">The mod patch collection service.</param>
 /// <param name="gameService">The game service.</param>
 /// <param name="notificationAction">The notification action.</param>
 /// <param name="appAction">The application action.</param>
 /// <param name="localizationManager">The localization manager.</param>
 /// <param name="installedModsControlViewModel">The installed mods control view model.</param>
 /// <param name="collectionModsControlViewModel">The collection mods control view model.</param>
 /// <param name="modDefinitionAnalyzeHandler">The mod definition analyze handler.</param>
 /// <param name="modDefinitionLoadHandler">The mod definition load handler.</param>
 /// <param name="modDefinitionPatchLoadHandler">The mod definition patch load handler.</param>
 /// <param name="gameDirectoryChangedHandler">The game directory changed handler.</param>
 /// <param name="logger">The logger.</param>
 public ModHolderControlViewModel(IPromptNotificationsService promptNotificationsService, ModListInstallRefreshRequestHandler modListInstallRefreshRequestHandler, ModDefinitionInvalidReplaceHandler modDefinitionInvalidReplaceHandler,
                                  IIDGenerator idGenerator, IShutDownState shutDownState, IModService modService, IModPatchCollectionService modPatchCollectionService, IGameService gameService,
                                  INotificationAction notificationAction, IAppAction appAction, ILocalizationManager localizationManager,
                                  InstalledModsControlViewModel installedModsControlViewModel, CollectionModsControlViewModel collectionModsControlViewModel,
                                  ModDefinitionAnalyzeHandler modDefinitionAnalyzeHandler, ModDefinitionLoadHandler modDefinitionLoadHandler, ModDefinitionPatchLoadHandler modDefinitionPatchLoadHandler,
                                  GameUserDirectoryChangedHandler gameDirectoryChangedHandler, ILogger logger)
 {
     // It was supposed to be a small project and I ended up with this mess I seriously need to introduce facades sometime
     this.promptNotificationsService         = promptNotificationsService;
     this.modDefinitionInvalidReplaceHandler = modDefinitionInvalidReplaceHandler;
     this.idGenerator               = idGenerator;
     this.shutDownState             = shutDownState;
     this.modService                = modService;
     this.modPatchCollectionService = modPatchCollectionService;
     this.notificationAction        = notificationAction;
     this.localizationManager       = localizationManager;
     this.gameService               = gameService;
     this.logger    = logger;
     this.appAction = appAction;
     this.modDefinitionLoadHandler            = modDefinitionLoadHandler;
     this.modDefinitionPatchLoadHandler       = modDefinitionPatchLoadHandler;
     this.modDefinitionAnalyzeHandler         = modDefinitionAnalyzeHandler;
     this.gameDirectoryChangedHandler         = gameDirectoryChangedHandler;
     this.modListInstallRefreshRequestHandler = modListInstallRefreshRequestHandler;
     InstalledMods  = installedModsControlViewModel;
     CollectionMods = collectionModsControlViewModel;
     if (StaticResources.CommandLineOptions != null && StaticResources.CommandLineOptions.EnableResumeGameButton)
     {
         forceEnableResumeButton = true;
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ModCompareSelectorControlViewModel" /> class.
 /// </summary>
 /// <param name="hotkeyPressedHandler">The hotkey pressed handler.</param>
 /// <param name="appAction">The application action.</param>
 /// <param name="modPatchCollectionService">The mod patch collection service.</param>
 public ModCompareSelectorControlViewModel(ConflictSolverViewHotkeyPressedHandler hotkeyPressedHandler,
                                           IAppAction appAction, IModPatchCollectionService modPatchCollectionService)
 {
     this.modPatchCollectionService = modPatchCollectionService;
     this.appAction            = appAction;
     this.hotkeyPressedHandler = hotkeyPressedHandler;
 }
Exemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ConflictSolverCustomConflictsControlViewModel" /> class.
 /// </summary>
 /// <param name="notificationAction">The notification action.</param>
 /// <param name="localizationManager">The localization manager.</param>
 /// <param name="modPatchCollectionService">The mod patch collection service.</param>
 public ConflictSolverCustomConflictsControlViewModel(INotificationAction notificationAction,
                                                      ILocalizationManager localizationManager, IModPatchCollectionService modPatchCollectionService)
 {
     this.modPatchCollectionService = modPatchCollectionService;
     this.localizationManager       = localizationManager;
     this.notificationAction        = notificationAction;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ConflictSolverResetConflictsControlViewModel" /> class.
 /// </summary>
 /// <param name="localizationManager">The localization manager.</param>
 /// <param name="idGenerator">The identifier generator.</param>
 /// <param name="modPatchCollectionService">The mod patch collection service.</param>
 public ConflictSolverResetConflictsControlViewModel(ILocalizationManager localizationManager, IIDGenerator idGenerator, IModPatchCollectionService modPatchCollectionService)
 {
     this.modPatchCollectionService = modPatchCollectionService;
     this.idGenerator         = idGenerator;
     this.localizationManager = localizationManager;
     InitModes();
     SelectedHierarchicalDefinitions = new AvaloniaList <IHierarchicalDefinitions>();
 }
 /// <summary>
 /// Converts the specified value.
 /// </summary>
 /// <param name="value">The value.</param>
 /// <param name="targetType">Type of the target.</param>
 /// <param name="parameter">The parameter.</param>
 /// <param name="culture">The culture.</param>
 /// <returns>System.Object.</returns>
 public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
 {
     if (value != null && value is IDefinition definition)
     {
         if (service == null)
         {
             service = DIResolver.Get <IModPatchCollectionService>();
         }
         if (!service.IsPatchMod(definition.ModName))
         {
             return(definition.File);
         }
     }
     return(null);
 }
Exemplo n.º 6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ModifyCollectionControlViewModel" /> class.
 /// </summary>
 /// <param name="modMergeFreeSpaceCheckHandler">The mod merge free space check handler.</param>
 /// <param name="modService">The mod service.</param>
 /// <param name="idGenerator">The identifier generator.</param>
 /// <param name="modCompressMergeProgressHandler">The mod compress merge progress handler.</param>
 /// <param name="modFileMergeProgressHandler">The mod file merge progress handler.</param>
 /// <param name="shutDownState">State of the shut down.</param>
 /// <param name="modMergeService">The mod merge service.</param>
 /// <param name="modCollectionService">The mod collection service.</param>
 /// <param name="modPatchCollectionService">The mod patch collection service.</param>
 /// <param name="localizationManager">The localization manager.</param>
 /// <param name="notificationAction">The notification action.</param>
 public ModifyCollectionControlViewModel(ModMergeFreeSpaceCheckHandler modMergeFreeSpaceCheckHandler, IModService modService, IIDGenerator idGenerator,
                                         ModCompressMergeProgressHandler modCompressMergeProgressHandler, ModFileMergeProgressHandler modFileMergeProgressHandler, IShutDownState shutDownState,
                                         IModMergeService modMergeService, IModCollectionService modCollectionService, IModPatchCollectionService modPatchCollectionService,
                                         ILocalizationManager localizationManager, INotificationAction notificationAction)
 {
     this.modCollectionService        = modCollectionService;
     this.modPatchCollectionService   = modPatchCollectionService;
     this.localizationManager         = localizationManager;
     this.modMergeService             = modMergeService;
     this.shutDownState               = shutDownState;
     this.modFileMergeProgressHandler = modFileMergeProgressHandler;
     this.notificationAction          = notificationAction;
     this.idGenerator = idGenerator;
     this.modCompressMergeProgressHandler = modCompressMergeProgressHandler;
     this.modService = modService;
     this.modMergeFreeSpaceCheckHandler = modMergeFreeSpaceCheckHandler;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ModifyCollectionControlViewModel" /> class.
 /// </summary>
 /// <param name="modDefinitionAnalyzeHandler">The mod definition analyze handler.</param>
 /// <param name="modDefinitionLoadHandler">The mod definition load handler.</param>
 /// <param name="modDefinitionMergeProgressHandler">The mod merge progress handler.</param>
 /// <param name="modFileMergeProgressHandler">The mod file merge progress handler.</param>
 /// <param name="shutDownState">State of the shut down.</param>
 /// <param name="gameService">The game service.</param>
 /// <param name="modMergeService">The mod merge service.</param>
 /// <param name="modCollectionService">The mod collection service.</param>
 /// <param name="modPatchCollectionService">The mod patch collection service.</param>
 /// <param name="localizationManager">The localization manager.</param>
 /// <param name="notificationAction">The notification action.</param>
 public ModifyCollectionControlViewModel(ModDefinitionAnalyzeHandler modDefinitionAnalyzeHandler,
                                         ModDefinitionLoadHandler modDefinitionLoadHandler, ModDefinitionMergeProgressHandler modDefinitionMergeProgressHandler,
                                         ModFileMergeProgressHandler modFileMergeProgressHandler, IShutDownState shutDownState, IGameService gameService, IModMergeService modMergeService,
                                         IModCollectionService modCollectionService, IModPatchCollectionService modPatchCollectionService,
                                         ILocalizationManager localizationManager, INotificationAction notificationAction)
 {
     this.modCollectionService      = modCollectionService;
     this.modPatchCollectionService = modPatchCollectionService;
     this.localizationManager       = localizationManager;
     this.gameService                       = gameService;
     this.modMergeService                   = modMergeService;
     this.modDefinitionLoadHandler          = modDefinitionLoadHandler;
     this.modDefinitionAnalyzeHandler       = modDefinitionAnalyzeHandler;
     this.modDefinitionMergeProgressHandler = modDefinitionMergeProgressHandler;
     this.shutDownState                     = shutDownState;
     this.modFileMergeProgressHandler       = modFileMergeProgressHandler;
     this.notificationAction                = notificationAction;
 }
Exemplo n.º 8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ModHolderControlViewModel" /> class.
 /// </summary>
 /// <param name="shutDownState">State of the shut down.</param>
 /// <param name="modService">The mod service.</param>
 /// <param name="modPatchCollectionService">The mod patch collection service.</param>
 /// <param name="gameService">The game service.</param>
 /// <param name="notificationAction">The notification action.</param>
 /// <param name="appAction">The application action.</param>
 /// <param name="localizationManager">The localization manager.</param>
 /// <param name="installedModsControlViewModel">The installed mods control view model.</param>
 /// <param name="collectionModsControlViewModel">The collection mods control view model.</param>
 /// <param name="modDefinitionAnalyzeHandler">The mod definition analyze handler.</param>
 /// <param name="modDefinitionLoadHandler">The mod definition load handler.</param>
 /// <param name="modDefinitionPatchLoadHandler">The mod definition patch load handler.</param>
 /// <param name="gameDirectoryChangedHandler">The game directory changed handler.</param>
 /// <param name="logger">The logger.</param>
 public ModHolderControlViewModel(IShutDownState shutDownState, IModService modService, IModPatchCollectionService modPatchCollectionService, IGameService gameService,
                                  INotificationAction notificationAction, IAppAction appAction, ILocalizationManager localizationManager,
                                  InstalledModsControlViewModel installedModsControlViewModel, CollectionModsControlViewModel collectionModsControlViewModel,
                                  ModDefinitionAnalyzeHandler modDefinitionAnalyzeHandler, ModDefinitionLoadHandler modDefinitionLoadHandler, ModDefinitionPatchLoadHandler modDefinitionPatchLoadHandler,
                                  GameUserDirectoryChangedHandler gameDirectoryChangedHandler, ILogger logger)
 {
     this.shutDownState             = shutDownState;
     this.modService                = modService;
     this.modPatchCollectionService = modPatchCollectionService;
     this.notificationAction        = notificationAction;
     this.localizationManager       = localizationManager;
     this.gameService               = gameService;
     this.logger    = logger;
     this.appAction = appAction;
     this.modDefinitionLoadHandler      = modDefinitionLoadHandler;
     this.modDefinitionPatchLoadHandler = modDefinitionPatchLoadHandler;
     this.modDefinitionAnalyzeHandler   = modDefinitionAnalyzeHandler;
     this.gameDirectoryChangedHandler   = gameDirectoryChangedHandler;
     InstalledMods  = installedModsControlViewModel;
     CollectionMods = collectionModsControlViewModel;
 }
Exemplo n.º 9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MainConflictSolverControlViewModel" /> class.
 /// </summary>
 /// <param name="modPatchCollectionService">The mod patch collection service.</param>
 /// <param name="localizationManager">The localization manager.</param>
 /// <param name="mergeViewer">The merge viewer.</param>
 /// <param name="binaryMergeViewer">The binary merge viewer.</param>
 /// <param name="modCompareSelector">The mod compare selector.</param>
 /// <param name="ignoreConflictsRules">The ignore conflicts rules.</param>
 /// <param name="modFilter">The mod filter.</param>
 /// <param name="resetConflicts">The reset conflicts.</param>
 /// <param name="dbSearch">The database search.</param>
 /// <param name="customConflicts">The custom conflicts.</param>
 /// <param name="logger">The logger.</param>
 /// <param name="notificationAction">The notification action.</param>
 /// <param name="appAction">The application action.</param>
 public MainConflictSolverControlViewModel(IModPatchCollectionService modPatchCollectionService, ILocalizationManager localizationManager,
                                           MergeViewerControlViewModel mergeViewer, MergeViewerBinaryControlViewModel binaryMergeViewer,
                                           ModCompareSelectorControlViewModel modCompareSelector, ModConflictIgnoreControlViewModel ignoreConflictsRules,
                                           ConflictSolverModFilterControlViewModel modFilter, ConflictSolverResetConflictsControlViewModel resetConflicts,
                                           ConflictSolverDBSearchControlViewModel dbSearch, ConflictSolverCustomConflictsControlViewModel customConflicts,
                                           ILogger logger, INotificationAction notificationAction, IAppAction appAction)
 {
     this.modPatchCollectionService = modPatchCollectionService;
     this.localizationManager       = localizationManager;
     this.logger             = logger;
     this.notificationAction = notificationAction;
     this.appAction          = appAction;
     MergeViewer             = mergeViewer;
     ModCompareSelector      = modCompareSelector;
     BinaryMergeViewer       = binaryMergeViewer;
     IgnoreConflictsRules    = ignoreConflictsRules;
     ModFilter       = modFilter;
     ResetConflicts  = resetConflicts;
     DatabaseSearch  = dbSearch;
     CustomConflicts = customConflicts;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ConflictSolverResetConflictsControlViewModel" /> class.
 /// </summary>
 /// <param name="modPatchCollectionService">The mod patch collection service.</param>
 public ConflictSolverResetConflictsControlViewModel(IModPatchCollectionService modPatchCollectionService)
 {
     this.modPatchCollectionService = modPatchCollectionService;
     Modes = new List <Mode>()
     {
         new Mode()
         {
             Name  = Resolved,
             Value = ResolvedValue
         },
         new Mode()
         {
             Name  = Ignored,
             Value = IgnoredValue
         },
         new Mode()
         {
             Name  = Custom,
             Value = CustomValue
         }
     };
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="AddNewCollectionControlViewModel" /> class.
 /// </summary>
 /// <param name="hotkeyPressedHandler">The hotkey pressed handler.</param>
 /// <param name="modCollectionService">The mod collection service.</param>
 /// <param name="modPatchCollectionService">The mod patch collection service.</param>
 public AddNewCollectionControlViewModel(MainViewHotkeyPressedHandler hotkeyPressedHandler, IModCollectionService modCollectionService, IModPatchCollectionService modPatchCollectionService)
 {
     this.modCollectionService      = modCollectionService;
     this.modPatchCollectionService = modPatchCollectionService;
     this.hotkeyPressedHandler      = hotkeyPressedHandler;
 }
Exemplo n.º 12
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ModCompareSelectorControlViewModel" /> class.
 /// </summary>
 /// <param name="appAction">The application action.</param>
 /// <param name="modPatchCollectionService">The mod patch collection service.</param>
 public ModCompareSelectorControlViewModel(IAppAction appAction, IModPatchCollectionService modPatchCollectionService)
 {
     this.modPatchCollectionService = modPatchCollectionService;
     this.appAction = appAction;
 }
Exemplo n.º 13
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AddNewCollectionControlViewModel" /> class.
 /// </summary>
 /// <param name="modCollectionService">The mod collection service.</param>
 /// <param name="modPatchCollectionService">The mod patch collection service.</param>
 public AddNewCollectionControlViewModel(IModCollectionService modCollectionService, IModPatchCollectionService modPatchCollectionService)
 {
     this.modCollectionService      = modCollectionService;
     this.modPatchCollectionService = modPatchCollectionService;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ConflictSolverModFilterControlViewModel" /> class.
 /// </summary>
 /// <param name="modPatchCollectionService">The mod patch collection service.</param>
 public ConflictSolverModFilterControlViewModel(IModPatchCollectionService modPatchCollectionService)
 {
     this.modPatchCollectionService = modPatchCollectionService;
 }
Exemplo n.º 15
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ConflictSolverCustomConflictsControlViewModel" /> class.
 /// </summary>
 /// <param name="modPatchCollectionService">The mod patch collection service.</param>
 public ConflictSolverCustomConflictsControlViewModel(IModPatchCollectionService modPatchCollectionService)
 {
     this.modPatchCollectionService = modPatchCollectionService;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ModConflictIgnoreControlViewModel" /> class.
 /// </summary>
 /// <param name="modPatchCollectionService">The mod patch collection service.</param>
 public ModConflictIgnoreControlViewModel(IModPatchCollectionService modPatchCollectionService)
 {
     this.modPatchCollectionService = modPatchCollectionService;
 }