SphereStudio.Plugins.SoundPicker.WatchProject C# (CSharp) Method

WatchProject() public method

Used by filesystem watcher to attempt to automatically add new additions to the sound list.
public WatchProject ( IProject game ) : void
game IProject
return void
        public void WatchProject(IProject game)
        {
            if (game != null && game.RootPath != null)
            {
                _fileWatcher.Path = game.RootPath;
                _fileWatcher.EnableRaisingEvents = true;
            }
            else
            {
                _fileWatcher.EnableRaisingEvents = false;
            }
            Refresh();
        }

Usage Example

Exemplo n.º 1
0
        public void Initialize(ISettings conf)
        {
            _soundPicker = new SoundPicker(this);
            _soundPicker.WatchProject(PluginManager.Core.Project);
            _soundPicker.Refresh();

            PluginManager.Register(this, _soundPicker, "Sound Test");

            PluginManager.Core.LoadProject += IDE_LoadProject;
            PluginManager.Core.UnloadProject += IDE_UnloadProject;
            PluginManager.Core.TestGame += IDE_TestGame;
        }