diff --git a/CobXmlSupport/GenCobCode.cs b/CobXmlSupport/GenCobCode.cs index 9e10c57..62ae087 100644 --- a/CobXmlSupport/GenCobCode.cs +++ b/CobXmlSupport/GenCobCode.cs @@ -1940,255 +1940,6 @@ namespace CobXmlSupport return resStr; } - ////****************************************************************************************** - //// Ny branch newXmlMove created **************************** - ////****************************************************************************************** - - //private void CreateMoveDataFromTo() - //{ - // Dictionary indexNames = new Dictionary(); - // string IndVarText = " *------------------- From - To --------------------*\r\n * Extra indexvariabler för occurs-taggar --------*\r\n *--------------------------------------------------*"; - // string aktIndList = "", slask = "", slask2 = "", slask3 = "", slask4 = ""; - // string occParIndRows = ""; - // IndexState Is = new IndexState(indexNames, rowList, false); - // fromToMoves = new ShowCode(); - // fromToMoves.FormParent = this; - // fromToMoves.Labeltext = "Creating \"move From - To\" Code"; - - // savedFile SF = new savedFile(); - // SF.idConnect = "0A975654-75C6-4A8C-8534-AA16F46BC740"; - // SF.usageName = S.ettingActualFile.Substring(0, S.ettingActualFile.LastIndexOf(".")) + "_Transfer"; - // SF.fNameSaved = S.ettingActualFile.Substring(0, S.ettingActualFile.LastIndexOf(".")) + "_Transfer.cbl"; - // fromToMoves.SavedFile = SF; - - // bool adj = false; - // bool valueSwitch = false; - - // foreach (CobRow cr in rowList) - // { - - // string occParRows = ""; - // if (cr.CobLevel < 2) - // { - // string inFile = cmbLastFile.Text.Substring(cmbLastFile.Text.LastIndexOf("\\") + 1); - // CreateComment(fromToMoves.CodeShower, "Moves from " + cr.FieldName, S.ettingUserName, S.ettingCompany, inFile); - // } - // if (okToCode(cr)) - // { - // if (cr.CountIn.Length > 0 || chkAttribs.Checked && cr.isAttribute) - // { - // adj = true; - // string fejkRow = ""; - // CobRow crChk = cr; - // indTemp = ""; - // aktIndList = ""; - // //Debug.WriteLine(cr.FieldName); - // while (crChk.LevelParent != null) - // { - // fejkRow += "\r\n OF " + crChk.FieldName; - // fejkRow = checkForOccurs(indexNames, crChk, fromToMoves.CodeShower.Text, ref occParRows, ref aktIndList); - // crChk = crChk.LevelParent; - // } - // // Here a test giving header for new iter-group would be created - // slask4 = Is.PresentStrings(aktIndList); - - // if (slask4.Contains("END-P") && slask4.Contains("VARYING")) - // { - // fromToMoves.CodeShower.Text += slask4.Substring(0, slask4.IndexOf("\r\n", 2)); - // slask4 = slask4.Substring(slask4.IndexOf("\r\n", 2)); - // } - - // if ((slask4.Length > 0) && (slask4.Contains("VARYING"))) - // { - // // Is.ExtraParam innehåller här aktuell count-variabel med correcta index variabler - // fromToMoves.CodeShower.Text += "\r\n " + adjustIf(adj) + "MOVE " + Is.ExtraParam; - // slask3 = Is.ExtraParam; - // int prefixPos = slask3.IndexOf(S.ettingPrefix); - // slask3 = slask3.Substring(0, prefixPos) + S.ettingExpPrefix + slask3.Substring(prefixPos + S.ettingPrefix.Length); - // fromToMoves.CodeShower.Text += "\r\n " + adjustIf(adj) + "TO " + slask3; - // } - - // fromToMoves.CodeShower.Text += slask4; - // // aktIndList = reduceIndList(aktIndList, indTemp); nödvändig ? - // // Until here--- - - // valueSwitch = cr.FieldName.Contains("_Valu") || cr.isOccurs; - // if (!valueSwitch) - // { - // fromToMoves.CodeShower.Text += "\r\n IF " + cr.CountIn; - // occParIndRows = cr.isOccurs && occParRows.Contains(",") ? occParRows.Substring(0, occParRows.LastIndexOf(",")) : occParRows; - - // if (occParIndRows.Length > 0) - // { - // fromToMoves.CodeShower.Text += "\r\n " + adjustIf(adj) + "(" + occParIndRows + " )"; - // } - - // fromToMoves.CodeShower.Text += "\r\n > 0"; - // } - // occParRows = ""; - - // } - // // - // // Start move ----------------------------------------------------------- - // // - // CobRow crTmp = cr; - // fromToMoves.CodeShower.Text += "\r\n " + adjustIf(adj) + "MOVE " + cr.FieldName; - - // fromToMoves.CodeShower.Text = checkForOccurs( - // indexNames, - // cr, - // fromToMoves.CodeShower.Text, - // ref occParRows, - // ref slask, - // false, - // adj); - - // while (crTmp.LevelParent != null) - // { - // crTmp = crTmp.LevelParent; - // fromToMoves.CodeShower.Text += "\r\n " + adjustIf(adj) + " OF " + crTmp.FieldName; - // fromToMoves.CodeShower.Text = checkForOccurs( - // indexNames, - // crTmp, - // fromToMoves.CodeShower.Text, - // ref occParRows, - // ref slask, - // false, - // adj); - // } - // if (occParRows.Length > 0) - // { - // fromToMoves.CodeShower.Text += "\r\n " + adjustIf(adj) + "(" + occParRows + " )"; - // } - - // // - // // Start section----------------------------------------------------------- - // // - // fromToMoves.CodeShower.Text += "\r\n " + adjustIf(adj) + "TO "; - // occParRows = ""; - // CobRow crTmpx = cr; - // fromToMoves.CodeShower.Text += "\r\n " + adjustIf(adj) + - // crTmpx.FieldName.Replace(S.ettingPrefix, S.ettingExpPrefix); - - // fromToMoves.CodeShower.Text = checkForOccurs( - // indexNames, - // crTmpx, - // fromToMoves.CodeShower.Text, - // ref occParRows, - // ref slask2, - // false, - // adj); - - // while (crTmpx.LevelParent != null) - // { - // crTmpx = crTmpx.LevelParent; - // fromToMoves.CodeShower.Text += "\r\n " + adjustIf(adj) + "OF " + - // crTmpx.FieldName.Replace(S.ettingPrefix, S.ettingExpPrefix); - // fromToMoves.CodeShower.Text = checkForOccurs( - // indexNames, - // crTmpx, - // fromToMoves.CodeShower.Text, - // ref occParRows, - // ref slask2, - // false, - // adj); - // } - // if (occParRows.Length > 0) - // { - // fromToMoves.CodeShower.Text += "\r\n " + adjustIf(adj) + "(" + occParRows; - // fromToMoves.CodeShower.Text += "\r\n " + adjustIf(adj) + ")"; - // } - - // if (cr.CountIn.Length > 0) - // { - // if (!valueSwitch) - // { - // if (chkDisplays.Checked) - // { - // // - // // Move count indicators from in-area to out-area - // // - // fromToMoves.CodeShower.Text += "\r\n MOVE "; - // fromToMoves.CodeShower.Text += cr.CountIn; - // if (occParIndRows.Length > 0) - // { - // fromToMoves.CodeShower.Text += "\r\n " + adjustIf(adj) + "(" + occParIndRows + " )"; - // } - // fromToMoves.CodeShower.Text += "\r\n " + " TO " - // + cr.CountIn.Replace(S.ettingPrefix, S.ettingExpPrefix); - // if (occParIndRows.Length > 0) - // { - // fromToMoves.CodeShower.Text += "\r\n " + adjustIf(adj) + "(" + occParIndRows + " )"; - // } - // } - - // CobRow crtmp = cr; - // while (crtmp.LevelParent != null) - // { - // crtmp = crtmp.LevelParent; - // } - - // fromToMoves.CodeShower.Text += "\r\n ELSE "; - // fromToMoves.CodeShower.Text += "\r\n MOVE 0 TO "; - - // fromToMoves.CodeShower.Text += cr.CountIn.Replace(S.ettingPrefix, S.ettingExpPrefix); - // if (occParIndRows.Length > 0) - // { - // fromToMoves.CodeShower.Text += " (" + occParIndRows + " )"; - // } - - // fromToMoves.CodeShower.Text += "\r\n END-IF "; - // } - // } - // } - // //ändring - // fromToMoves.CodeShower.Text += Is.PresentStrings(aktIndList); - // //ändring - // } - - // fromToMoves.CodeShower.Text += Is.PresentStrings(""); - - // fromToMoves.CodeShower.Text = " 01 MoveToNumVar PIC 9(12).\r\n" + fromToMoves.CodeShower.Text; - // fromToMoves.CodeShower.Text = "\r\n 01 MoveToStringVar PIC X(500).\r\n" + fromToMoves.CodeShower.Text; - // fromToMoves.CodeShower.Text = addOccursVars(indexNames, fromToMoves.CodeShower.Text, IndVarText); - - // tmpRowList = new List(); - // foreach (string frmRow in fromToMoves.CodeShower.Lines) - // { - // tmpRowList.Add(new CobRow(frmRow, false)); - // } - // fromToMoves.CodeShower.Text = ""; - // tmpRowList.ForEach(delegate(CobRow crtmp) - // { - // fromToMoves.CodeShower.Text += crtmp.wrapped() + "\r\n"; - // }); - //} - - //private bool okToCode(CobRow cr) - //{ - // bool lOk = false; - // if (chkAttribs.Checked) - // lOk = !cr.SampleStr.Equals(NOMOVE); - // else - // lOk = !cr.isAttribute && !cr.SampleStr.Equals(NOMOVE); - // return lOk; - //} - - //private void chkNewArea_CheckedChanged(object sender, EventArgs e) - //{ - // Point locTemp = chkDisplays.Location; - // if (chkNewArea.Checked) - // { - // chkDisplays.Text = "Move counts"; - // chkAttribs.Visible = true; - // } - // else - // { - // chkDisplays.Text = "(Displays)"; - // chkAttribs.Visible = false; - // } - // chkDisplays.Location = locTemp; - //} private void outCob_KeyDown(object sender, KeyEventArgs e) {