Commit prova

This commit is contained in:
michele 2025-07-25 09:49:11 +02:00
parent 61a34576b3
commit 92a78e1474
13 changed files with 1509 additions and 0 deletions

25
ConvertiXML.sln Normal file
View File

@ -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

6
ConvertiXML/App.config Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>

View File

@ -0,0 +1,84 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{99DD108A-9FD9-45DE-818B-11AB1DAB7538}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>ConvertiXML</RootNamespace>
<AssemblyName>ConvertiXML</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="DictionaryExtensions.cs" />
<Compile Include="MainForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="MainForm.Designer.cs">
<DependentUpon>MainForm.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="MainForm.resx">
<DependentUpon>MainForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@ -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
{
}
}

316
ConvertiXML/MainForm.Designer.cs generated Normal file
View File

@ -0,0 +1,316 @@
namespace ConvertiXML
{
partial class MainForm
{
/// <summary>
/// Variabile di progettazione necessaria.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Pulire le risorse in uso.
/// </summary>
/// <param name="disposing">ha valore true se le risorse gestite devono essere eliminate, false in caso contrario.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Codice generato da Progettazione Windows Form
/// <summary>
/// Metodo necessario per il supporto della finestra di progettazione. Non modificare
/// il contenuto del metodo con l'editor di codice.
/// </summary>
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;
}
}

666
ConvertiXML/MainForm.cs Normal file
View File

@ -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<string> AdjustRow(List<object> row, List<string> headers)
{
var adjusted = new List<string>();
// 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<Dictionary<string, string>> ParseXml(string filePath)
{
var result = new List<Dictionary<string, string>>();
try
{
var doc = XDocument.Load(filePath);
var records = doc.Descendants("Record").ToList();
// Se non trova <Record>, cerca <ROW>
if (!records.Any())
records = doc.Descendants("ROW").ToList();
foreach (var record in records)
{
var rowDict = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
// Leggi attributi del nodo <Keys>
var keys = record.Element("Keys");
if (keys != null)
{
foreach (var attr in keys.Attributes())
{
rowDict[attr.Name.LocalName] = attr.Value;
}
}
// Leggi attributi del nodo <Fields>
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<string>();
var movHeaders = File.ReadLines(txtCsv_mov.Text).FirstOrDefault()?.Split(';').ToList() ?? new List<string>();
// ------- ANAGRAFICA -------
var anagData = new List<List<string>>();
var anagDataErrata = new List<List<string>>();
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<string, string>();
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<object>
{
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<List<string>>();
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<object>
{
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
}
}

120
ConvertiXML/MainForm.resx Normal file
View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

22
ConvertiXML/Program.cs Normal file
View File

@ -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
{
/// <summary>
/// Punto di ingresso principale dell'applicazione.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MainForm());
}
}
}

View File

@ -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")]

View File

@ -0,0 +1,71 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 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.
// </auto-generated>
//------------------------------------------------------------------------------
namespace ConvertiXML.Properties
{
/// <summary>
/// Classe di risorse fortemente tipizzata per la ricerca di stringhe localizzate e così via.
/// </summary>
// 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()
{
}
/// <summary>
/// Restituisce l'istanza di ResourceManager memorizzata nella cache e usata da questa classe.
/// </summary>
[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;
}
}
/// <summary>
/// Esegue l'override della proprietà CurrentUICulture del thread corrente per tutte
/// le ricerche di risorse che utilizzano questa classe di risorse fortemente tipizzata.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
return resourceCulture;
}
set
{
resourceCulture = value;
}
}
}
}

View File

@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,30 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 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.
// </auto-generated>
//------------------------------------------------------------------------------
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;
}
}
}
}

View File

@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>