Exemple #1
0
        public SoundPicker(IPluginMain plugin)
        {
            InitializeComponent();

            FileExtensions = new[]
            {
                "mp3", "ogg", "flac",  // compressed audio formats
                "mod", "it", "s3d",    // tracker formats
                "wav"                  // uncompressed/PCM formats
            };

            _playIcons.ColorDepth = ColorDepth.Depth32Bit;
            _playIcons.Images.Add("play", Properties.Resources.play_tool);
            _playIcons.Images.Add("pause", Properties.Resources.pause_tool);
            _playIcons.Images.Add("stop", Properties.Resources.stop_tool);
            _listIcons.ColorDepth = ColorDepth.Depth32Bit;
            _listIcons.Images.Add(Properties.Resources.Icon);

            _fileWatcher = new DeferredFileSystemWatcher { SynchronizingObject = this, Delay = 1000 };
            _fileWatcher.Changed += fileWatcher_Changed;
            _fileWatcher.IncludeSubdirectories = true;
            _fileWatcher.EnableRaisingEvents = false;
            WatchProject(PluginManager.Core.Project);
            trackList.SmallImageList = _listIcons;
            _trackBackColor = new SolidBrush(Color.FromArgb(125, _labelColor));
            _trackForeColor = new SolidBrush(_labelColor);
        }
        public AudioPlayerPane(IPluginMain plugin)
        {
            InitializeComponent();
            StyleManager.AutoStyle(this);

            FileExtensions = new[]
            {
                "mp3", "ogg", "flac",  // compressed audio formats
                "mod", "it", "s3d",    // tracker formats
                "wav"                  // uncompressed/PCM formats
            };

            _playIcons.ColorDepth = ColorDepth.Depth32Bit;
            _playIcons.Images.Add("play", Properties.Resources.play_tool);
            _playIcons.Images.Add("pause", Properties.Resources.pause_tool);
            _playIcons.Images.Add("stop", Properties.Resources.stop_tool);
            _listIcons.ColorDepth = ColorDepth.Depth32Bit;
            _listIcons.Images.Add(Properties.Resources.Icon);

            _fileWatcher = new DeferredFileSystemWatcher {
                SynchronizingObject = this, Delay = 1000
            };
            _fileWatcher.Changed += fileWatcher_Changed;
            _fileWatcher.IncludeSubdirectories = true;
            _fileWatcher.EnableRaisingEvents   = false;
            WatchProject(PluginManager.Core.Project);
            trackList.SmallImageList = _listIcons;
            _trackBackColor          = new SolidBrush(Color.FromArgb(125, _labelColor));
            _trackForeColor          = new SolidBrush(_labelColor);
        }
 /// <summary>
 /// Registers a plugin. Plugins add new functionality to the IDE.
 /// </summary>
 /// <param name="main">The plugin module doing the registering.</param>
 /// <param name="plugin">The IPlugin to register.</param>
 /// <param name="name">The friendly name of the plugin, used in the UI.</param>
 public static void Register(IPluginMain main, IPlugin plugin, string name)
 {
     if (name.Contains('|'))
     {
         throw new ArgumentException("Registered name of plugin cannot contain pipe characters.");
     }
     m_plugins.Add(new PluginEntry(main, plugin, name));
 }
        private static void LoadRTM(string name)
        {
            try
            {
                IPluginMain main = CreateObject <IPluginMain>(name, Assembly.LoadFile(name).GetName().Name + ".PluginMain");

                main.Startup();

                _pluginmains.Add(main);
            }
            catch (Exception e)
            {
                Environment.ReportError(e, AccessManager.AccessKey);
            }
        }
Exemple #5
0
 public PluginShim(IPluginMain main, string handle)
 {
     Handle = handle;
     Main = main;
 }
 /// <summary>
 /// Unregisters all plugins registered by a plugin module.
 /// </summary>
 /// <param name="main">The plugin module whose plugins are being unregistered.</param>
 public static void UnregisterAll(IPluginMain main)
 {
     m_plugins.RemoveAll(x => x.PluginMain == main);
 }
 public PluginEntry(IPluginMain main, IPlugin plugin, string name)
 {
     PluginMain = main;
     Plugin     = plugin;
     Name       = name;
 }
Exemple #8
0
 public PluginShim(IPluginMain main, string handle)
 {
     Handle = handle;
     Main   = main;
 }