Exemple #1
0
        private void OnPageLoaded(object sender, RoutedEventArgs e)
        {
            this.Startup();

            if (_searchPanel == null)
            {
                TextEditorOptions options = textEditor.Options;
                if (options != null)
                {
                    //options.AllowScrollBelowDocument = true;
                    options.EnableHyperlinks      = true;
                    options.EnableEmailHyperlinks = true;
                    options.EnableVirtualSpace    = false;
                    options.HighlightCurrentLine  = true;
                    //options.ShowSpaces               = true;
                    //options.ShowTabs                 = true;
                    //options.ShowEndOfLine            = true;
                }

                textEditor.IsReadOnly      = true;
                textEditor.WordWrap        = false;
                textEditor.ShowLineNumbers = true;

                _searchPanel = SearchPanel.Install(textEditor);
            }

            if (_listener == null)
            {
                _listener = new TextBoxTraceListener(textEditor);
                Trace.Listeners.Add(_listener);
            }
        }
Exemple #2
0
        public void Startup()
        {
            if (_listener == null)
            {
                _listener = new TextBoxTraceListener(textEditor);
                Trace.Listeners.Add(_listener);

                _isTraceStarted = true;
            }
        }
Exemple #3
0
        public void Shutdown()
        {
            if (_listener != null)
            {
                Trace.Listeners.Remove(_listener);
                _listener.Dispose();
                _listener = null;
            }

            _isTraceStarted = false;
        }