protected override void Dispose(bool disposing) { if (disposing) { if (!disposed) { disposed = true; Document.TextContentChanged -= DocumentTextContentChanged; Document.DocumentChanged -= AdjustScrollBarsOnDocumentChange; Document.UpdateCommited -= DocumentUpdateCommitted; motherTextEditorControl = null; if (vScrollBar != null) { vScrollBar.Dispose(); vScrollBar = null; } if (hScrollBar != null) { hScrollBar.Dispose(); hScrollBar = null; } if (hRuler != null) { hRuler.Dispose(); hRuler = null; } } } base.Dispose(disposing); }
protected override void Dispose(bool disposing) { if (disposing) { if (!disposed) { disposed = true; Document.DocumentChanged -= new DocumentEventHandler(AdjustScrollBars); motherTextEditorControl = null; if (vScrollBar != null) { vScrollBar.Dispose(); vScrollBar = null; } if (hScrollBar != null) { hScrollBar.Dispose(); hScrollBar = null; } if (hRuler != null) { hRuler.Dispose(); hRuler = null; } } } base.Dispose(disposing); }
protected override void Dispose(bool disposing) { if (disposing) { if (!_disposed) { _disposed = true; Document.TextContentChanged -= DocumentTextContentChanged; Document.DocumentChanged -= AdjustScrollBarsOnDocumentChange; Document.UpdateCommited -= DocumentUpdateCommitted; _motherTextEditorControl = null; if (VScrollBar != null) { VScrollBar.Dispose(); VScrollBar = null; } if (HScrollBar != null) { HScrollBar.Dispose(); HScrollBar = null; } if (_hRuler != null) { _hRuler.Dispose(); _hRuler = null; } } } base.Dispose(disposing); }
public void OptionsChanged() { textArea.OptionsChanged(); if (textArea.TextEditorProperties.ShowHorizontalRuler) { if (hRuler == null) { hRuler = new HRuler(textArea); Controls.Add(hRuler); ResizeTextArea(); } } else { if (hRuler != null) { Controls.Remove(hRuler); hRuler.Dispose(); hRuler = null; ResizeTextArea(); } } AdjustScrollBars(null, null); }