public void Split()
        {
            if (_secondaryTextAreaControl == null)
            {
                _secondaryTextAreaControl        = new TextAreaControl(this);
                _secondaryTextAreaControl.Dock   = DockStyle.Bottom;
                _secondaryTextAreaControl.Height = Height / 2;

                _secondaryTextAreaControl.TextArea.GotFocus += delegate
                {
                    SetActiveTextAreaControl(_secondaryTextAreaControl);
                };

                _textAreaSplitter             = new Splitter();
                _textAreaSplitter.BorderStyle = BorderStyle.FixedSingle;
                _textAreaSplitter.Height      = 8;
                _textAreaSplitter.Dock        = DockStyle.Bottom;
                _textAreaPanel.Controls.Add(_textAreaSplitter);
                _textAreaPanel.Controls.Add(_secondaryTextAreaControl);
                InitializeTextAreaControl(_secondaryTextAreaControl);
                _secondaryTextAreaControl.OptionsChanged();
            }
            else
            {
                SetActiveTextAreaControl(_primaryTextAreaControl);

                _textAreaPanel.Controls.Remove(_secondaryTextAreaControl);
                _textAreaPanel.Controls.Remove(_textAreaSplitter);

                _secondaryTextAreaControl.Dispose();
                _textAreaSplitter.Dispose();
                _secondaryTextAreaControl = null;
                _textAreaSplitter         = null;
            }
        }
Exemple #2
0
        public void Split()
        {
            if (secondaryTextArea == null)
            {
                secondaryTextArea        = new TextAreaControl(this);
                secondaryTextArea.Dock   = DockStyle.Bottom;
                secondaryTextArea.Height = Height / 2;

                secondaryTextArea.TextArea.GotFocus += delegate {
                    SetActiveTextAreaControl(secondaryTextArea);
                };

                textAreaSplitter             = new Splitter();
                textAreaSplitter.BorderStyle = BorderStyle.FixedSingle;
                textAreaSplitter.Height      = 8;
                textAreaSplitter.Dock        = DockStyle.Bottom;
                textAreaPanel.Controls.Add(textAreaSplitter);
                textAreaPanel.Controls.Add(secondaryTextArea);
                InitializeTextAreaControl(secondaryTextArea);
                secondaryTextArea.OptionsChanged();
            }
            else
            {
                SetActiveTextAreaControl(primaryTextArea);

                textAreaPanel.Controls.Remove(secondaryTextArea);
                textAreaPanel.Controls.Remove(textAreaSplitter);

                secondaryTextArea.Dispose();
                textAreaSplitter.Dispose();
                secondaryTextArea = null;
                textAreaSplitter  = null;
            }
        }
Exemple #3
0
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                m_dockState = DockState.Unknown;

                if (NestedPanesContainer != null)
                {
                    NestedPanesContainer.NestedPanes.Remove(this);
                }

                if (DockPanel != null)
                {
                    DockPanel.RemovePane(this);
                    m_dockPanel = null;
                }

                Splitter.Dispose();
                if (m_autoHidePane != null)
                {
                    m_autoHidePane.Dispose();
                }
            }
            base.Dispose(disposing);
        }
Exemple #4
0
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (printDocument != null)
         {
             printDocument.BeginPrint -= new PrintEventHandler(this.BeginPrint);
             printDocument.PrintPage  -= new PrintPageEventHandler(this.PrintPage);
             printDocument             = null;
         }
         Document.UndoStack.ClearAll();
         Document.UpdateCommited -= new EventHandler(CommitUpdateRequested);
         if (textAreaPanel != null)
         {
             if (secondaryTextArea != null)
             {
                 secondaryTextArea.Dispose();
                 textAreaSplitter.Dispose();
                 secondaryTextArea = null;
                 textAreaSplitter  = null;
             }
             if (primaryTextArea != null)
             {
                 primaryTextArea.Dispose();
             }
             textAreaPanel.Dispose();
             textAreaPanel = null;
         }
     }
     base.Dispose(disposing);
 }
        public void Split()
        {
            if (secondaryTextArea == null)
            {
                primaryTextArea.Controls.Remove(primaryTextArea.splitterButton);

                secondaryTextArea        = new TextAreaControl(this);
                secondaryTextArea.Dock   = DockStyle.Bottom;
                secondaryTextArea.Height = Height / 2;

                secondaryTextArea.Controls.Remove(secondaryTextArea.splitterButton);
                secondaryTextArea.TextArea.GotFocus += delegate {
                    SetActiveTextAreaControl(secondaryTextArea);
                };
                TextEditorProperties.IsSplit    = true;
                textAreaSplitter                = new Splitter();
                textAreaSplitter.BorderStyle    = BorderStyle.None;
                textAreaSplitter.Height         = 8;
                textAreaSplitter.Dock           = DockStyle.Bottom;
                textAreaSplitter.MinExtra       = 0;
                textAreaSplitter.MinSize        = 0;
                textAreaSplitter.DoubleClick   += TextAreaSplitter_DoubleClick;
                textAreaSplitter.SplitterMoved += TextAreaSplitter_OnSplitterMoved;
                textAreaPanel.Controls.Add(textAreaSplitter);
                textAreaPanel.Controls.Add(secondaryTextArea);
                InitializeTextAreaControl(secondaryTextArea);
                secondaryTextArea.OptionsChanged();
            }
            else
            {
                TextEditorProperties.IsSplit = false;
                primaryTextArea.Controls.Add(primaryTextArea.splitterButton);
                primaryTextArea.SetScrollBarBounds();
                SetActiveTextAreaControl(primaryTextArea);

                textAreaPanel.Controls.Remove(secondaryTextArea);
                textAreaPanel.Controls.Remove(textAreaSplitter);

                secondaryTextArea.Dispose();
                textAreaSplitter.Dispose();
                secondaryTextArea = null;
                textAreaSplitter  = null;
            }
        }
