コード例 #1
0
 public PluginToolsUnloadPluginCommandContainer(ICommandManager commandManager,
                                                IServiceLocator serviceLocator)
     : base(Commands.PluginTools.UnloadPlugin, commandManager, serviceLocator)
 {
     _remoteVstService = ServiceLocator.ResolveType <RemoteVstService>();
     _globalFrontendService.SelectedPlugins.CollectionChanged += OnSelectedPluginsListChanged;
 }
コード例 #2
0
        public VstPluginSettingsViewModel(Plugin plugin, IVstService vstService, IOpenFileService openFileService,
                                          ISelectDirectoryService selectDirectoryService, ILicenseService licenseService,
                                          IAdvancedMessageService messageService,
                                          ICommandManager commandManager,
                                          RemoteVstService remoteVstService,
                                          INativeInstrumentsResourceGeneratorService
                                          resourceGeneratorService)
        {
            Argument.IsNotNull(() => vstService);
            Argument.IsNotNull(() => openFileService);
            Argument.IsNotNull(() => selectDirectoryService);
            Argument.IsNotNull(() => licenseService);
            Argument.IsNotNull(() => resourceGeneratorService);
            Argument.IsNotNull(() => commandManager);

            Plugin = plugin;

            _openFileService          = openFileService;
            _commandManager           = commandManager;
            _selectDirectoryService   = selectDirectoryService;
            _licenseService           = licenseService;
            _vstService               = vstService;
            _resourceGeneratorService = resourceGeneratorService;
            _messageService           = messageService;
            _remoteVstService         = remoteVstService;

            OpenNKSFile               = new TaskCommand(OnOpenNKSFileExecute);
            ClearMappings             = new TaskCommand(OnClearMappingsExecute);
            AddAdditionalPresetFiles  = new TaskCommand(OnAddAdditionalPresetFilesExecute);
            AddAdditionalPresetFolder = new TaskCommand(OnAddAdditionalPresetFolderExecute);
            RemoveAdditionalBankFiles = new Command <object>(OnRemoveAdditionalBankFilesExecute);
            RemoveCategory            = new Command <object>(OnRemoveCategoryExecute);
            AddCategory               = new Command(OnAddCategoryExecute);

            ReplaceVBLogo    = new TaskCommand(OnReplaceVBLogoExecute);
            ReplaceVBArtwork = new TaskCommand(OnReplaceVBArtworkExecute);

            ReplaceMSTLogo    = new TaskCommand(OnReplaceMSTLogoExecute);
            ReplaceMSTArtwork = new TaskCommand(OnReplaceMSTArtworkExecute);
            ReplaceMSTPlugin  = new TaskCommand(OnReplaceMSTPluginExecute);

            ReplaceOSOLogo = new TaskCommand(OnReplaceOSOLogoExecute);

            SubmitResource             = new TaskCommand(OnSubmitResourceExecute);
            QueryOnlineResources       = new TaskCommand(OnQueryOnlineResourcesExecute);
            LoadSelectedOnlineResource = new TaskCommand(OnLoadSelectedOnlineResourceExecute);

            GenerateResources = new TaskCommand(OnGenerateResourcesExecute);


            Title = "Settings for " + Plugin.PluginName;


            GenerateControllerMappingModels();
            PluginLocations = (from pluginLocation in Plugin.PluginLocations
                               where pluginLocation.IsPresent
                               select pluginLocation).ToList();
        }
        public PluginToolsShowPluginChunkCommandContainer(ICommandManager commandManager,
                                                          IServiceLocator serviceLocator)
            : base(Commands.PluginTools.ShowPluginChunk, commandManager, serviceLocator)
        {
            _uiVisualizerService = ServiceLocator.ResolveType <IUIVisualizerService>();
            _viewModelFactory    = ServiceLocator.ResolveType <IViewModelFactory>();
            _remoteVstService    = ServiceLocator.ResolveType <RemoteVstService>();

            _globalFrontendService.SelectedPlugins.CollectionChanged += OnSelectedPluginsListChanged;
        }
コード例 #4
0
 public PresetExportDoExportCommandContainer(ICommandManager commandManager,
                                             IServiceLocator serviceLocator)
     : base(Commands.PresetExport.DoExport, commandManager, serviceLocator)
 {
     _presetDataPersisterService = ServiceLocator.ResolveType <PresetDataPersisterService>();
     _applicationService         = ServiceLocator.ResolveType <IApplicationService>();
     _remoteVstService           = ServiceLocator.ResolveType <RemoteVstService>();
     _dataPersisterService       = ServiceLocator.ResolveType <DataPersisterService>();
     _globalService = ServiceLocator.ResolveType <GlobalService>();
 }
