Example #1
0
        private void btnDefaultXslt_Click(object sender, EventArgs e)
        {
            rtbXslt.Text  = "<?xml version=\"1.0\" encoding=\"utf-8\"?>" + Environment.NewLine;
            rtbXslt.Text += "<xsl:stylesheet version=\"1.0\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" xmlns:msxsl=\"urn:schemas-microsoft-com:xslt\" exclude-result-prefixes=\"msxsl\">" + Environment.NewLine;
            rtbXslt.Text += "  <xsl:output method=\"text\" indent=\"yes\"/>" + Environment.NewLine;

            rtbXslt.Text += "  <xsl:template match=\"Interchange\">" + Environment.NewLine;
            rtbXslt.Text += "  <xsl:apply-templates select=\"XPATH1\"/>" + Environment.NewLine;
            rtbXslt.Text += "  <xsl:apply-templates select=\"XPATH2\"/>" + Environment.NewLine;


            rtbXslt.Text += Environment.NewLine;

            rtbXslt.Text += "    <xsl:template match=\"XPATH1\">" + Environment.NewLine;
            rtbXslt.Text += "      ..." + Environment.NewLine;
            rtbXslt.Text += "      ..." + Environment.NewLine;
            rtbXslt.Text += "    </xsl:template>" + Environment.NewLine;

            rtbXslt.Text += "    <xsl:template match=\"XPATH2\">" + Environment.NewLine;
            rtbXslt.Text += "      ..." + Environment.NewLine;
            rtbXslt.Text += "      ..." + Environment.NewLine;
            rtbXslt.Text += "    </xsl:template>" + Environment.NewLine;
            rtbXslt.Text += "</xsl:stylesheet>" + Environment.NewLine;
            SyntaxHighLighter.HighLight(rtbXslt, _blueKeyWords, _redKeyWords);
        }
Example #2
0
        private void btnLoadSamples_Click(object sender, EventArgs e)
        {
            frmConfig3Extension ediSamples = new frmConfig3Extension();

            if (ediSamples.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                txtSampleFile.Text = ediSamples.EDIFileName;
                rtbXslt.Text       = ediSamples.Xslt;
                SyntaxHighLighter.HighLight(rtbXslt, _blueKeyWords, _redKeyWords);
            }
        }
Example #3
0
 private void btnImport_Click(object sender, EventArgs e)
 {
     openFileDialog.Filter = "XSLT files|*.xslt|All files|*.*";
     if (openFileDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
     {
         using (StreamReader sr = new StreamReader(openFileDialog.FileName))
         {
             rtbXslt.Text = sr.ReadToEnd();
             sr.Close();
             SyntaxHighLighter.HighLight(rtbXslt, _blueKeyWords, _redKeyWords);
         }
     }
 }
Example #4
0
        private void BindDataPullSql()
        {
            List <IdpeKey> keys = new Manager().GetApplicationKeys(DataSourceId, false);

            cmbConnectionString.Text             = keys.GetKeyValue(IdpeKeyTypes.PullSqlConnectionString);
            txtRunTimeCononectionStringName.Text = keys.GetKeyValue(IdpeKeyTypes.PullSqlConnectionStringRunTime);
            string strSqlWatchInterval = keys.GetKeyValue(IdpeKeyTypes.SqlWatchInterval);

            numUpDnIntervalSql.Value    = (decimal)(!string.IsNullOrEmpty(strSqlWatchInterval) ? strSqlWatchInterval.ParseInt() : 2);
            PullSqlReturnType           = keys.GetKeyValue(IdpeKeyTypes.PullSqlReturnType);
            txtQuerySelect.Text         = keys.GetKeyValue(IdpeKeyTypes.SqlQuery);
            txtQueryUpdate.Text         = keys.GetKeyValue(IdpeKeyTypes.SqlUpdateQueryProcessing);
            txtQueryRecovery.Text       = keys.GetKeyValue(IdpeKeyTypes.SqlUpdateQueryRecovery);
            chkFirstRowIsHeader.Checked = bool.Parse(keys.GetKeyValue(IdpeKeyTypes.IsFirstRowHeader));
            txtInterfaceName.Text       = keys.GetKeyValue(IdpeKeyTypes.PullSqlInterfaceName);
            toolTip.SetToolTip(txtInterfaceName, keys.GetKeyValue(IdpeKeyTypes.PullSqlInterfaceName));

            SyntaxHighLighter.HighLight(txtQuerySelect);
            SyntaxHighLighter.HighLight(txtQueryUpdate);
            SyntaxHighLighter.HighLight(txtQueryRecovery);
        }
Example #5
0
        private void BindData()
        {
            Manager       manager = new Manager();
            SreDataSource ds      = manager.GetApplicationDetails(DataSourceId);

            if ((ds.Delimiter != null) &&
                (ds.Delimiter.ToLower() == "\t"))
            {
                cmbDelmiter.Text = "Tab";
            }
            else
            {
                cmbDelmiter.Text = ds.Delimiter;
            }

            List <SreKey> keys = manager.GetKeys(DataSourceId);

            rtbXslt.Text = keys.GetKeyValue(SreKeyTypes.EDIX12Xslt);
            SyntaxHighLighter.HighLight(rtbXslt, _blueKeyWords, _redKeyWords);

            string strHeader = keys.GetKeyValue(SreKeyTypes.IsFirstRowHeader);

            if (!string.IsNullOrEmpty(strHeader))
            {
                bool boolVal = false;
                bool.TryParse(strHeader, out boolVal);
                chkFileHasHeader.Checked = boolVal;
            }
            chkRenameHeaders.Enabled = chkFileHasHeader.Checked;

            string strRenCol = keys.GetKeyValue(SreKeyTypes.RenameColumnHeader);

            if (!string.IsNullOrEmpty(strRenCol))
            {
                bool boolVal = false;
                bool.TryParse(strRenCol, out boolVal);
                chkRenameHeaders.Checked = boolVal;
            }
        }
Example #6
0
 private void timerIdle_Tick(object sender, EventArgs e)
 {
     SyntaxHighLighter.HighLight(rtbXslt, _blueKeyWords, _redKeyWords);
 }
Example #7
0
 private void txtQueryRecovery_TextChanged(object sender, EventArgs e)
 {
     btnTestRecoveryQuery.Enabled = string.IsNullOrEmpty(txtQueryRecovery.Text) ? false : true;
     SyntaxHighLighter.HighLight(sender as RichTextBox);
 }