Пример #1
0
        public void Init(Func <MssParameters> getMssParameters, PluginPrograms pluginPrograms)
        {
            this.getMssParameters = getMssParameters;
            this.pluginPrograms   = pluginPrograms;

            pluginPrograms.ProgramActivated += new ProgramActivatedEventHandler(OnProgramActivated);
            AttachHandlersToMssParameterEvents();
            InitializeVstParams();
        }
Пример #2
0
        public void Init(Func<MssParameters> getMssParameters, PluginPrograms pluginPrograms)
        {
            this.getMssParameters = getMssParameters;
            this.pluginPrograms = pluginPrograms;

            pluginPrograms.ProgramActivated += new ProgramActivatedEventHandler(OnProgramActivated);
            AttachHandlersToMssParameterEvents();
            InitializeVstParams();
        }
Пример #3
0
        /// <summary>
        /// Implement this when you implement plugin programs or presets.
        /// </summary>
        /// <param name="instance">A previous instance returned by this method.
        /// When non-null, return a thread-safe version (or wrapper) for the object.</param>
        /// <returns>Returns null when not supported by the plugin.</returns>
        protected override IVstPluginPrograms CreatePrograms(IVstPluginPrograms instance)
        {
            if (instance == null)
            {
                PluginPrograms pluginPrograms = new PluginPrograms();
                pluginPrograms.Init(() => this.MssHub.MssProgramMgr);
                return(pluginPrograms);
            }

            return(base.CreatePrograms(instance));
        }
Пример #4
0
        /// <summary>
        /// Initialized the class
        /// </summary>
        /// <param name="getSerializableRootFromPlugin">
        /// Gets the object that will be serialized and deserialized
        /// </param>
        /// <param name="getMainThreadHandel">
        /// Gets a control that was created on the main thread or null if one doesn't exist yet.
        /// </param>
        public void Init(Func <SerializableRootType> getSerializableRootFromPlugin,
                         PluginPrograms pluginPrograms,
                         Func <MssProgramMgr> getMssProgramMgr,
                         Func <Control> getMainThreadHandel)
        {
            this.getSerializableRootFromPlugin = getSerializableRootFromPlugin;
            this.pluginPrograms = pluginPrograms;

            this.getMssProgramMgr    = getMssProgramMgr;
            this.getMainThreadHandel = getMainThreadHandel;
            AttachHandlersToMssProgramMgrEvents();
        }
Пример #5
0
        /// <summary>
        /// Implement this when you implement plugin programs or presets.
        /// </summary>
        /// <param name="instance">A previous instance returned by this method. 
        /// When non-null, return a thread-safe version (or wrapper) for the object.</param>
        /// <returns>Returns null when not supported by the plugin.</returns>
        protected override IVstPluginPrograms CreatePrograms(IVstPluginPrograms instance)
        {
            if (instance == null)
            {
                PluginPrograms pluginPrograms = new PluginPrograms();
                pluginPrograms.Init(() => this.MssHub.MssProgramMgr);
                return pluginPrograms;
            }

            return base.CreatePrograms(instance);
        }