예제 #1
0
 private void OnFormClosed(object sender, FormClosedEventArgs e)
 {
     if (_textBoxListener != null)
     {
         _textBoxListener.Dispose();
         _textBoxListener = null;
     }
 }
예제 #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, this.Icon);
            Trace.Listeners.Add(_textBoxListener);
        }