private void prettyCode()
        {
            Alsing.SourceCode.SyntaxDefinition sl = new Alsing.SourceCode.SyntaxDefinitionLoader().Load("SyntaxFiles\\abap.syn");

            this.textResultCode.Document.Parser.Init(sl);
            this.textTemplate.Document.Parser.Init(sl);
        }
        private void prettyCode()
        {
            Alsing.SourceCode.SyntaxDefinition sl = new Alsing.SourceCode.SyntaxDefinitionLoader().Load("SyntaxFiles\\abap.syn");

            //this.syntaxBoxControl1.Document.Parser.Init(sl);
            this.syntaxBoxControl1.Document.Parser.Init(sl);
        }
Example #3
0
        private void prettyCode()
        {
            Alsing.SourceCode.SyntaxDefinition sl = new Alsing.SourceCode.SyntaxDefinitionLoader().Load("SyntaxFiles\\abap.syn");

            //this.syntaxBoxControl1.Document.Parser.Init(sl);
            this.syntaxBoxControl1.Document.Parser.Init(sl);
        }
Example #4
0
        public FormSmallSql()
        {
            InitializeComponent();

            this.textBoxDefaultDb.Text    = ConfigFileTool.SAPGlobalSettings.GetDefaultDbConnection();
            this.textBoxDefaultDb.Enabled = false;

            Alsing.SourceCode.SyntaxDefinition sl = new Alsing.SourceCode.SyntaxDefinitionLoader().Load("SyntaxFiles\\sql.syn");
            this.syntaxBoxControl1.Document.Parser.Init(sl);
        }
        public FormSmallSql()
        {
            InitializeComponent();

            this.textBoxDefaultDb.Text = ConfigFileTool.SAPGlobalSettings.GetDefaultDbConnection();
            this.textBoxDefaultDb.Enabled = false;

            Alsing.SourceCode.SyntaxDefinition sl = new Alsing.SourceCode.SyntaxDefinitionLoader().Load("SyntaxFiles\\sql.syn");
            this.syntaxBoxControl1.Document.Parser.Init(sl);
        }
