Exemple #1
0
        protected void CreateResultControls()
        {
            int resultTabIndex = 0;

            Panel panel = AddResultPanel("result 1");

            _gridResult1 = XtraGridControl.Create(dockStyle: DockStyle.Fill);
            panel.Controls.Add(_gridResult1);
            _grid1ResultTabIndex = resultTabIndex++;

            panel        = AddResultPanel("result 2");
            _gridResult2 = DataGridViewControl.Create(dockStyle: DockStyle.Fill, showRowNumber: true);
            panel.Controls.Add(_gridResult2);
            _grid2ResultTabIndex = resultTabIndex++;

            panel        = AddResultPanel("result 3");
            _gridResult3 = zForm.CreateDataGrid(dockStyle: DockStyle.Fill);
            panel.Controls.Add(_gridResult3);
            _grid3ResultTabIndex = resultTabIndex++;

            _gridResultTabIndex = _grid2ResultTabIndex;

            panel            = AddResultPanel("result 4");
            _treeResult      = new TreeView();
            _treeResult.Dock = DockStyle.Fill;
            panel.Controls.Add(_treeResult);
            _treeResultTabIndex = resultTabIndex++;

            panel       = AddResultPanel("message");
            _logTextBox = LogTextBox.Create(dockStyle: DockStyle.Fill);
            panel.Controls.Add(_logTextBox);
            _messageResultTabIndex = resultTabIndex++;
        }
        protected void CreateResultControls()
        {
            int resultTabIndex = 0;

            Panel panel = AddResultPanel("result 1");
            _gridResult1 = XtraGridControl.Create(dockStyle: DockStyle.Fill);
            panel.Controls.Add(_gridResult1);
            _grid1ResultTabIndex = resultTabIndex++;

            panel = AddResultPanel("result 2");
            _gridResult2 = DataGridViewControl.Create(dockStyle: DockStyle.Fill, showRowNumber: true);
            panel.Controls.Add(_gridResult2);
            _grid2ResultTabIndex = resultTabIndex++;

            panel = AddResultPanel("result 3");
            _gridResult3 = zForm.CreateDataGrid(dockStyle: DockStyle.Fill);
            panel.Controls.Add(_gridResult3);
            _grid3ResultTabIndex = resultTabIndex++;

            _gridResultTabIndex = _grid2ResultTabIndex;

            panel = AddResultPanel("result 4");
            _treeResult = new TreeView();
            _treeResult.Dock = DockStyle.Fill;
            panel.Controls.Add(_treeResult);
            _treeResultTabIndex = resultTabIndex++;

            panel = AddResultPanel("message");
            _logTextBox = LogTextBox.Create(dockStyle: DockStyle.Fill);
            panel.Controls.Add(_logTextBox);
            _messageResultTabIndex = resultTabIndex++;
        }
        public static DataGridViewControl Create(string name = null, DockStyle dockStyle = DockStyle.None, int? x = null, int? y = null, int? width = null, int? height = null, bool showRowNumber = false)
        {
            DataGridViewCellStyle viewCellStyle = new DataGridViewCellStyle();
            viewCellStyle.Alignment = DataGridViewContentAlignment.MiddleLeft;
            viewCellStyle.BackColor = SystemColors.Window;
            viewCellStyle.Font = new Font("Courier New", 8.25F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
            viewCellStyle.ForeColor = SystemColors.ControlText;
            viewCellStyle.SelectionBackColor = SystemColors.Highlight;
            viewCellStyle.SelectionForeColor = SystemColors.HighlightText;
            viewCellStyle.WrapMode = DataGridViewTriState.False;
            viewCellStyle.NullValue = "(null)";

            DataGridViewControl grid = new DataGridViewControl();
            ((ISupportInitialize)grid).BeginInit();
            grid.Name = name;
            grid.Dock = dockStyle;
            Point? point = zForm.GetPoint(x, y);
            if (point != null)
                grid.Location = (Point)point;
            Size? size = zForm.GetSize(width, height);
            if (size != null)
                grid.Size = (Size)size;
            grid.AllowUserToAddRows = false;
            grid.AllowUserToDeleteRows = false;
            grid.AllowUserToOrderColumns = true;
            grid.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
            grid.DefaultCellStyle = viewCellStyle;
            grid.ReadOnly = true;
            //grid.TabIndex = 0;
            if (showRowNumber)
                grid.RowPostPaint += grid.DataGridView_RowPostPaint;
            ((ISupportInitialize)grid).EndInit();
            return grid;
        }
Exemple #4
0
        public static DataGridViewControl Create(string name = null, DockStyle dockStyle = DockStyle.None, int?x = null, int?y = null, int?width = null, int?height = null, bool showRowNumber = false)
        {
            DataGridViewCellStyle viewCellStyle = new DataGridViewCellStyle();

            viewCellStyle.Alignment          = DataGridViewContentAlignment.MiddleLeft;
            viewCellStyle.BackColor          = SystemColors.Window;
            viewCellStyle.Font               = new Font("Courier New", 8.25F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
            viewCellStyle.ForeColor          = SystemColors.ControlText;
            viewCellStyle.SelectionBackColor = SystemColors.Highlight;
            viewCellStyle.SelectionForeColor = SystemColors.HighlightText;
            viewCellStyle.WrapMode           = DataGridViewTriState.False;
            viewCellStyle.NullValue          = "(null)";

            DataGridViewControl grid = new DataGridViewControl();

            ((ISupportInitialize)grid).BeginInit();
            grid.Name = name;
            grid.Dock = dockStyle;
            Point?point = zForm.GetPoint(x, y);

            if (point != null)
            {
                grid.Location = (Point)point;
            }
            Size?size = zForm.GetSize(width, height);

            if (size != null)
            {
                grid.Size = (Size)size;
            }
            grid.AllowUserToAddRows          = false;
            grid.AllowUserToDeleteRows       = false;
            grid.AllowUserToOrderColumns     = true;
            grid.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
            grid.DefaultCellStyle            = viewCellStyle;
            grid.ReadOnly = true;
            //grid.TabIndex = 0;
            if (showRowNumber)
            {
                grid.RowPostPaint += grid.DataGridView_RowPostPaint;
            }
            ((ISupportInitialize)grid).EndInit();
            return(grid);
        }
Exemple #5
0
        public RunSourceForm_v3()
        {
            //this.FormWidth = 1060;
            //this.FormHeight = 650;
            this.ClientSize = new Size(1060, 650);
            CreateMenu();
            CreateTopTools();

            _source = ScintillaControl.Create(dockStyle: DockStyle.Fill);
            _editPanel.Controls.Add(_source);
            _source.SetFont("Consolas", 10);
            _source.ConfigureLexerCpp();
            _source.SetTabIndent(2, 0, false);
            _source.DisplayLineNumber(4);
            //_source.SelectionChanged += _source_SelectionChanged;
            _source.UpdateUI += _source_UpdateUI;

            Panel panel = AddResultPanel("result 1");
            _gridResult1 = XtraGridControl.Create(dockStyle: DockStyle.Fill);
            panel.Controls.Add(_gridResult1);

            panel = AddResultPanel("result 2");
            _gridResult2 = DataGridViewControl.Create(dockStyle: DockStyle.Fill);
            panel.Controls.Add(_gridResult2);

            panel = AddResultPanel("result 3");
            _gridResult3 = zForm.CreateDataGrid(dockStyle: DockStyle.Fill);
            panel.Controls.Add(_gridResult3);

            panel = AddResultPanel("result 4");
            _treeResult = new TreeView();
            _treeResult.Dock = DockStyle.Fill;
            panel.Controls.Add(_treeResult);

            panel = AddResultPanel("message");
            _logTextBox = LogTextBox.Create(dockStyle: DockStyle.Fill);
            panel.Controls.Add(_logTextBox);
            //ActiveResultPanel(4);
            SelectResultTab(4);
            this.BaseInitialize();
            this.Load += RunSourceForm_v3_Load;
        }