public void OptionsChanged() { this.textArea.OptionsChanged(); if (this.textArea.TextEditorProperties.ShowHorizontalRuler) { if (this.hRuler == null) { this.hRuler = new HRuler(this.textArea); base.Controls.Add(this.hRuler); this.ResizeTextArea(); } } else { if (this.hRuler != null) { base.Controls.Remove(this.hRuler); this.hRuler.Dispose(); this.hRuler = null; this.ResizeTextArea(); } } this.AdjustScrollBars(null, null); }
protected override void Dispose(bool disposing) { if (disposing) { this.Document.DocumentChanged -= new DocumentEventHandler(this.AdjustScrollBars); this.motherTextEditorControl = null; if (this.vScrollBar != null) { this.vScrollBar.Dispose(); this.vScrollBar = null; } if (this.hScrollBar != null) { this.hScrollBar.Dispose(); this.hScrollBar = null; } if (this.hRuler != null) { this.hRuler.Dispose(); this.hRuler = null; } } base.Dispose(disposing); }