Ejemplo n.º 1
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;
            }
        }
Ejemplo n.º 2
0
 public override void OptionsChanged()
 {
     primaryTextArea.OptionsChanged();
     if (secondaryTextArea != null)
     {
         secondaryTextArea.OptionsChanged();
     }
 }