private async Task InitializeAsync() { BundleManager ??= await Task.Run(() => Tw3Controller.LoadBundleManager()).ConfigureAwait(false); W3StringManager ??= await Task.Run(() => Tw3Controller.LoadStringsManager()).ConfigureAwait(false); TextureManager ??= await Task.Run(() => Tw3Controller.LoadTextureManager()).ConfigureAwait(false); CollisionManager ??= await Task.Run(() => Tw3Controller.LoadCollisionManager()).ConfigureAwait(false); SoundManager ??= await Task.Run(() => Tw3Controller.LoadSoundManager()).ConfigureAwait(false); SpeechManager ??= await Task.Run(() => Tw3Controller.LoadSpeechManager()).ConfigureAwait(false); // Hash all filepaths _logger.LogString("Starting additional tasks...", Logtype.Important); var relativepaths = ModFiles .Select(_ => _.Substring(_.IndexOf(Path.DirectorySeparatorChar) + 1)) .ToList(); Cr2wResourceManager.Get().RegisterAndWriteCustomPaths(relativepaths); // register all custom classes CR2WManager.Init(FileDirectory, MainController.Get().Logger); _logger.LogString("Finished additional tasks...", Logtype.Success); ServiceLocator.Default.ResolveType <INotificationService>().ShowNotification("WolvenKit", $"Project {Name} has finished loading."); }
public ImportViewModel( IProjectManager projectManager, ILoggerService loggerService, IMessageService messageService, Tw3Controller tw3Controller, ISettingsManager settingsManager ) : base(ToolTitle) { Argument.IsNotNull(() => projectManager); Argument.IsNotNull(() => messageService); Argument.IsNotNull(() => loggerService); Argument.IsNotNull(() => tw3Controller); Argument.IsNotNull(() => settingsManager); _projectManager = projectManager; _loggerService = loggerService; _messageService = messageService; _tw3Controller = tw3Controller; _settingsManager = settingsManager; SetupCommands(); SetupToolDefaults(); Importableobjects = new BindingList <ImportableFile>(); UseLocalResourcesCommand.SafeExecute(); xbmdict = new Dictionary <string, XBMDumpRecord>(); RegisterXBMDump(); }
public GameControllerFactory( IProjectManager projectManager, Tw3Controller tw3Controller, Cp77Controller cp77Controller, MockGameController mockGameController ) { _tw3Controller = tw3Controller; _cp77Controller = cp77Controller; _projectManager = projectManager; _mockGameController = mockGameController; }
public ApplicationNewProjectCommandContainer( ICommandManager commandManager, IProjectManager projectManager, ISaveFileService saveFileService, INotificationService notificationService, IUIVisualizerService uIVisualizerService, ILoggerService loggerService, IServiceLocator serviceLocator, Tw3Controller tw3Controller, Cp77Controller cp77Controller ) : base(AppCommands.Application.NewProject, commandManager, projectManager, notificationService, loggerService) { _loggerService = loggerService; _saveFileService = saveFileService; _tw3Controller = tw3Controller; _cp77Controller = cp77Controller; _uIVisualizerService = uIVisualizerService; _serviceLocator = serviceLocator; }
public ModkitViewModel( IProjectManager projectManager, ILoggerService loggerService, Tw3Controller tw3Controller ) : base(ToolTitle) { _projectManager = projectManager; Logger = loggerService; _tw3Controller = tw3Controller; RunCommand = new Functionality.Commands.RelayCommand(Run, CanRun); var x = typeof(Common.Wcc.Wcc_lite).GetNestedTypes().ToList();//.Cast<WCC_Command>().ToList(); foreach (var item in x) { var cmd = (Common.Wcc.WCC_Command)Activator.CreateInstance(item); Commands.Add(cmd); } Commands = Commands.OrderBy(_ => _.Name).ToList(); }
public ApplicationOpenProjectCommandContainer( ICommandManager commandManager, IProjectManager projectManager, IOpenFileService openFileService, IPleaseWaitService pleaseWaitService, INotificationService notificationService, IRecentlyUsedItemsService recentlyUsedItemsService, ILoggerService loggerService, Tw3Controller tw3Controller, Cp77Controller cp77Controller ) : base(AppCommands.Application.OpenProject, commandManager, projectManager, notificationService, loggerService) { Argument.IsNotNull(() => openFileService); Argument.IsNotNull(() => pleaseWaitService); Argument.IsNotNull(() => recentlyUsedItemsService); _pleaseWaitService = pleaseWaitService; _openFileService = openFileService; _recentlyUsedItemsService = recentlyUsedItemsService; _tw3Controller = tw3Controller; _cp77Controller = cp77Controller; }