Integration 2.1.1.4:
- Rimozione lettura file Iso e generazione file CN - Aggiunta lettura file Iso (passato dal parametro OutputFilename), solo se UIMode=HIDDEN, e scrittura del contenuto nel parametro stringa Iso
This commit is contained in:
@@ -178,26 +178,38 @@ namespace ib.essetre.integration.egaltech
|
||||
string percorsoDirBTL = parameters.Read("EGALTECH", "DIR_BTL", "");
|
||||
string filePath = btlObject.writeIntoFile(parameters.Patterns[i].IsFromProject, percorsoDirBTL);
|
||||
|
||||
//Lettura Iso e generazione file CN
|
||||
string[] lines = System.IO.File.ReadAllLines("C:\\TechnoEssetre7\\Catalog\\Iso\\000003\\1.xpi"); // parameters.Patterns[i].OutputFilename); //"C:\\TechnoEssetre7\\Catalog\\Iso\\000003\\1.xpi"
|
||||
string txtToXpi = filePath.Replace(".btl", ".txt");
|
||||
using (var txtWrite = new StreamWriter(txtToXpi, false))
|
||||
//Lettura OutputFilename e scrittura nel parametro stringa Iso (solo nel caso UIModes.HIDDEN)
|
||||
if (parameters.UIMode == InOutParameters.UIModes.HIDDEN)
|
||||
{
|
||||
foreach (string line in lines)
|
||||
string[] lines = System.IO.File.ReadAllLines(parameters.Patterns[i].OutputFilename); //"C:\\TechnoEssetre7\\Catalog\\Iso\\000003\\1.xpi"
|
||||
var sb = new System.Text.StringBuilder();
|
||||
for (int line = 0; line < lines.Length; line ++)
|
||||
{
|
||||
txtWrite.WriteLine(line);
|
||||
sb.AppendLine(lines[line].ToString());
|
||||
}
|
||||
}
|
||||
if (File.Exists(txtToXpi.Replace(".txt", ".xpi")))
|
||||
File.Delete(txtToXpi.Replace(".txt", ".xpi"));
|
||||
File.Move(txtToXpi, Path.ChangeExtension(txtToXpi, ".xpi"));
|
||||
//string fileCN = String.Format("{0}.xpi", txtToXpi);
|
||||
parameters.Patterns[i].Iso += sb.ToString();
|
||||
|
||||
DateTime d1 = File.GetLastWriteTime(txtToXpi.Replace(".txt", ".xpi"));
|
||||
DateTime d2 = File.GetLastWriteTime(filePath);
|
||||
if (DateTime.Compare(d1, d2) >= 0){
|
||||
//Se la data modifica del file .xpi è più recente del BTL: OK, restuirlo alla stringa Iso, altrimenti niente, non restituirlo a Iso
|
||||
parameters.Patterns[i].Iso = txtToXpi.Replace(".txt", ".xpi");
|
||||
//Lascio qui di seguito commentato ciò che facevamo prima, ovvero
|
||||
//scrivere il file .xpi e salvarne il percorso in Iso
|
||||
//string txtToXpi = filePath.Replace(".btl", ".txt");
|
||||
//using (var txtWrite = new StreamWriter(txtToXpi, false))
|
||||
//{
|
||||
// foreach (string line in lines)
|
||||
// {
|
||||
// txtWrite.WriteLine(line);
|
||||
// }
|
||||
//}
|
||||
//if (File.Exists(txtToXpi.Replace(".txt", ".xpi")))
|
||||
// File.Delete(txtToXpi.Replace(".txt", ".xpi"));
|
||||
//File.Move(txtToXpi, Path.ChangeExtension(txtToXpi, ".xpi"));
|
||||
////string fileCN = String.Format("{0}.xpi", txtToXpi);
|
||||
//DateTime d1 = File.GetLastWriteTime(txtToXpi.Replace(".txt", ".xpi"));
|
||||
//DateTime d2 = File.GetLastWriteTime(filePath);
|
||||
//if (DateTime.Compare(d1, d2) >= 0)
|
||||
//{
|
||||
// //Se la data modifica del file .xpi è più recente del BTL: OK, restuirlo alla stringa Iso, altrimenti niente, non restituirlo a Iso
|
||||
// parameters.Patterns[i].Iso = txtToXpi.Replace(".txt", ".xpi");
|
||||
//}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -36,5 +36,5 @@ using System.Runtime.InteropServices;
|
||||
// È possibile specificare tutti i valori oppure impostare valori predefiniti per i numeri relativi alla revisione e alla build
|
||||
// usando l'asterisco '*' come illustrato di seguito:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("2.1.1.3")]
|
||||
[assembly: AssemblyFileVersion("2.1.1.3")]
|
||||
[assembly: AssemblyVersion("2.1.1.4")]
|
||||
[assembly: AssemblyFileVersion("2.1.1.4")]
|
||||
|
||||
Reference in New Issue
Block a user