예제 #1
0
        private void _debugger_SourceLoaded(object sender, SourceLoadedEventArgs e)
        {
            // First see whether we have an editor that matches this script.

            foreach (var editor in _dockPanel.Documents.OfType <EditorControl>())
            {
                if (editor.FileName == e.Source.Source)
                {
                    editor.Script = new EditorScript(_debugger.Engine, e.Source);
                    return;
                }
            }

            // Otherwise, add an empty registration for later on.

            _debugControls.Add(e.Source, null);
        }
예제 #2
0
        private void sourceLoaded(object sender, SourceLoadedEventArgs args)
        {
            try
            {
                var source = args.Source;
                if (source is FileSystemSource || source is DirectorySource)
                {
                    sourceController.LoadDirectories(args.Source);
                }

                if (source is YouTubeVideoSource || (source.Path != null && source.Path.StartsWith("http://www.gutenberg.org"))) // || (source.Path != null && !source.Path.EndsWith(".mp3") && !source.Path.EndsWith(".wav")))
                {
                    System.Diagnostics.Process.Start(source.Path);
                }

                trackController.Load(source, this);
            }
            catch (Exception ex)
            {
                logger.Error("MainWindow.SourceLoaded", ex);
            }
        }
예제 #3
0
 protected virtual void OnSourceLoaded(SourceLoadedEventArgs e)
 {
     SourceLoaded?.Invoke(this, e);
 }