diff --git a/CobXmlSupport/GenCobCode.cs b/CobXmlSupport/GenCobCode.cs index d463264..bac1cbb 100644 --- a/CobXmlSupport/GenCobCode.cs +++ b/CobXmlSupport/GenCobCode.cs @@ -831,7 +831,8 @@ namespace CobXmlSupport savedFile SF = new savedFile(); SF.idConnect = "A472C801-2A7A-4A09-B432-8F16504964C3"; - SF.usageName = "Usage007.cpy"; + SF.usageName = S.ettingActualFile.Substring(0, S.ettingActualFile.LastIndexOf(".")) + "_Init"; + SF.fNameSaved = "Init_" + S.ettingActualFile.Substring(0, S.ettingActualFile.LastIndexOf(".")) + ".cbl"; genCode.SavedFile = SF; @@ -887,7 +888,8 @@ namespace CobXmlSupport savedFile SF = new savedFile(); SF.idConnect = "15E1040B-2206-4F02-8212-FE9DF6B209B8"; - SF.usageName = "Usage008.cpy"; + SF.usageName = S.ettingActualFile.Substring(0, S.ettingActualFile.LastIndexOf(".")) + "_Init"; + SF.fNameSaved = "Init_" + S.ettingActualFile.Substring(0, S.ettingActualFile.LastIndexOf(".")) + ".cbl"; genCode.SavedFile = SF; string inFile = cmbLastFile.Text.Substring(cmbLastFile.Text.LastIndexOf("\\") + 1); @@ -1213,6 +1215,10 @@ namespace CobXmlSupport tmpGS.SetSettings(); setLocalValues(); } + else + { + S.ettingList = null; + } runXMLgen(); } @@ -1682,7 +1688,8 @@ namespace CobXmlSupport savedFile SF = new savedFile(); SF.idConnect = "9C3E8CC7-FA20-4E11-8E81-73BE8D2E9CFB"; - SF.usageName = "Usage002.cpy"; + SF.usageName = S.ettingActualFile.Substring(0, S.ettingActualFile.LastIndexOf(".")) + "_Unload"; + SF.fNameSaved = "Unload_" + S.ettingActualFile.Substring(0, S.ettingActualFile.LastIndexOf(".")) + ".cbl"; fromMoves.SavedFile = SF; bool adj = false; @@ -1859,7 +1866,8 @@ namespace CobXmlSupport savedFile SF = new savedFile(); SF.idConnect = "0A975654-75C6-4A8C-8534-AA16F46BC740"; - SF.usageName = "Usage003.cpy"; + SF.usageName = S.ettingActualFile.Substring(0, S.ettingActualFile.LastIndexOf(".")) + "_Transfer"; + SF.fNameSaved = "Transfer_" + S.ettingActualFile.Substring(0, S.ettingActualFile.LastIndexOf(".")) + ".cbl"; fromMoves.SavedFile = SF; bool adj = false; @@ -2114,7 +2122,8 @@ namespace CobXmlSupport savedFile SF = new savedFile(); SF.idConnect = "598A5F20-9A8A-415D-81B2-BBFE04465381"; - SF.usageName = "Usage004.cpy"; + SF.usageName = S.ettingActualFile.Substring(0, S.ettingActualFile.LastIndexOf(".")) + "_Unload"; + SF.fNameSaved = "Unload_" + S.ettingActualFile.Substring(0, S.ettingActualFile.LastIndexOf(".")) + ".cbl"; fromToMoves.SavedFile = SF; @@ -2254,7 +2263,8 @@ namespace CobXmlSupport savedFile SF = new savedFile(); SF.idConnect = "DD5A8C24-C322-4901-85B5-776DD6E21FB9"; - SF.usageName = "Usage005.cpy"; + SF.usageName = "Cobol_Reserved_Words"; + SF.fNameSaved = "Cobol_Reserved_Words.txt"; fromToMoves.SavedFile = SF; foreach (string str in CobResWords.ToArray()) @@ -2289,6 +2299,7 @@ namespace CobXmlSupport savedFile localSaver = new savedFile(); localSaver.idConnect = "4B0E5C02-B2D0-4755-B4EC-AF449D513582"; localSaver.usageName = "XMLCOBfrom_"+S.ettingActualFile; + localSaver.fNameSaved = S.ettingActualFile.Substring(0, S.ettingActualFile.LastIndexOf(".")) + "_COBXML.cpy"; srcf.SavedFile = localSaver; srcf.FileData = this.outCob.Text; srcf.ShowDialog(); @@ -2314,7 +2325,10 @@ namespace CobXmlSupport savedFile SF = new savedFile(); SF.idConnect = "1C1FAE9D-39DD-4A24-A6C2-8696EAE3CB32"; - SF.usageName = "Usage006.cpy"; + SF.usageName = ""; + SF.usageName = S.ettingActualFile.Substring(0, S.ettingActualFile.LastIndexOf(".")) + "_Crossref"; + SF.fNameSaved = "Crossref_" + S.ettingActualFile.Substring(0, S.ettingActualFile.LastIndexOf(".")) + ".txt"; + fromToMoves.SavedFile = SF; foreach (CobRow cr in rowList) diff --git a/CobXmlSupport/GenSetting.cs b/CobXmlSupport/GenSetting.cs index fe62df3..09a9477 100644 --- a/CobXmlSupport/GenSetting.cs +++ b/CobXmlSupport/GenSetting.cs @@ -93,6 +93,7 @@ namespace CobXmlSupport S.ettingValues = this.Values; S.ettingWrap = this.Wrap; S.ettingShowTestbtns = this.ShowTestbtns; + S.ettingList = null; if (this.fileList != null) { foreach (savedFile locSF in this.fileList) diff --git a/CobXmlSupport/S.cs b/CobXmlSupport/S.cs index 9181f13..ed1d5f1 100644 --- a/CobXmlSupport/S.cs +++ b/CobXmlSupport/S.cs @@ -59,10 +59,20 @@ namespace CobXmlSupport public class savedFile : ICloneable { + public savedFile() + { + idConnect=""; + usageName=""; + directorySaved=""; + fNameSaved=""; + saveDate = DateTime.MinValue; + } + public string idConnect; public string usageName; public string directorySaved; public string fNameSaved; + public DateTime saveDate; public object Clone() diff --git a/CobXmlSupport/SaveRegCopyFile.cs b/CobXmlSupport/SaveRegCopyFile.cs index 1403bd9..511ff4b 100644 --- a/CobXmlSupport/SaveRegCopyFile.cs +++ b/CobXmlSupport/SaveRegCopyFile.cs @@ -43,6 +43,7 @@ namespace CobXmlSupport try { File.WriteAllText(saveFileDialog.FileName, FileData); + SavedFile.saveDate = DateTime.Now; savedFile tmpSF = new savedFile(); tmpSF = (savedFile)SavedFile.Clone(); S.ettingListAdd(tmpSF);