Ejemplo n.º 1
0
        public XamlErrorTagger(
            ITableManagerProvider tableManagerProvider,
            ITextBuffer buffer,
            ITextStructureNavigator navigator,
            PreviewerProcess process)
        {
            ThreadHelper.ThrowIfNotOnUIThread();

            _buffer                = buffer;
            _navigator             = navigator;
            _process               = process;
            _process.ErrorChanged += HandleErrorChanged;
            _error = process.Error;

            // Get the document path and containing project name.
            var document = GetDocument(buffer);

            _path        = document?.FilePath;
            _projectName = GetProject(_path)?.Name;

            // Register ourselves with the error list.
            var tableManager = tableManagerProvider.GetTableManager(StandardTables.ErrorsTable);

            tableManager.AddSource(this,
                                   StandardTableColumnDefinitions.Column,
                                   StandardTableColumnDefinitions.DocumentName,
                                   StandardTableColumnDefinitions.ErrorSeverity,
                                   StandardTableColumnDefinitions.Line,
                                   StandardTableColumnDefinitions.Text);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="AvaloniaDesigner"/> class.
        /// </summary>
        public AvaloniaDesigner()
        {
            InitializeComponent();

            _throttle                = new Throttle <string>(TimeSpan.FromMilliseconds(300), UpdateXaml);
            Process                  = new PreviewerProcess();
            Process.ErrorChanged    += ErrorChanged;
            Process.FrameReceived   += FrameReceived;
            Process.ProcessExited   += ProcessExited;
            previewer.Process        = Process;
            pausedMessage.Visibility = Visibility.Collapsed;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="AvaloniaDesigner"/> class.
        /// </summary>
        public AvaloniaDesigner()
        {
            InitializeComponent();

            _throttle                = new Throttle <string>(TimeSpan.FromMilliseconds(300), UpdateXaml);
            Process                  = new PreviewerProcess();
            Process.ErrorChanged    += ErrorChanged;
            Process.FrameReceived   += FrameReceived;
            Process.ProcessExited   += ProcessExited;
            previewer.Process        = Process;
            pausedMessage.Visibility = Visibility.Collapsed;
            UpdateLayoutForView();

            Loaded += (s, e) =>
            {
                StartStopProcessAsync().FireAndForget();
            };
        }