Esempio n. 1
0
 private void OnFormClosed(object sender, FormClosedEventArgs e)
 {
     if (_textBoxListener != null)
     {
         _textBoxListener.Dispose();
         _textBoxListener = null;
     }
 }
Esempio n. 2
0
        public DebugDockPanel()
        {
            InitializeComponent();

            this.AutoScaleMode = AutoScaleMode.Dpi;
            this.DockAreas     = DockAreas.DockBottom | DockAreas.Float;

            this.CloseButton        = false;
            this.CloseButtonVisible = false;

            debugTextBox.BackColor = Color.White;
            debugTextBox.Font      = new Font(debugTextBox.Font.FontFamily, debugTextBox.Font.Size + 4,
                                              FontStyle.Regular, debugTextBox.Font.Unit);

            _textBoxListener = new TextBoxTraceListener(debugTextBox);
            Trace.Listeners.Add(_textBoxListener);
        }