コード例 #1
0
ファイル: TextAreaControl.cs プロジェクト: wilsoc5/tikzedt
 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);
 }
コード例 #2
0
ファイル: TextAreaControl.cs プロジェクト: ieccus/ExpDelivery
 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);
 }
コード例 #3
0
 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);
 }
コード例 #4
0
        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);
        }