Пример #1
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);
 }
Пример #2
0
 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 Dispose()
 {
     _window.Dispose();
     _scrollX.Dispose();
     _scrollY.Dispose();
     _menu.Dispose();
     DisposeTabs();
 }
Пример #5
0
 internal void Dispose()
 {
     _imageListView.Controls.Remove(_vScrollBar);
     _vScrollBar.Dispose();
     _scrollTimer.Stop();
     _scrollTimer.Enabled = false;
     _scrollTimer.Dispose();
     _renderer.Dispose();
     _imageListView = null;
 }
Пример #6
0
        /// <summary>
        /// Releases the unmanaged resources used by the <see cref="T:System.Windows.Forms.Control" /> and
        /// its child controls and optionally releases the managed resources.
        /// </summary>
        /// <param name="disposing"> <see langword="true" /> to release both managed and unmanaged
        ///  resources; <see langword="false" /> to release only unmanaged resources. </param>
        /// <seealso cref="System.Windows.Forms.Control.Dispose(bool)"/>
        protected override void Dispose(bool disposing)
        {
            if (disposing && _scrollBar != null)
            {
                this.Controls.Remove(_scrollBar);
                _scrollBar.ValueChanged -= this.ScrollbarValueChangedHandler;
                _scrollBar.Dispose();
                _scrollBar = null;
            }

            base.Dispose(disposing);
        }
Пример #7
0
        public DescriptionControl()
        {
            ResizeRedraw = false;

            InitializeComponent();

            // Get the size of a vertical scroll bar.
            VScrollBar scrollBar = new VScrollBar();

            scrollWidth = scrollBar.GetPreferredSize(new Size(200, 200)).Width;
            scrollBar.Dispose();
        }
 /// <summary>
 /// Remove the vertical scrollbar
 /// </summary>
 protected virtual void RemoveVScrollBar()
 {
     if (verticalScroll != null)
     {
         VScrollBar l_tmp = verticalScroll;
         verticalScroll      = null;
         l_tmp.ValueChanged -= new EventHandler(VScroll_Change);
         Controls.Remove(l_tmp);
         l_tmp.Dispose();
         l_tmp = null;
     }
     oldVerticalScrollValue = 0;
 }
Пример #9
0
 private void FreeBars()
 {
     if (HBar != null)
     {
         HBar.Parent = null;
         HBar.Dispose();
         HBar        = null;
         VBar.Parent = null;
         VBar.Dispose();
         VBar       = null;
         image.Top  = 0;
         image.Left = 0;
     }
 }
Пример #10
0
        protected override void Dispose(bool isDisposing)
        {
            base.Dispose(isDisposing);

            if (_alreadyDisposed)
            {
                return;
            }
            if (isDisposing)
            {
                if (_vScrollBar != null)
                {
                    _vScrollBar.Dispose();
                }
            }
            _alreadyDisposed = true;
        }
Пример #11
0
        private void MainForm_FormClosed(object sender, FormClosedEventArgs e)
        {
            Log("MainForm_FormClosed event");

            if (_activitiesGridVScrollBar != null)
            {
                _activitiesGridVScrollBar.Dispose();
            }
            _activitiesGridVScrollBar = null;

            if (_timecardLogic != null && _timecardLogic.GetCurrentTimecard().IsDirty)
            {
                _timecardLogic.SaveTimecard();
            }

            _timecardLogic = null;
            _reportLogic   = null;

            if (Factory != null)
            {
                Factory.Dispose();
            }
        }
 public void Dispose()
 {
     _choicePanel?.Dispose();
     _verticalBar.Dispose();
 }