Esempio n. 1
0
        private FastColoredTextBox createFastColoredTextBox(string sql = "    ")
        {
            var fastColoredTextBox1 = new FastColoredTextBox()
            {
                BackBrush      = null, CharHeight = 14, CharWidth = 8, Cursor = Cursors.IBeam,
                Dock           = DockStyle.Fill, IsReplaceMode = false, Name = "fastColoredTextBox" + (this.Control.Controls.Count + 1),
                Paddings       = new Padding(0), Location = new System.Drawing.Point(0, 0), Text = "    ",
                Zoom           = 100, AutoScrollMinSize = new System.Drawing.Size(179, 14), TabIndex = this.Control.Controls.Count,
                DisabledColor  = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(180)))), ((int)(((byte)(180)))), ((int)(((byte)(180))))),
                SelectionColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(255)))))
            };

            this.SetSqlOptions(fastColoredTextBox1);
            if (EditorConfig.isAutoFormatConfigOn())
            {
                sql = EditorUtils.FormatSql(sql);
            }
            fastColoredTextBox1.Text = sql;
            return(fastColoredTextBox1);
        }