From 92a78e147414088cae4f8eede5b433c7702a2c5a Mon Sep 17 00:00:00 2001 From: michele Date: Fri, 25 Jul 2025 09:49:11 +0200 Subject: [PATCH] Commit prova --- ConvertiXML.sln | 25 + ConvertiXML/App.config | 6 + ConvertiXML/ConvertiXML.csproj | 84 +++ ConvertiXML/DictionaryExtensions.cs | 12 + ConvertiXML/MainForm.Designer.cs | 316 +++++++++ ConvertiXML/MainForm.cs | 666 +++++++++++++++++++ ConvertiXML/MainForm.resx | 120 ++++ ConvertiXML/Program.cs | 22 + ConvertiXML/Properties/AssemblyInfo.cs | 33 + ConvertiXML/Properties/Resources.Designer.cs | 71 ++ ConvertiXML/Properties/Resources.resx | 117 ++++ ConvertiXML/Properties/Settings.Designer.cs | 30 + ConvertiXML/Properties/Settings.settings | 7 + 13 files changed, 1509 insertions(+) create mode 100644 ConvertiXML.sln create mode 100644 ConvertiXML/App.config create mode 100644 ConvertiXML/ConvertiXML.csproj create mode 100644 ConvertiXML/DictionaryExtensions.cs create mode 100644 ConvertiXML/MainForm.Designer.cs create mode 100644 ConvertiXML/MainForm.cs create mode 100644 ConvertiXML/MainForm.resx create mode 100644 ConvertiXML/Program.cs create mode 100644 ConvertiXML/Properties/AssemblyInfo.cs create mode 100644 ConvertiXML/Properties/Resources.Designer.cs create mode 100644 ConvertiXML/Properties/Resources.resx create mode 100644 ConvertiXML/Properties/Settings.Designer.cs create mode 100644 ConvertiXML/Properties/Settings.settings diff --git a/ConvertiXML.sln b/ConvertiXML.sln new file mode 100644 index 0000000..a7a4b69 --- /dev/null +++ b/ConvertiXML.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.14.36203.30 d17.14 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConvertiXML", "ConvertiXML\ConvertiXML.csproj", "{99DD108A-9FD9-45DE-818B-11AB1DAB7538}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {99DD108A-9FD9-45DE-818B-11AB1DAB7538}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {99DD108A-9FD9-45DE-818B-11AB1DAB7538}.Debug|Any CPU.Build.0 = Debug|Any CPU + {99DD108A-9FD9-45DE-818B-11AB1DAB7538}.Release|Any CPU.ActiveCfg = Release|Any CPU + {99DD108A-9FD9-45DE-818B-11AB1DAB7538}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {46A48786-1F9E-46D4-BFC0-9D9E74527198} + EndGlobalSection +EndGlobal diff --git a/ConvertiXML/App.config b/ConvertiXML/App.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/ConvertiXML/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ConvertiXML/ConvertiXML.csproj b/ConvertiXML/ConvertiXML.csproj new file mode 100644 index 0000000..ab0c892 --- /dev/null +++ b/ConvertiXML/ConvertiXML.csproj @@ -0,0 +1,84 @@ + + + + + Debug + AnyCPU + {99DD108A-9FD9-45DE-818B-11AB1DAB7538} + WinExe + ConvertiXML + ConvertiXML + v4.7.2 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + Form + + + MainForm.cs + + + + + MainForm.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + \ No newline at end of file diff --git a/ConvertiXML/DictionaryExtensions.cs b/ConvertiXML/DictionaryExtensions.cs new file mode 100644 index 0000000..0cc49fa --- /dev/null +++ b/ConvertiXML/DictionaryExtensions.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ConvertiXML +{ + internal class DictionaryExtensions + { + } +} diff --git a/ConvertiXML/MainForm.Designer.cs b/ConvertiXML/MainForm.Designer.cs new file mode 100644 index 0000000..71e60ef --- /dev/null +++ b/ConvertiXML/MainForm.Designer.cs @@ -0,0 +1,316 @@ +namespace ConvertiXML +{ + partial class MainForm + { + /// + /// Variabile di progettazione necessaria. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Pulire le risorse in uso. + /// + /// ha valore true se le risorse gestite devono essere eliminate, false in caso contrario. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Codice generato da Progettazione Windows Form + + /// + /// Metodo necessario per il supporto della finestra di progettazione. Non modificare + /// il contenuto del metodo con l'editor di codice. + /// + private void InitializeComponent() + { + this.lbAanagcesp = new System.Windows.Forms.Label(); + this.lblAgest = new System.Windows.Forms.Label(); + this.lblAmovm = new System.Windows.Forms.Label(); + this.lblAcateg = new System.Windows.Forms.Label(); + this.lblCsv_anag = new System.Windows.Forms.Label(); + this.lblCsv_mov = new System.Windows.Forms.Label(); + this.txtAanagcesp = new System.Windows.Forms.TextBox(); + this.txtAmovm = new System.Windows.Forms.TextBox(); + this.txtAgest = new System.Windows.Forms.TextBox(); + this.txtAcateg = new System.Windows.Forms.TextBox(); + this.txtCsv_anag = new System.Windows.Forms.TextBox(); + this.txtCsv_mov = new System.Windows.Forms.TextBox(); + this.btnAanagcesp = new System.Windows.Forms.Button(); + this.btnAmovm = new System.Windows.Forms.Button(); + this.btnAgest = new System.Windows.Forms.Button(); + this.btnAcateg = new System.Windows.Forms.Button(); + this.BtnCsv_anag = new System.Windows.Forms.Button(); + this.btnCsv_mov = new System.Windows.Forms.Button(); + this.btnConverti = new System.Windows.Forms.Button(); + this.lblCliente = new System.Windows.Forms.Label(); + this.txtCliente = new System.Windows.Forms.TextBox(); + this.SuspendLayout(); + // + // lbAanagcesp + // + this.lbAanagcesp.AutoSize = true; + this.lbAanagcesp.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbAanagcesp.Location = new System.Drawing.Point(11, 48); + this.lbAanagcesp.Name = "lbAanagcesp"; + this.lbAanagcesp.Size = new System.Drawing.Size(128, 15); + this.lbAanagcesp.TabIndex = 0; + this.lbAanagcesp.Text = "acbcv_aanagcesp.xml:"; + // + // lblAgest + // + this.lblAgest.AutoSize = true; + this.lblAgest.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblAgest.Location = new System.Drawing.Point(11, 138); + this.lblAgest.Name = "lblAgest"; + this.lblAgest.Size = new System.Drawing.Size(150, 15); + this.lblAgest.TabIndex = 1; + this.lblAgest.Text = "acbcv_agestionecesp.xml:"; + // + // lblAmovm + // + this.lblAmovm.AutoSize = true; + this.lblAmovm.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblAmovm.Location = new System.Drawing.Point(11, 92); + this.lblAmovm.Name = "lblAmovm"; + this.lblAmovm.Size = new System.Drawing.Size(113, 15); + this.lblAmovm.TabIndex = 2; + this.lblAmovm.Text = "acbcv_amovm.xml:"; + // + // lblAcateg + // + this.lblAcateg.AutoSize = true; + this.lblAcateg.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblAcateg.Location = new System.Drawing.Point(11, 184); + this.lblAcateg.Name = "lblAcateg"; + this.lblAcateg.Size = new System.Drawing.Size(126, 15); + this.lblAcateg.TabIndex = 3; + this.lblAcateg.Text = "acbcv_atabcateg.xml:"; + // + // lblCsv_anag + // + this.lblCsv_anag.AutoSize = true; + this.lblCsv_anag.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblCsv_anag.Location = new System.Drawing.Point(11, 230); + this.lblCsv_anag.Name = "lblCsv_anag"; + this.lblCsv_anag.Size = new System.Drawing.Size(147, 15); + this.lblCsv_anag.TabIndex = 4; + this.lblCsv_anag.Text = "Template CSV anagrafica:"; + // + // lblCsv_mov + // + this.lblCsv_mov.AutoSize = true; + this.lblCsv_mov.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblCsv_mov.Location = new System.Drawing.Point(11, 276); + this.lblCsv_mov.Name = "lblCsv_mov"; + this.lblCsv_mov.Size = new System.Drawing.Size(151, 15); + this.lblCsv_mov.TabIndex = 5; + this.lblCsv_mov.Text = "Template CSV movimenti:"; + // + // txtAanagcesp + // + this.txtAanagcesp.Location = new System.Drawing.Point(14, 66); + this.txtAanagcesp.Name = "txtAanagcesp"; + this.txtAanagcesp.Size = new System.Drawing.Size(693, 23); + this.txtAanagcesp.TabIndex = 6; + this.txtAanagcesp.Leave += new System.EventHandler(this.txtAanagcesp_Leave); + // + // txtAmovm + // + this.txtAmovm.Location = new System.Drawing.Point(14, 112); + this.txtAmovm.Name = "txtAmovm"; + this.txtAmovm.Size = new System.Drawing.Size(693, 23); + this.txtAmovm.TabIndex = 7; + this.txtAmovm.Leave += new System.EventHandler(this.txtAmovm_Leave); + // + // txtAgest + // + this.txtAgest.Location = new System.Drawing.Point(14, 158); + this.txtAgest.Name = "txtAgest"; + this.txtAgest.Size = new System.Drawing.Size(693, 23); + this.txtAgest.TabIndex = 8; + this.txtAgest.Leave += new System.EventHandler(this.txtAgest_Leave); + // + // txtAcateg + // + this.txtAcateg.Location = new System.Drawing.Point(14, 204); + this.txtAcateg.Name = "txtAcateg"; + this.txtAcateg.Size = new System.Drawing.Size(693, 23); + this.txtAcateg.TabIndex = 9; + this.txtAcateg.Leave += new System.EventHandler(this.txtAcateg_Leave); + // + // txtCsv_anag + // + this.txtCsv_anag.Location = new System.Drawing.Point(14, 250); + this.txtCsv_anag.Name = "txtCsv_anag"; + this.txtCsv_anag.Size = new System.Drawing.Size(693, 23); + this.txtCsv_anag.TabIndex = 10; + this.txtCsv_anag.Leave += new System.EventHandler(this.txtCsv_anag_Leave); + // + // txtCsv_mov + // + this.txtCsv_mov.Location = new System.Drawing.Point(14, 296); + this.txtCsv_mov.Name = "txtCsv_mov"; + this.txtCsv_mov.Size = new System.Drawing.Size(693, 23); + this.txtCsv_mov.TabIndex = 11; + this.txtCsv_mov.Leave += new System.EventHandler(this.txtCsv_mov_Leave); + // + // btnAanagcesp + // + this.btnAanagcesp.Location = new System.Drawing.Point(713, 65); + this.btnAanagcesp.Name = "btnAanagcesp"; + this.btnAanagcesp.Size = new System.Drawing.Size(75, 23); + this.btnAanagcesp.TabIndex = 12; + this.btnAanagcesp.Text = "Sfoglia"; + this.btnAanagcesp.UseVisualStyleBackColor = true; + this.btnAanagcesp.Click += new System.EventHandler(this.btnAanagcesp_Click); + this.btnAanagcesp.Leave += new System.EventHandler(this.btnAanagcesp_Leave); + // + // btnAmovm + // + this.btnAmovm.Location = new System.Drawing.Point(713, 112); + this.btnAmovm.Name = "btnAmovm"; + this.btnAmovm.Size = new System.Drawing.Size(75, 23); + this.btnAmovm.TabIndex = 13; + this.btnAmovm.Text = "Sfoglia"; + this.btnAmovm.UseVisualStyleBackColor = true; + this.btnAmovm.Click += new System.EventHandler(this.btnAmovm_Click); + this.btnAmovm.Leave += new System.EventHandler(this.btnAmovm_Leave); + // + // btnAgest + // + this.btnAgest.Location = new System.Drawing.Point(713, 158); + this.btnAgest.Name = "btnAgest"; + this.btnAgest.Size = new System.Drawing.Size(75, 23); + this.btnAgest.TabIndex = 14; + this.btnAgest.Text = "Sfoglia"; + this.btnAgest.UseVisualStyleBackColor = true; + this.btnAgest.Click += new System.EventHandler(this.btnAgest_Click); + this.btnAgest.Leave += new System.EventHandler(this.btnAgest_Leave); + // + // btnAcateg + // + this.btnAcateg.Location = new System.Drawing.Point(713, 204); + this.btnAcateg.Name = "btnAcateg"; + this.btnAcateg.Size = new System.Drawing.Size(75, 23); + this.btnAcateg.TabIndex = 15; + this.btnAcateg.Text = "Sfoglia"; + this.btnAcateg.UseVisualStyleBackColor = true; + this.btnAcateg.Click += new System.EventHandler(this.btnAcateg_Click); + this.btnAcateg.Leave += new System.EventHandler(this.btnAcateg_Leave); + // + // BtnCsv_anag + // + this.BtnCsv_anag.Location = new System.Drawing.Point(713, 250); + this.BtnCsv_anag.Name = "BtnCsv_anag"; + this.BtnCsv_anag.Size = new System.Drawing.Size(75, 23); + this.BtnCsv_anag.TabIndex = 16; + this.BtnCsv_anag.Text = "Sfoglia"; + this.BtnCsv_anag.UseVisualStyleBackColor = true; + this.BtnCsv_anag.Click += new System.EventHandler(this.BtnCsv_anag_Click); + this.BtnCsv_anag.Leave += new System.EventHandler(this.BtnCsv_anag_Leave); + // + // btnCsv_mov + // + this.btnCsv_mov.Location = new System.Drawing.Point(713, 296); + this.btnCsv_mov.Name = "btnCsv_mov"; + this.btnCsv_mov.Size = new System.Drawing.Size(75, 23); + this.btnCsv_mov.TabIndex = 17; + this.btnCsv_mov.Text = "Sfoglia"; + this.btnCsv_mov.UseVisualStyleBackColor = true; + this.btnCsv_mov.Click += new System.EventHandler(this.btnCsv_mov_Click); + this.btnCsv_mov.Leave += new System.EventHandler(this.btnCsv_mov_Leave); + // + // btnConverti + // + this.btnConverti.Location = new System.Drawing.Point(661, 345); + this.btnConverti.Name = "btnConverti"; + this.btnConverti.Size = new System.Drawing.Size(127, 43); + this.btnConverti.TabIndex = 18; + this.btnConverti.Text = "CONVERTI"; + this.btnConverti.UseVisualStyleBackColor = true; + this.btnConverti.Click += new System.EventHandler(this.btnConverti_Click); + // + // lblCliente + // + this.lblCliente.AutoSize = true; + this.lblCliente.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblCliente.Location = new System.Drawing.Point(12, 20); + this.lblCliente.Name = "lblCliente"; + this.lblCliente.Size = new System.Drawing.Size(93, 15); + this.lblCliente.TabIndex = 19; + this.lblCliente.Text = "NOME CLIENTE:"; + // + // txtCliente + // + this.txtCliente.Location = new System.Drawing.Point(111, 16); + this.txtCliente.Name = "txtCliente"; + this.txtCliente.Size = new System.Drawing.Size(323, 23); + this.txtCliente.TabIndex = 20; + // + // MainForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(807, 397); + this.Controls.Add(this.txtCliente); + this.Controls.Add(this.lblCliente); + this.Controls.Add(this.btnConverti); + this.Controls.Add(this.btnCsv_mov); + this.Controls.Add(this.BtnCsv_anag); + this.Controls.Add(this.btnAcateg); + this.Controls.Add(this.btnAgest); + this.Controls.Add(this.btnAmovm); + this.Controls.Add(this.btnAanagcesp); + this.Controls.Add(this.txtCsv_mov); + this.Controls.Add(this.txtCsv_anag); + this.Controls.Add(this.txtAcateg); + this.Controls.Add(this.txtAgest); + this.Controls.Add(this.txtAmovm); + this.Controls.Add(this.txtAanagcesp); + this.Controls.Add(this.lblCsv_mov); + this.Controls.Add(this.lblCsv_anag); + this.Controls.Add(this.lblAcateg); + this.Controls.Add(this.lblAmovm); + this.Controls.Add(this.lblAgest); + this.Controls.Add(this.lbAanagcesp); + this.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3); + this.Name = "MainForm"; + this.ShowIcon = false; + this.Text = "XML To CSV Converter"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label lbAanagcesp; + private System.Windows.Forms.Label lblAgest; + private System.Windows.Forms.Label lblAmovm; + private System.Windows.Forms.Label lblAcateg; + private System.Windows.Forms.Label lblCsv_anag; + private System.Windows.Forms.Label lblCsv_mov; + private System.Windows.Forms.TextBox txtAanagcesp; + private System.Windows.Forms.TextBox txtAmovm; + private System.Windows.Forms.TextBox txtAgest; + private System.Windows.Forms.TextBox txtAcateg; + private System.Windows.Forms.TextBox txtCsv_anag; + private System.Windows.Forms.TextBox txtCsv_mov; + private System.Windows.Forms.Button btnAanagcesp; + private System.Windows.Forms.Button btnAmovm; + private System.Windows.Forms.Button btnAgest; + private System.Windows.Forms.Button btnAcateg; + private System.Windows.Forms.Button BtnCsv_anag; + private System.Windows.Forms.Button btnCsv_mov; + private System.Windows.Forms.Button btnConverti; + private System.Windows.Forms.Label lblCliente; + private System.Windows.Forms.TextBox txtCliente; + } +} + diff --git a/ConvertiXML/MainForm.cs b/ConvertiXML/MainForm.cs new file mode 100644 index 0000000..e3bc5b9 --- /dev/null +++ b/ConvertiXML/MainForm.cs @@ -0,0 +1,666 @@ +using System; +using System; +using System.Collections.Generic; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Data; +using System.Drawing; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using System.Windows.Forms; +using System.Xml.Linq; +using static System.Net.Mime.MediaTypeNames; + +namespace ConvertiXML +{ + public partial class MainForm : Form + { + public MainForm() + { + InitializeComponent(); + } + + #region METODI + + private string CercaFiles() + { + //creo oggetto openFileDialog1 + OpenFileDialog openFileDialog1 = new OpenFileDialog(); + + //apro finestra per selezionare il file + DialogResult res = openFileDialog1.ShowDialog(); + var nomeFileTRovato = string.Empty; + if (res == DialogResult.OK) + { + nomeFileTRovato = openFileDialog1.FileName; + + } + return nomeFileTRovato; + } + + //Metodo FormatDate + private string FormatDate(string dateStr) + { + try + { + if (!string.IsNullOrWhiteSpace(dateStr) && dateStr != "0100-01-01") + { + if (DateTime.TryParse(dateStr, out DateTime date)) + { + string result = date.ToString("dd-MM-yyyy"); + if (result == "01-01-1900") + return ""; + return result; + } + } + } + catch (Exception ex) + { + MessageBox.Show($"Errore: {ex.Message}", "Errore", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + return ""; + } + + //Metodo FormatNumber + private string FormatNumber(object val) + { + try + { + if (val == null || string.IsNullOrWhiteSpace(val.ToString())) + { + return ""; + } + + if (double.TryParse(val.ToString(), NumberStyles.Any, CultureInfo.InvariantCulture, out double number)) + { + if (number == 0) + { + return ""; + } + + // Usa formato italiano: "." per migliaia e "," per decimali + return number.ToString("#,0.00", new CultureInfo("it-IT")); + } + } + catch (Exception ex) + { + MessageBox.Show($"Errore: {ex.Message}", "Errore", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + return ""; + } + + private List AdjustRow(List row, List headers) + { + var adjusted = new List(); + + // Prende i primi elementi fino alla lunghezza delle intestazioni + for (int i = 0; i < headers.Count; i++) + { + if (i < row.Count) + { + var val = row[i]; + if (val == null || string.IsNullOrWhiteSpace(val.ToString()) || val.ToString().ToLower() == "nan") + adjusted.Add(""); + else + adjusted.Add(val.ToString()); + } + else + { + // Riempie con stringhe vuote se mancano colonne + adjusted.Add(""); + } + } + + return adjusted; + } + + private List> ParseXml(string filePath) + { + var result = new List>(); + + try + { + var doc = XDocument.Load(filePath); + var records = doc.Descendants("Record").ToList(); + + // Se non trova , cerca + if (!records.Any()) + records = doc.Descendants("ROW").ToList(); + + foreach (var record in records) + { + var rowDict = new Dictionary(StringComparer.OrdinalIgnoreCase); + + // Leggi attributi del nodo + var keys = record.Element("Keys"); + if (keys != null) + { + foreach (var attr in keys.Attributes()) + { + rowDict[attr.Name.LocalName] = attr.Value; + } + } + + // Leggi attributi del nodo + var fields = record.Element("Fields"); + if (fields != null) + { + foreach (var attr in fields.Attributes()) + { + rowDict[attr.Name.LocalName] = attr.Value; + } + } + + // Aggiungi eventuali altri tag diretti con contenuto testuale + foreach (var elem in record.Elements()) + { + // Ignora Keys e Fields che hai già letto + if (elem.Name.LocalName == "Keys" || elem.Name.LocalName == "Fields") + continue; + + if (!string.IsNullOrWhiteSpace(elem.Value)) + { + rowDict[elem.Name.LocalName] = elem.Value; + } + } + + result.Add(rowDict); + } + } + catch (Exception ex) + { + MessageBox.Show($"Errore durante il parsing XML: {ex.Message}", "Errore", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + + return result; + } + + private void ConvertiToCSV() + { + try + { + if (!string.IsNullOrEmpty(txtAanagcesp.Text) + && !string.IsNullOrEmpty(txtAmovm.Text) + && !string.IsNullOrEmpty(txtAgest.Text) + && !string.IsNullOrEmpty(txtAcateg.Text) + && !string.IsNullOrEmpty(txtCsv_anag.Text) + && !string.IsNullOrEmpty(txtCsv_mov.Text)) + { + // Parsing XML + var aanagcesp = ParseXml(txtAanagcesp.Text); + var amovm = ParseXml(txtAmovm.Text); + var agest = ParseXml(txtAgest.Text); + var acateg = ParseXml(txtAcateg.Text); + + // Parsing headers CSV + var anagHeaders = File.ReadLines(txtCsv_anag.Text).FirstOrDefault()?.Split(';').ToList() ?? new List(); + var movHeaders = File.ReadLines(txtCsv_mov.Text).FirstOrDefault()?.Split(';').ToList() ?? new List(); + + // ------- ANAGRAFICA ------- + var anagData = new List>(); + var anagDataErrata = new List>(); + + + foreach (var row in aanagcesp) + { + var distanzaId = row.ContainsKey("ACISTANZAID") ? row["ACISTANZAID"] : ""; + + var aCf = row.ContainsKey("ACCFISC") ? row["ACCFISC"] : ""; + + var g = agest.FirstOrDefault(x => (x.ContainsKey("GDISTANZAID") && x["GDISTANZAID"] == distanzaId) && + (x.ContainsKey("GDCFISC") && x["GDCFISC"] == aCf)) + ?? new Dictionary(); + + var codcat = row.ContainsKey("ACCIDCATEG") ? row["ACCIDCATEG"] : ""; + codcat = codcat.Length >= 3 ? codcat.Substring(codcat.Length - 3) : ""; + + string aliq_civ = (row.ContainsKey("ACNALIQCIV") ? row["ACNALIQCIV"] : "").Replace('.', ','); + double aliq_viv_num = 0; + bool civOk = double.TryParse(aliq_civ, NumberStyles.Any, new CultureInfo("it-IT"), out aliq_viv_num); + + var errore = 0; + + string aliq_fisc = (row.ContainsKey("ACNALIQFISC") ? row["ACNALIQFISC"] : "").Replace('.', ','); + double aliq_fisc_num = 0; + bool fiscOk = double.TryParse(aliq_fisc, NumberStyles.Any, new CultureInfo("it-IT"), out aliq_fisc_num); + + if (string.IsNullOrEmpty(aliq_civ) && string.IsNullOrEmpty(aliq_fisc) || (aliq_viv_num < 1 && aliq_fisc_num < 1)) + { + aliq_civ = "99,99"; + aliq_fisc = "99,99"; + errore = 1; + } + else + { + if (!civOk || aliq_viv_num < 1) + { + aliq_civ = aliq_fisc; + errore = 1; + } + else if (!fiscOk || aliq_fisc_num < 1) + { + aliq_fisc = aliq_civ; + errore = 1; + } + } + + string percmanrip = FormatNumber(row.ContainsKey("ACPERCMANRIP") ? row["ACPERCMANRIP"] : ""); + + var dataRow = new List + { + row.ContainsKey("ACCFISC") ? row["ACCFISC"] : "", + row.ContainsKey("ACCPARTIVA") ? row["ACCPARTIVA"] : "", + g.ContainsKey("GDXCLIENTE") ? g["GDXCLIENTE"] : "", + row.ContainsKey("AACDITTACONCZ") ? row["AACDITTACONCZ"] : "", + row.ContainsKey("ACCCESP") ? row["ACCCESP"] : "", + row.ContainsKey("ACXBENE") ? row["ACXBENE"] : "", + row.ContainsKey("ACXTARGA") ? row["ACXTARGA"] : "", + FormatDate(row.ContainsKey("ACDIMMATR") ? row["ACDIMMATR"] : ""), + row.ContainsKey("ACXCASISTICA") ? row["ACXCASISTICA"] : "", + row.ContainsKey("ACATECO") ? row["ACATECO"] : "", + row.ContainsKey("ACCGRUPPO") ? row["ACCGRUPPO"] : "", + row.ContainsKey("ACXGRUPPO") ? row["ACXGRUPPO"] : "", + row.ContainsKey("ACCSPECIE") ? row["ACCSPECIE"] : "", + row.ContainsKey("ACXSPECIE") ? row["ACXSPECIE"] : "", + codcat, + row.ContainsKey("ACXCATEG") ? row["ACXCATEG"] : "", + "0", + //aliq_civ != "0" ? aliq_civ : "", + //aliq_fisc != "0" ? aliq_fisc : "", + aliq_civ, + aliq_fisc, + row.ContainsKey("ACNBENEUSATO") ? row["ACNBENEUSATO"] : "", + "0", + "", + "0", + "0", + "0", + percmanrip, "0", + row.ContainsKey("ACCTIPOINVEST") ? row["ACCTIPOINVEST"] : "", + row.ContainsKey("ACNIDAGEVLZNRU") ? row["ACNIDAGEVLZNRU"] : "", + row.ContainsKey("ACCCENCOST") ? row["ACCCENCOST"] : "", + row.ContainsKey("ACCCOMM") ? row["ACCCOMM"] : "", + "" + }; + + anagData.Add(AdjustRow(dataRow, anagHeaders)); + + if (errore == 1) + { + anagDataErrata.Add(AdjustRow(dataRow, anagHeaders)); + } + + } + + var anno = DateTime.Now.Year.ToString(); + var mese = DateTime.Now.Month.ToString(); + var giorno = DateTime.Now.Day.ToString(); + var ora = DateTime.Now.Hour.ToString(); + var minuti = DateTime.Now.Minute.ToString(); + var sec = DateTime.Now.Second.ToString(); + + var datetime = anno + mese + giorno + ora + minuti + sec; + + // Scrivi CSV anagrafica + var anagPath = $"{txtCliente.Text.Trim().Replace(" ", "")}_export_anagrafica_cespite_{datetime}.csv"; + using (var writer = new StreamWriter(anagPath, false, Encoding.GetEncoding("windows-1258"))) + { + writer.WriteLine(string.Join(";", anagHeaders)); + foreach (var row in anagData) + writer.WriteLine(string.Join(";", row.Select(s => s.Replace("\\", "\\\\").Replace(";", "\\")))); + } + + // Scrivi CSV anagrafica errata (aliq_civ o aliq_fisc == 99.99) + if (anagDataErrata.Any()) + { + var anagPathErrato = $"{txtCliente.Text.Trim().Replace(" ", "")}_export_anagrafica_cespite_ERR_{datetime}.csv"; + using (var writer = new StreamWriter(anagPathErrato, false, Encoding.GetEncoding("windows-1258"))) + { + writer.WriteLine(string.Join(";", anagHeaders)); + foreach (var row in anagDataErrata) + writer.WriteLine(string.Join(";", row.Select(s => s.Replace("\\", "\\\\").Replace(";", "\\;")))); + } + } + + // ------- MOVIMENTI ------- + //var cespiteToPiva = aanagcesp + // .Where(x => x.ContainsKey("ACIDANAGCESP") && x.ContainsKey("ACCPARTIVA")) + // .ToDictionary(x => x["ACIDANAGCESP"], x => x["ACCPARTIVA"]); + + var cespiteToCF = aanagcesp + .Where(x => x.ContainsKey("ACIDANAGCESP") && x.ContainsKey("ACCPARTIVA")) + .ToDictionary(x => x["ACIDANAGCESP"], x => x["ACCFISC"]); + + var movData = new List>(); + + foreach (var row in amovm) + { + var desc = row.ContainsKey("MOCDESCN") ? row["MOCDESCN"] : ""; + + //DA VERIFICARE CON ZHI YONG SE SERVE QUESTO CONTROLLO + //if (desc != "Acquisto" && desc != "F.do ammortamento") + // continue; + + var cespiteId = row.ContainsKey("MOIDCESP") ? row["MOIDCESP"] : ""; + var codiceFiscale = /*cespiteToPiva*/cespiteToCF.ContainsKey(cespiteId) ? cespiteToCF/*cespiteToPiva*/[cespiteId] : ""; + + var dataRow = new List + { + codiceFiscale, + cespiteId.Length >= 5 ? cespiteId.Substring(cespiteId.Length - 5) : cespiteId, + FormatDate(row.ContainsKey("MODOPER") ? row["MODOPER"] : ""), + desc, + row.ContainsKey("MOCDESCNAGGN") ? row["MOCDESCNAGGN"] : "", + FormatNumber(row.ContainsKey("MONCOSCIV") ? row["MONCOSCIV"] : ""), + FormatNumber(row.ContainsKey("MONCOSTOTUIR") ? row["MONCOSTOTUIR"] : ""), + FormatNumber(row.ContainsKey("MONFONDOCIV") ? row["MONFONDOCIV"] : ""), + "", + "", + "", + "", + "", + "", + "", + "", + "", + FormatDate(row.ContainsKey("MODDATAAFFRT") ? row["MODDATAAFFRT"] : ""), + FormatDate(row.ContainsKey("MODINILEAS") ? row["MODINILEAS"] : ""), + FormatDate(row.ContainsKey("MODDATAEFFCCIV") ? row["MODDATAEFFCCIV"] : ""), + FormatDate(row.ContainsKey("MODDATAEFFCTUIR") ? row["MODDATAEFFCTUIR"] : ""), + FormatDate(row.ContainsKey("MODDATAEFFCIRAP") ? row["MODDATAEFFCIRAP"] : ""), + FormatDate(row.ContainsKey("MODPLUSZMINSZCIV") ? row["MODPLUSZMINSZCIV"] : ""), + FormatDate(row.ContainsKey("MODPLUSZMINSZTUIR") ? row["MODPLUSZMINSZTUIR"] : ""), + FormatDate(row.ContainsKey("MODPLUSZMINSZTIRAP") ? row["MODPLUSZMINSZTIRAP"] : ""), + FormatDate(row.ContainsKey("MODPLAFTUIR") ? row["MODPLAFTUIR"] : ""), + FormatDate(row.ContainsKey("MODPLAFIRAP") ? row["MODPLAFIRAP"] : ""), + FormatDate(row.ContainsKey("MODDATAEFFCMAX") ? row["MODDATAEFFCMAX"] : ""), + FormatDate(row.ContainsKey("MODDATAEFFCSOCCOM") ? row["MODDATAEFFCSOCCOM"] : ""), + "", + "", + "", + row.ContainsKey("MONPROT") ? row["MONPROT"] : "" + }; + + movData.Add(AdjustRow(dataRow, movHeaders)); + } + + // Scrivi CSV movimenti + //var movPath = $"export_movimenti_v6_format_migliaia_{datetime}.csv"; + var movPath = $"{txtCliente.Text.Trim().Replace(" ", "")}_export_movimenti_{datetime}.csv"; + + using (var writer = new StreamWriter(movPath, false, Encoding.GetEncoding("windows-1258"))) + { + writer.WriteLine(string.Join(";", movHeaders)); + foreach (var row in movData) + writer.WriteLine(string.Join(";", row.Select(s => s.Replace("\\", "\\\\").Replace(";", "\\;")))); + } + + MessageBox.Show("CSV generati correttamente.", "Successo", MessageBoxButtons.OK, MessageBoxIcon.Information); + } + else + { + //MessageBox.Show("CSV generati correttamente.", "Successo", MessageBoxButtons.OK, MessageBoxIcon.Information); + MessageBox.Show("Impossibile generare files CSV. Devono essere selezionati tutti i file XML necessari alla conversione", + "Errore", MessageBoxButtons.OK, + MessageBoxIcon.Error); + + } + + } + catch (Exception ex) + { + MessageBox.Show("Errore: " + ex.Message, "Errore", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + #endregion METODI + + #region EVENTI + + private void btnConverti_Click(object sender, EventArgs e) + { + try + { + ConvertiToCSV(); + } + catch (Exception ex) + { + MessageBox.Show($"Errore: {ex.Message}", "Errore", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + //cerca nei file + private void btnAanagcesp_Click(object sender, EventArgs e) + { + try + { + var fileName = CercaFiles(); + txtAanagcesp.Text = fileName; + } + catch (Exception ex) + { + MessageBox.Show($"Errore: {ex.Message}", "Errore", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + private void btnAmovm_Click(object sender, EventArgs e) + { + try + { + var fileName = CercaFiles(); + txtAmovm.Text = fileName; + } + catch (Exception ex) + { + MessageBox.Show($"Errore: {ex.Message}", "Errore", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + + } + + private void btnAgest_Click(object sender, EventArgs e) + { + try + { + var fileName = CercaFiles(); + txtAgest.Text = fileName; + } + catch (Exception ex) + { + MessageBox.Show($"Errore: {ex.Message}", "Errore", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + private void btnAcateg_Click(object sender, EventArgs e) + { + try + { + var fileName = CercaFiles(); + txtAcateg.Text = fileName; + } + catch (Exception ex) + { + MessageBox.Show($"Errore: {ex.Message}", "Errore", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + private void BtnCsv_anag_Click(object sender, EventArgs e) + { + try + { + var fileName = CercaFiles(); + txtCsv_anag.Text = fileName; + } + catch (Exception ex) + { + MessageBox.Show($"Errore: {ex.Message}", "Errore", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + private void btnCsv_mov_Click(object sender, EventArgs e) + { + try + { + var fileName = CercaFiles(); + txtCsv_mov.Text = fileName; + } + catch (Exception ex) + { + MessageBox.Show($"Errore: {ex.Message}", "Errore", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + + //leave texbox + private void txtAanagcesp_Leave(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty(txtAanagcesp.Text)) + { + txtAanagcesp.BackColor = Color.White; + } + else + { + txtAanagcesp.BackColor = Color.FromArgb(255, 102, 102); + } + } + + private void txtAmovm_Leave(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty(txtAmovm.Text)) + { + txtAmovm.BackColor = Color.White; + } + else + { + txtAmovm.BackColor = Color.FromArgb(255, 102, 102); + } + } + + private void txtAgest_Leave(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty(txtAgest.Text)) + { + txtAgest.BackColor = Color.White; + } + else + { + txtAgest.BackColor = Color.FromArgb(255, 102, 102); + } + } + + private void txtAcateg_Leave(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty(txtAcateg.Text)) + { + txtAcateg.BackColor = Color.White; + } + else + { + txtAcateg.BackColor = Color.FromArgb(255, 102, 102); + } + } + + private void txtCsv_anag_Leave(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty(txtCsv_anag.Text)) + { + txtCsv_anag.BackColor = Color.White; + } + else + { + txtCsv_anag.BackColor = Color.FromArgb(255, 102, 102); + } + } + + private void txtCsv_mov_Leave(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty(txtCsv_mov.Text)) + { + txtCsv_mov.BackColor = Color.White; + } + else + { + txtCsv_mov.BackColor = Color.FromArgb(255, 102, 102); + } + } + + //leave bottoni sfoglia + private void btnAanagcesp_Leave(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty(txtAanagcesp.Text)) + { + txtAanagcesp.BackColor = Color.White; + } + else + { + txtAanagcesp.BackColor = Color.FromArgb(255, 102, 102); + } + } + + private void btnAmovm_Leave(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty(txtAmovm.Text)) + { + txtAmovm.BackColor = Color.White; + } + else + { + txtAmovm.BackColor = Color.FromArgb(255, 102, 102); + } + } + + private void btnAgest_Leave(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty(txtAgest.Text)) + { + txtAgest.BackColor = Color.White; + } + else + { + txtAgest.BackColor = Color.FromArgb(255, 102, 102); + } + } + + private void btnAcateg_Leave(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty(txtAcateg.Text)) + { + txtAcateg.BackColor = Color.White; + } + else + { + txtAcateg.BackColor = Color.FromArgb(255, 102, 102); + } + } + + private void BtnCsv_anag_Leave(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty(txtCsv_anag.Text)) + { + txtCsv_anag.BackColor = Color.White; + } + else + { + txtCsv_anag.BackColor = Color.FromArgb(255, 102, 102); + } + } + + private void btnCsv_mov_Leave(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty(txtCsv_mov.Text)) + { + txtCsv_mov.BackColor = Color.White; + } + else + { + txtCsv_mov.BackColor = Color.FromArgb(255, 102, 102); + } + } + + #endregion EVENTI + } +} diff --git a/ConvertiXML/MainForm.resx b/ConvertiXML/MainForm.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/ConvertiXML/MainForm.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/ConvertiXML/Program.cs b/ConvertiXML/Program.cs new file mode 100644 index 0000000..1c151bd --- /dev/null +++ b/ConvertiXML/Program.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ConvertiXML +{ + internal static class Program + { + /// + /// Punto di ingresso principale dell'applicazione. + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new MainForm()); + } + } +} diff --git a/ConvertiXML/Properties/AssemblyInfo.cs b/ConvertiXML/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..92244bd --- /dev/null +++ b/ConvertiXML/Properties/AssemblyInfo.cs @@ -0,0 +1,33 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Le informazioni generali relative a un assembly sono controllate dal seguente +// set di attributi. Modificare i valori di questi attributi per modificare le informazioni +// associate a un assembly. +[assembly: AssemblyTitle("ConvertiXML")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("ConvertiXML")] +[assembly: AssemblyCopyright("Copyright © 2025")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Se si imposta ComVisible su false, i tipi in questo assembly non saranno visibili +// ai componenti COM. Se è necessario accedere a un tipo in questo assembly da +// COM, impostare su true l'attributo ComVisible per tale tipo. +[assembly: ComVisible(false)] + +// Se il progetto viene esposto a COM, il GUID seguente verrà utilizzato come ID della libreria dei tipi +[assembly: Guid("99dd108a-9fd9-45de-818b-11ab1dab7538")] + +// Le informazioni sulla versione di un assembly sono costituite dai seguenti quattro valori: +// +// Versione principale +// Versione secondaria +// Numero di build +// Revisione +// +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/ConvertiXML/Properties/Resources.Designer.cs b/ConvertiXML/Properties/Resources.Designer.cs new file mode 100644 index 0000000..2e955b1 --- /dev/null +++ b/ConvertiXML/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// Codice generato da uno strumento. +// Versione runtime:4.0.30319.42000 +// +// Le modifiche apportate a questo file possono causare un comportamento non corretto e andranno perse se +// il codice viene rigenerato. +// +//------------------------------------------------------------------------------ + +namespace ConvertiXML.Properties +{ + + + /// + /// Classe di risorse fortemente tipizzata per la ricerca di stringhe localizzate e così via. + /// + // Questa classe è stata generata automaticamente dalla classe StronglyTypedResourceBuilder + // tramite uno strumento quale ResGen o Visual Studio. + // Per aggiungere o rimuovere un membro, modificare il file .ResX, quindi eseguire di nuovo ResGen + // con l'opzione /str oppure ricompilare il progetto VS. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// Restituisce l'istanza di ResourceManager memorizzata nella cache e usata da questa classe. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ConvertiXML.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Esegue l'override della proprietà CurrentUICulture del thread corrente per tutte + /// le ricerche di risorse che utilizzano questa classe di risorse fortemente tipizzata. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/ConvertiXML/Properties/Resources.resx b/ConvertiXML/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/ConvertiXML/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/ConvertiXML/Properties/Settings.Designer.cs b/ConvertiXML/Properties/Settings.Designer.cs new file mode 100644 index 0000000..fdc766e --- /dev/null +++ b/ConvertiXML/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace ConvertiXML.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/ConvertiXML/Properties/Settings.settings b/ConvertiXML/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/ConvertiXML/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + +