backup switch, adjustment codeintegration

This commit is contained in:
2015-01-15 12:11:08 +01:00
parent bc880ed2ed
commit ac8375e78c
9 changed files with 108 additions and 14 deletions

View File

@ -1049,6 +1049,7 @@ namespace CobXmlSupport
setWindow.LogPost = S.ettingLogVarName;
setWindow.LogSection = S.ettingLogSectName;
setWindow.ChkShowTestbtns = S.ettingSpecials;
setWindow.ChkBackupOwnCode = S.ettingUserCodeBcup;
setWindow.ShowDialog();
S.ettingUserName = setWindow.UserName;
@ -1068,6 +1069,7 @@ namespace CobXmlSupport
S.ettingLogVarName = setWindow.LogPost;
S.ettingLogSectName = setWindow.LogSection;
S.ettingSpecials = setWindow.ChkShowTestbtns;
S.ettingUserCodeBcup = setWindow.ChkBackupOwnCode;
chkAnaTag.Checked = S.ettingAnaTag;
chkCountVars.Checked = S.ettingCountVars;
@ -1082,6 +1084,8 @@ namespace CobXmlSupport
txtPrefix.Text = S.ettingPrefix;
txtExpPrefix.Text = S.ettingExpPrefix;
btnTestThings.Visible = S.ettingSpecials;
chkBackupVars.Checked = S.ettingUserCodeBcup;
eventRun = false;
runXMLgen();
@ -1185,7 +1189,15 @@ namespace CobXmlSupport
// Until here---
genExtMoves.CodeShower.Text += "\r\n MOVE 0 TO " + cr.CountIn;
genExtMoves.CodeShower.Text += "\r\n MOVE ";
if (cr.MoveCode.Trim().Length != 0)
genExtMoves.CodeShower.Text += "1";
else
genExtMoves.CodeShower.Text += "0";
genExtMoves.CodeShower.Text += " TO " + cr.CountIn;
if (occParRows.Length > 0)
{
genExtMoves.CodeShower.Text += " (" + occParRows + " )";
@ -1203,17 +1215,27 @@ namespace CobXmlSupport
CobRow crTmp = cr;
struktMove += "\r\n " + "".PadLeft(prfNiv) + " <" + cr.TagName.Replace("\"", "") + "> (" + cr.FieldName + ")";
genExtMoves.CodeShower.Text += "\r\n " + adjustIf(adj) + "MOVE ";
genExtMoves.CodeShower.Text += "\r\n " + adjustIf(adj);
//------------- move from --------------
if (cr.FieldDef.ToUpper().IndexOf("X") > -1)
if (cr.MoveCode.Length > 1 && cr.MoveCode != " ")
{
genExtMoves.CodeShower.Text += "MoveToStringVar ";
if (cr.MoveCode.ToUpper().Contains("MOVE")) {}
else genExtMoves.CodeShower.Text += "MOVE ";
genExtMoves.CodeShower.Text += cr.MoveCode;
}
else
{
genExtMoves.CodeShower.Text += "MoveToNumVar ";
if (cr.FieldDef.ToUpper().IndexOf("X") > -1)
{
genExtMoves.CodeShower.Text += "MOVE MoveToStringVar ";
}
else
{
genExtMoves.CodeShower.Text += "MOVE MoveToNumVar ";
}
}
genExtMoves.CodeShower.Text += " *> #" + cr.FieldName + "#";
genExtMoves.CodeShower.Text += "\r\n " + adjustIf(adj) + " *> #" + cr.FieldName + "#";
//------------- move to ---------------
genExtMoves.CodeShower.Text += "\r\n " + adjustIf(adj) + "TO " + cr.FieldName;
genExtMoves.CodeShower.Text = checkForOccurs(indexNames, cr, genExtMoves.CodeShower.Text, ref occParRows, ref slask, false, adj);