//public ScintillaControl Source { get { return _source; } }

        private void CreateScintillaControl()
        {
            _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.TextChanged += source_TextChanged;
        }
Example #2
0
        private void CreateScintillaControl()
        {
            _source = ScintillaControl.Create(dockStyle: DockStyle.Fill);
            _source.SetFont("Consolas", 10);
            _source.ConfigureLexerCpp();
            _source.SetTabIndent(2, 0, false);
            _source.ScintillaStatus.PositionChange += PositionChange;
            _source.ScintillaStatus.OvertypeChange += OvertypeChange;
            //_source.TextChanged += source_TextChanged;
            _editPanel.Controls.Add(_source);

            _menuViewSourceLineNumber = zForm.CreateMenuItem("View source line number", checkOnClick: true, @checked: true, onClick: menuViewSourceLineNumber_Click);
            //_menuOptions.DropDownItems.Add(_menuViewSourceLineNumber);
        }
Example #3
0
 public static ScintillaControl Create(string name = null, DockStyle dockStyle = DockStyle.None, int? x = null, int? y = null, int? width = null, int? height = null)
 {
     ScintillaControl scintilla = new ScintillaControl();
     scintilla.Name = name;
     scintilla.Dock = dockStyle;
     //scintilla.Font = new Font("Courier New", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
     //scintilla.ScrollBars = ScrollBars.Both;
     Point? point = zForm.GetPoint(x, y);
     if (point != null)
         scintilla.Location = (Point)point;
     Size? size = zForm.GetSize(width, height);
     if (size != null)
         scintilla.Size = (Size)size;
     return scintilla;
 }
Example #4
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;
        }
Example #5
0
        public static ScintillaControl Create(string name = null, DockStyle dockStyle = DockStyle.None, int?x = null, int?y = null, int?width = null, int?height = null)
        {
            ScintillaControl scintilla = new ScintillaControl();

            scintilla.Name = name;
            scintilla.Dock = dockStyle;
            //scintilla.Font = new Font("Courier New", 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(0)));
            //scintilla.ScrollBars = ScrollBars.Both;
            Point?point = zForm.GetPoint(x, y);

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

            if (size != null)
            {
                scintilla.Size = (Size)size;
            }
            return(scintilla);
        }