Example #6
0
        /// <summary>The set syntax.</summary>
        /// <param name="name">The name.</param>
        public void SetSyntax(string name)
        {
            LoadHighlightingProvider();
            // txtEdit.SetHighlighting(name);
            Alsing.SourceCode.SyntaxDefinition sl;
            var fileName = string.Empty;

            fileName = "SyntaxFiles\\" + name + ".syn";
            sl       = new Alsing.SourceCode.SyntaxDefinitionLoader().Load(fileName);
            this.txtEdit.Document.Parser.Init(sl);
        }
        public FormImportSapProgram()
        {
            InitializeComponent();
            this.cboxSystemList1.DataSource = ConfigFileTool.SAPGlobalSettings.GetSAPClientList();
            this.cboxSystemList1.Text       = ConfigFileTool.SAPGlobalSettings.GetDefaultSapCient();
            Alsing.SourceCode.SyntaxDefinition sl = new Alsing.SourceCode.SyntaxDefinitionLoader().Load("SyntaxFiles\\abap.syn");


            this.cbxDbSources.DataSource = ConfigFileTool.SAPGlobalSettings.GetManagerDbList();
            this.m_dbName          = ConfigFileTool.SAPGlobalSettings.GetDefaultCodeManagerDb();
            db                     = new Codedb(m_dbName);
            this.cbxDbSources.Text = this.m_dbName;
            this.cbxDbSources.SelectedIndexChanged += cbxDbSources_SelectedIndexChanged;

            //this.txtObject.Text = "PROG";

            this.syntaxBoxControl1.Document.Parser.Init(sl);
            this.backgroundWorker1.WorkerReportsProgress      = true;
            this.backgroundWorker1.WorkerSupportsCancellation = true;
            this.backgroundWorker1.DoWork             += backgroundWorker1_DoWork;
            this.backgroundWorker1.ProgressChanged    += backgroundWorker1_ProgressChanged;
            this.backgroundWorker1.RunWorkerCompleted += backgroundWorker1_RunWorkerCompleted;


            // DataTable dt = null;
            dt = new DataTable("TRDIR");
            dt.Columns.AddRange(new DataColumn[] {
                new DataColumn("Index", typeof(int)),
                new DataColumn("Select", typeof(bool)),
                new DataColumn("CodeId", typeof(String)),
                new DataColumn("Header", typeof(String)),
                new DataColumn("Length", typeof(String)),
                new DataColumn("Lines", typeof(String)),
                new DataColumn("NAME", typeof(String)),  // ABAP Program Name
                //new DataColumn("PROG",typeof(String)),// ABAP 程序名
                new DataColumn("CLAS", typeof(String)),  // 程序类别
                new DataColumn("SUBC", typeof(String)),  //   程序类型
                new DataColumn("APPL", typeof(String)),  // 应用程序
                new DataColumn("CDAT", typeof(String)),  // 创建日期
                new DataColumn("VERN", typeof(String)),  // 版本号
                new DataColumn("RMAND", typeof(String)), // 集团
                new DataColumn("RLOAD", typeof(String)), // 主语言
                new DataColumn("UNAM", typeof(String)),  // 最后修改人
                new DataColumn("UDAT", typeof(String)),  // 更改日期
                new DataColumn("UTIME", typeof(String)), // 字典: 最后修改时间
                new DataColumn("DATALG", typeof(Int32)), // ABAP/4: 程序组件的长度
                new DataColumn("VARCL", typeof(String)), // 区分大小写
            });
            // dt.Columns["Index"].AutoIncrement = true;
            dt.Columns["Select"].DefaultValue      = false;
            this.dataGridView1.DataSource          = dt;
            this.dataGridView1.CellDoubleClick    += dataGridView1_CellDoubleClick;
            this.dataGridView1.CurrentCellChanged += dataGridView1_CurrentCellChanged;
        }
        public FormImportSapProgram()
        {
            InitializeComponent();
            this.cboxSystemList1.DataSource = ConfigFileTool.SAPGlobalSettings.GetSAPClientList();
            this.cboxSystemList1.Text = ConfigFileTool.SAPGlobalSettings.GetDefaultSapCient();
            Alsing.SourceCode.SyntaxDefinition sl = new Alsing.SourceCode.SyntaxDefinitionLoader().Load("SyntaxFiles\\abap.syn");

            this.cbxDbSources.DataSource = ConfigFileTool.SAPGlobalSettings.GetManagerDbList();
            this.m_dbName = ConfigFileTool.SAPGlobalSettings.GetDefaultCodeManagerDb();
            db = new Codedb(m_dbName);
            this.cbxDbSources.Text = this.m_dbName;
            this.cbxDbSources.SelectedIndexChanged += cbxDbSources_SelectedIndexChanged;

            //this.txtObject.Text = "PROG";

            this.syntaxBoxControl1.Document.Parser.Init(sl);
            this.backgroundWorker1.WorkerReportsProgress = true;
            this.backgroundWorker1.WorkerSupportsCancellation = true;
            this.backgroundWorker1.DoWork += backgroundWorker1_DoWork;
            this.backgroundWorker1.ProgressChanged += backgroundWorker1_ProgressChanged;
            this.backgroundWorker1.RunWorkerCompleted += backgroundWorker1_RunWorkerCompleted;

            // DataTable dt = null;
            dt = new DataTable("TRDIR");
            dt.Columns.AddRange(new DataColumn[]{
            new DataColumn("Index",typeof(int)),
            new DataColumn("Select",typeof(bool)),
            new DataColumn("CodeId",typeof(String)),
            new DataColumn("Header",typeof(String)),
            new DataColumn("Length",typeof(String)),
            new DataColumn("Lines",typeof(String)),
             			new DataColumn("NAME",typeof(String)),// ABAP Program Name
            //new DataColumn("PROG",typeof(String)),// ABAP 程序名
            new DataColumn("CLAS",typeof(String)),// 程序类别
            new DataColumn("SUBC",typeof(String)),//   程序类型
            new DataColumn("APPL",typeof(String)),// 应用程序
            new DataColumn("CDAT",typeof(String)),// 创建日期
            new DataColumn("VERN",typeof(String)),// 版本号
            new DataColumn("RMAND",typeof(String)),// 集团
            new DataColumn("RLOAD",typeof(String)),// 主语言
            new DataColumn("UNAM",typeof(String)),// 最后修改人
            new DataColumn("UDAT",typeof(String)),// 更改日期
            new DataColumn("UTIME",typeof(String)),// 字典: 最后修改时间
            new DataColumn("DATALG",typeof(Int32)),// ABAP/4: 程序组件的长度
            new DataColumn("VARCL",typeof(String)),// 区分大小写
             });
            // dt.Columns["Index"].AutoIncrement = true;
            dt.Columns["Select"].DefaultValue = false;
            this.dataGridView1.DataSource = dt;
            this.dataGridView1.CellDoubleClick += dataGridView1_CellDoubleClick;
            this.dataGridView1.CurrentCellChanged += dataGridView1_CurrentCellChanged;
        }
