Beispiel #1
0
        //private TextBox _textBox;
        private void CreateControls()
        {
            // backColor: Color.DodgerBlue
            _topToolsPanel = zForm.CreatePanel(dockStyle: DockStyle.Top, height: 35);
            _topToolsPanel.SuspendLayout();

            //_editPanel = zForm.CreatePanel(dockStyle: DockStyle.Top, backColor: Color.DeepPink, height: 300);
            _editPanel = zForm.CreatePanel(dockStyle: DockStyle.Top, height: 300);
            _editPanel.SuspendLayout();
            //_textBox = zForm.CreateTextBox(dockStyle: DockStyle.Fill, multiline: true);
            //_editPanel.Controls.Add(_textBox);

            //_bottomPanel = zForm.CreatePanel(DockStyle.Fill, Color.Brown);
            //_bottomPanel.SuspendLayout();
            //_resultTab = CreateResultTab();
            // Color.Transparent
            _resultTab = PanelTabControl.Create(DockStyle.Fill);
            _resultTab.SuspendLayout();

            //_statusPanel = zForm.CreatePanel(DockStyle.Bottom, Color.Chocolate, height: 20);
            //_statusPanel.SuspendLayout();
            //_bottomToolsPanel = CreateBottomToolsPanel();
            _bottomToolStrip = new ToolStrip();
            _bottomToolStrip.SuspendLayout();
            //backColor: Color.Chocolate
            _bottomToolsPanel = zForm.CreatePanel(dockStyle: DockStyle.Bottom, height: 20);
            _bottomToolsPanel.SuspendLayout();
            _bottomToolsPanel.Controls.Add(_bottomToolStrip);

            MenuStrip menu = new MenuStrip();

            menu.SuspendLayout();
            this.MainMenuStrip = menu;
        }
Beispiel #2
0
        //private void PanelTabControl_ControlAdded(object sender, ControlEventArgs e)
        //{
        //    //Control control = e.Control;
        //    AddTab(e.Control);
        //}

        //private void PanelTabControl_ControlRemoved(object sender, ControlEventArgs e)
        //{
        //    throw new PBException("remove control is not possible");
        //}

        public static PanelTabControl Create(DockStyle dockStyle, Color?backColor = null, int?width = null, int?height = null)
        {
            PanelTabControl tabControl = new PanelTabControl();

            tabControl.SuspendLayout();
            tabControl.Dock = dockStyle;
            if (backColor != null)
            {
                tabControl.BackColor = (Color)backColor;
            }
            if (width != null || height != null)
            {
                int w = 0;
                if (width != null)
                {
                    w = (int)width;
                }
                int h = 0;
                if (height != null)
                {
                    h = (int)height;
                }
                tabControl.Size = new Size(w, h);
            }
            tabControl.ResumeLayout(false);
            return(tabControl);
        }
        //private TextBox _textBox;
        private void CreateControls()
        {
            // backColor: Color.DodgerBlue
            _topToolsPanel = zForm.CreatePanel(dockStyle: DockStyle.Top, height: 35);
            _topToolsPanel.SuspendLayout();

            //_editPanel = zForm.CreatePanel(dockStyle: DockStyle.Top, backColor: Color.DeepPink, height: 300);
            _editPanel = zForm.CreatePanel(dockStyle: DockStyle.Top, height: 300);
            _editPanel.SuspendLayout();
            //_textBox = zForm.CreateTextBox(dockStyle: DockStyle.Fill, multiline: true);
            //_editPanel.Controls.Add(_textBox);

            //_bottomPanel = zForm.CreatePanel(DockStyle.Fill, Color.Brown);
            //_bottomPanel.SuspendLayout();
            //_resultTab = CreateResultTab();
            // Color.Transparent
            _resultTab = PanelTabControl.Create(DockStyle.Fill);
            _resultTab.SuspendLayout();

            //_statusPanel = zForm.CreatePanel(DockStyle.Bottom, Color.Chocolate, height: 20);
            //_statusPanel.SuspendLayout();
            //_bottomToolsPanel = CreateBottomToolsPanel();
            _bottomToolStrip = new ToolStrip();
            _bottomToolStrip.SuspendLayout();
            //backColor: Color.Chocolate
            _bottomToolsPanel = zForm.CreatePanel(dockStyle: DockStyle.Bottom, height: 20);
            _bottomToolsPanel.SuspendLayout();
            _bottomToolsPanel.Controls.Add(_bottomToolStrip);

            MenuStrip menu = new MenuStrip();
            menu.SuspendLayout();
            this.MainMenuStrip = menu;
        }
Beispiel #4
0
        //private void PanelTabControl_ControlAdded(object sender, ControlEventArgs e)
        //{
        //    //Control control = e.Control;
        //    AddTab(e.Control);
        //}

        //private void PanelTabControl_ControlRemoved(object sender, ControlEventArgs e)
        //{
        //    throw new PBException("remove control is not possible");
        //}

        public static PanelTabControl Create(DockStyle dockStyle, Color? backColor = null, int? width = null, int? height = null)
        {
            PanelTabControl tabControl = new PanelTabControl();
            tabControl.SuspendLayout();
            tabControl.Dock = dockStyle;
            if (backColor != null)
                tabControl.BackColor = (Color)backColor;
            if (width != null || height != null)
            {
                int w = 0;
                if (width != null)
                    w = (int)width;
                int h = 0;
                if (height != null)
                    h = (int)height;
                tabControl.Size = new Size(w, h);
            }
            tabControl.ResumeLayout(false);
            return tabControl;
        }