コード例 #5
0
        public VstPluginPresetsViewModel(Plugin plugin, GlobalService globalService,
                                         IUIVisualizerService visualizerService,
                                         DataPersisterService dataPersisterService, IViewModelFactory viewModelFactory,
                                         IAdvancedMessageService advancedMessageService, RemoteVstService remoteVstService,
                                         GlobalFrontendService globalFrontendService,
                                         PresetDataPersisterService presetDataPersisterService)
        {
            _messageService        = advancedMessageService;
            _visualizerService     = visualizerService;
            _viewModelFactory      = viewModelFactory;
            _dataPersisterService  = dataPersisterService;
            _remoteVstService      = remoteVstService;
            _globalService         = globalService;
            _globalFrontendService = globalFrontendService;
            _presetDataPersister   = presetDataPersisterService;

            Plugin = plugin;

            PresetsView = (ListCollectionView)CollectionViewSource.GetDefaultView(Plugin.Presets);
            PresetsView.IsLiveSorting   = false;
            PresetsView.IsLiveFiltering = false;

            Title = $"{plugin.PluginName}: Presets";

            GlobalCharacteristicCollection =
                (ListCollectionView)CollectionViewSource.GetDefaultView(globalService.GlobalCharacteristics);
            GlobalCharacteristicCollection.SortDescriptions.Add(
                new SortDescription(nameof(Characteristic.EffectiveCharacteristicName), ListSortDirection.Ascending));
            GlobalCharacteristicCollection.IsLiveSorting   = false;
            GlobalCharacteristicCollection.IsLiveFiltering = false;

            GlobalTypeCollection = (ListCollectionView)CollectionViewSource.GetDefaultView(globalService.GlobalTypes);
            GlobalTypeCollection.SortDescriptions.Add(new SortDescription(nameof(Type.EffectiveFullTypeName),
                                                                          ListSortDirection.Ascending));
            GlobalTypeCollection.IsLiveSorting   = false;
            GlobalTypeCollection.IsLiveFiltering = false;

            SelectedPresets.CollectionChanged += SelectedPresetsOnCollectionChanged;
            PreviewNotePlayers = globalService.PreviewNotePlayers;
            RenameBankCommand  = new TaskCommand(OnRenameBankCommandExecute, RenameBankCommandCanExecute);
            AddBankCommand     = new TaskCommand(OnAddBankCommandExecute, AddBankCommandCanExecute);
            DeleteBankCommand  = new TaskCommand(OnDeleteBankCommandExecute, DeleteBankCommandCanExecute);

            LoadPluginCommand = new TaskCommand(OnLoadPluginCommandExecute, LoadPluginCommandCanExecute);
            LoadPresetCommand = new TaskCommand(OnLoadPresetCommandExecute, LoadPresetCommandCanExecute);
            ShowEditorCommand = new TaskCommand(OnShowEditorCommandExecute, ShowEditorCommandCanExecute);

            AddToExportListCommand = new TaskCommand(OnAddToExportListCommandExecute, AddToExportListCommandCanExecute);


            Revert = new Command <string>(OnRevertExecute);
        }
コード例 #6
0
        protected AbstractScanPluginsCommandContainer(string command, ICommandManager commandManager,
                                                      IServiceLocator serviceLocator)
            : base(command, commandManager, serviceLocator)
        {
            _messageService             = ServiceLocator.ResolveType <IAdvancedMessageService>();
            _applicationService         = ServiceLocator.ResolveType <IApplicationService>();
            _dispatcherService          = ServiceLocator.ResolveType <IDispatcherService>();
            _commandManager             = commandManager;
            _dataPersisterService       = ServiceLocator.ResolveType <DataPersisterService>();
            _presetDataPersisterService = ServiceLocator.ResolveType <PresetDataPersisterService>();
            ;
            _resourceGeneratorService =
                ServiceLocator.ResolveType <INativeInstrumentsResourceGeneratorService>();
            _pluginService    = ServiceLocator.ResolveType <PluginService>();
            GlobalService     = ServiceLocator.ResolveType <GlobalService>();
            _remoteVstService = ServiceLocator.ResolveType <RemoteVstService>();

            GlobalService.Plugins.CollectionChanged += OnPluginsListChanged;
        }