Exemple #6
0
 private void RemoveUnusedSplitters(List <DockingControl> dockingControls)
 {
     while (_splitters.Count > dockingControls.Count - 1)
     {
         Splitter splitter = _splitters[_splitters.Count - 1];
         _splitters.Remove(splitter);
         _container.Controls.Remove(splitter);
         splitter.Parent = null;
         splitter.Dispose();
     }
 }
Exemple #7
0
 public override void DisposeChildControls()
 {
     splitter.Dispose();
     textBox_barcode.Dispose();
     comboBox_location.Dispose();
     comboBox_bookType.Dispose();
     textBox_accessNo.Dispose();
     textBox_price.Dispose();
     label_refID.Dispose();
     label_batchNo.Dispose();
     base.DisposeChildControls();
 }
Exemple #8
0
        /// <summary>
        /// Releases unmanaged and - optionally - managed resources
        /// </summary>
        /// <param name="disposing"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                // Clean up managed resources
                OnCompletionWindowClosed(this, EventArgs.Empty);
                OnInsightWindowClosed(this, EventArgs.Empty);

                if (_printDocument != null)
                {
                    _printDocument.BeginPrint -= BeginPrint;
                    _printDocument.PrintPage  -= PrintPage;
                    _printDocument             = null;
                }
                Document.UndoStack.ClearAll();
                Document.UpdateCommited -= CommitUpdateRequested;
                if (_textAreaPanel != null)
                {
                    if (_secondaryTextArea != null)
                    {
                        _secondaryTextArea.Dispose();
                        _textAreaSplitter.Dispose();
                        _secondaryTextArea = null;
                        _textAreaSplitter  = null;
                    }
                    if (_primaryTextArea != null)
                    {
                        _primaryTextArea.Dispose();
                    }
                    _textAreaPanel.Dispose();
                    _textAreaPanel = null;
                }

                HighlightingManager.Manager.SyntaxHighlightingReloaded -= OnReloadHighlighting;
                Document.HighlightingStrategy        = null;
                Document.UndoStack.TextEditorControl = null;
            }
            base.Dispose(disposing);
        }
Exemple #9
0
 public void CloseDockedPanel()
 {
     if (dockSplitter != null)
     {
         dockSplitter.Dispose();
     }
     MusicPlayer.Instance.MusicUpdatedEvent -= Player_MusicUpdatedEvent;
     MusicPlayer.Instance.PlayEvent         -= tracklistView.MusicPlayer_PlayEvent;
     if (MusicPlayer.WinFormApp.dockedTrackManagers.Contains(this))
     {
         MusicPlayer.WinFormApp.dockedTrackManagers.Remove(this);
     }
     tracklistView.Dispose();
     this.Dispose();
 }
Exemple #10
0
        /// <exclude/>
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                m_dockState = DockState.Unknown;

                if (DockListContainer != null)
                {
                    DockListContainer.DockList.Remove(this);
                }

                if (DockPanel != null)
                {
                    DockPanel.RemovePane(this);
                    m_dockPanel = null;
                }

                Splitter.Dispose();
                AutoHidePane.Dispose();
            }
            base.Dispose(disposing);
        }
Exemple #11
0
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                // IMPORTANT: avoid nested call into this method on Mono.
                // https://github.com/dockpanelsuite/dockpanelsuite/issues/16
                if (Win32Helper.IsRunningOnMono)
                {
                    if (m_isDisposing)
                    {
                        return;
                    }

                    m_isDisposing = true;
                }

                m_dockState = DockState.Unknown;

                if (NestedPanesContainer != null)
                {
                    NestedPanesContainer.NestedPanes.Remove(this);
                }

                if (DockPanel != null)
                {
                    DockPanel.RemovePane(this);
                    m_dockPanel = null;
                }

                Splitter.Dispose();
                if (m_autoHidePane != null)
                {
                    m_autoHidePane.Dispose();
                }
            }
            base.Dispose(disposing);
        }