Example #9
0
 private void loadSynFile(string text)
 {
     if (String.IsNullOrEmpty(text))
     {
         return;
     }
     try
     {
         Alsing.SourceCode.SyntaxDefinition sl;
         var fileName = string.Empty;
         fileName = "SyntaxFiles\\" + text + ".syn";
         sl       = new Alsing.SourceCode.SyntaxDefinitionLoader().Load(fileName);
         this.syntaxBoxControl1.Document.Parser.Init(sl);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Example #10
0
        // List<SAPINT.RFCTable.TableField> fieldList = new List<SAPINT.RFCTable.TableField>();

        public FormGenerateTableClass()
        {
            InitializeComponent();
            SAPINT.Gui.CDataGridViewUtils.CopyPasteDataGridView(dgvFieldList);

            this.cbxSystemList.DataSource      = SAPINT.SAPLogonConfigList.SystemNameList;
            this.textBoxTemplate.Document.Text =
                @"public class $rfctable.Name
{
#foreach($field in $rfctable.Fields)
#if(true == $field.selected)
	public $field.DOTNETTYPE $field.FIELDNAME {get;set;} // $field.FIELDTEXT
#end
#end
}";
            Alsing.SourceCode.SyntaxDefinition sl = new Alsing.SourceCode.SyntaxDefinitionLoader().Load("SyntaxFiles\\CSharp.syn");
            this.textBoxTemplate.Document.Parser.Init(sl);
            this.textBoxResult.Document.Parser.Init(sl);
        }
        // List<SAPINT.RFCTable.TableField> fieldList = new List<SAPINT.RFCTable.TableField>();
        public FormGenerateTableClass()
        {
            InitializeComponent();
            SAPINT.Gui.CDataGridViewUtils.CopyPasteDataGridView(dgvFieldList);

            this.cbxSystemList.DataSource = SAPINT.SAPLogonConfigList.SystemNameList;
            this.textBoxTemplate.Document.Text =
            @"public class $rfctable.Name
            {
            #foreach($field in $rfctable.Fields)
            #if(true == $field.selected)
            public $field.DOTNETTYPE $field.FIELDNAME {get;set;} // $field.FIELDTEXT
            #end
            #end
            }";
            Alsing.SourceCode.SyntaxDefinition sl = new Alsing.SourceCode.SyntaxDefinitionLoader().Load("SyntaxFiles\\CSharp.syn");
            this.textBoxTemplate.Document.Parser.Init(sl);
            this.textBoxResult.Document.Parser.Init(sl);
        }
 /// <summary>The set syntax.</summary>
 /// <param name="name">The name.</param>
 public void SetSyntax(string name)
 {
     LoadHighlightingProvider();
     // txtEdit.SetHighlighting(name);
     Alsing.SourceCode.SyntaxDefinition sl;
     var fileName = string.Empty;
     fileName = "SyntaxFiles\\" + name + ".syn";
     sl = new Alsing.SourceCode.SyntaxDefinitionLoader().Load(fileName);
     this.txtEdit.Document.Parser.Init(sl);
 }
        private void loadSynFile(string text)
        {
            if (String.IsNullOrEmpty(text))
            {
                return;
            }
            try
            {
                Alsing.SourceCode.SyntaxDefinition sl;
                var fileName = string.Empty;
                fileName = "SyntaxFiles\\" + text + ".syn";
                sl = new Alsing.SourceCode.SyntaxDefinitionLoader().Load(fileName);
                this.syntaxBoxControl1.Document.Parser.Init(sl);
            }
            catch (Exception ex)
            {

                MessageBox.Show(ex.Message);
            }
        }
        private void prettyCode()
        {
            Alsing.SourceCode.SyntaxDefinition sl = new Alsing.SourceCode.SyntaxDefinitionLoader().Load("SyntaxFiles\\abap.syn");

            this.textResultCode.Document.Parser.Init(sl);
            this.textTemplate.Document.Parser.Init(sl);
        }