From 41a277b3133f4490ee6d8288f465906b2db420bf Mon Sep 17 00:00:00 2001 From: CSiCoAlm Date: Tue, 26 Oct 2021 17:02:39 +0200 Subject: [PATCH] Vrs 0.1.0.0 - Compilata da CSiCoAlm il 2021/10/26 - Prima versione che permette di scaricare i file da A69 bypassando il controllo del browser. - Manca: - Serializzazione degli archivi pe rpoter riprendere il download parziale dei racconti o la scansione parziale dei link - Gestione in thread paralleli dei download - Riduzione ad icona per non visualizzare il tutto (privacy) - Parametrizzazione del lavoro - Loggin degli eventi - Rendere l'applicativo consol, in modo che non vi sia interfaccia utente. --- .gitignore | 10 + Src/A69WD.sln | 22 ++ Src/A69WD/A69WD.csproj | 86 +++++++ Src/A69WD/Form1.Designer.cs | 165 +++++++++++++ Src/A69WD/Form1.cs | 259 +++++++++++++++++++++ Src/A69WD/Form1.resx | 120 ++++++++++ Src/A69WD/Program.cs | 18 ++ Src/A69WD/Properties/AssemblyInfo.cs | 53 +++++ Src/A69WD/Properties/Resources.Designer.cs | 62 +++++ Src/A69WD/Properties/Resources.resx | 117 ++++++++++ Src/A69WD/Properties/Settings.Designer.cs | 26 +++ Src/A69WD/Properties/Settings.settings | 7 + Src/A69WD/cTools.cs | 25 ++ 13 files changed, 970 insertions(+) create mode 100644 .gitignore create mode 100644 Src/A69WD.sln create mode 100644 Src/A69WD/A69WD.csproj create mode 100644 Src/A69WD/Form1.Designer.cs create mode 100644 Src/A69WD/Form1.cs create mode 100644 Src/A69WD/Form1.resx create mode 100644 Src/A69WD/Program.cs create mode 100644 Src/A69WD/Properties/AssemblyInfo.cs create mode 100644 Src/A69WD/Properties/Resources.Designer.cs create mode 100644 Src/A69WD/Properties/Resources.resx create mode 100644 Src/A69WD/Properties/Settings.Designer.cs create mode 100644 Src/A69WD/Properties/Settings.settings create mode 100644 Src/A69WD/cTools.cs diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..154cb75 --- /dev/null +++ b/.gitignore @@ -0,0 +1,10 @@ +Doc/Tmp +Src/.vs +Src/*/bin +Src/*/obj +Src/*/Doc +Test +*~ +#*# +.#* +*lnk diff --git a/Src/A69WD.sln b/Src/A69WD.sln new file mode 100644 index 0000000..f7a7f3c --- /dev/null +++ b/Src/A69WD.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.25420.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "A69WD", "A69WD\A69WD.csproj", "{CD279079-D5AC-4C8A-9828-9A02C735D39C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {CD279079-D5AC-4C8A-9828-9A02C735D39C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CD279079-D5AC-4C8A-9828-9A02C735D39C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CD279079-D5AC-4C8A-9828-9A02C735D39C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CD279079-D5AC-4C8A-9828-9A02C735D39C}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Src/A69WD/A69WD.csproj b/Src/A69WD/A69WD.csproj new file mode 100644 index 0000000..4e79f57 --- /dev/null +++ b/Src/A69WD/A69WD.csproj @@ -0,0 +1,86 @@ + + + + + Debug + AnyCPU + {CD279079-D5AC-4C8A-9828-9A02C735D39C} + WinExe + Properties + A69WD + A69WD + v4.0 + 512 + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + Form + + + Form1.cs + + + + + Form1.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/Src/A69WD/Form1.Designer.cs b/Src/A69WD/Form1.Designer.cs new file mode 100644 index 0000000..b37379d --- /dev/null +++ b/Src/A69WD/Form1.Designer.cs @@ -0,0 +1,165 @@ +namespace A69WD { + partial class Form1 { + /// + /// 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.lblST = new System.Windows.Forms.Label(); + this.btnDownloadLink = new System.Windows.Forms.Button(); + this.btnDownloadAll = new System.Windows.Forms.Button(); + this.wb1 = new System.Windows.Forms.WebBrowser(); + this.btnHide = new System.Windows.Forms.Button(); + this.btnClose = new System.Windows.Forms.Button(); + this.lblPath = new System.Windows.Forms.Label(); + this.tbPath = new System.Windows.Forms.TextBox(); + this.btbPath = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // lblST + // + this.lblST.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.lblST.Dock = System.Windows.Forms.DockStyle.Bottom; + this.lblST.Location = new System.Drawing.Point(0, 84); + this.lblST.Name = "lblST"; + this.lblST.Size = new System.Drawing.Size(504, 22); + this.lblST.TabIndex = 0; + this.lblST.Text = "Status"; + this.lblST.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // btnDownloadLink + // + this.btnDownloadLink.Location = new System.Drawing.Point(12, 12); + this.btnDownloadLink.Name = "btnDownloadLink"; + this.btnDownloadLink.Size = new System.Drawing.Size(117, 33); + this.btnDownloadLink.TabIndex = 1; + this.btnDownloadLink.Text = "Download only Link"; + this.btnDownloadLink.UseVisualStyleBackColor = true; + this.btnDownloadLink.Click += new System.EventHandler(this.btnDownloadLink_Click); + // + // btnDownloadAll + // + this.btnDownloadAll.Location = new System.Drawing.Point(135, 12); + this.btnDownloadAll.Name = "btnDownloadAll"; + this.btnDownloadAll.Size = new System.Drawing.Size(117, 33); + this.btnDownloadAll.TabIndex = 2; + this.btnDownloadAll.Text = "Download All"; + this.btnDownloadAll.UseVisualStyleBackColor = true; + this.btnDownloadAll.Click += new System.EventHandler(this.btnDownloadAll_Click); + // + // wb1 + // + this.wb1.Location = new System.Drawing.Point(0, 1); + this.wb1.MinimumSize = new System.Drawing.Size(20, 20); + this.wb1.Name = "wb1"; + this.wb1.ScriptErrorsSuppressed = true; + this.wb1.ScrollBarsEnabled = false; + this.wb1.Size = new System.Drawing.Size(63, 44); + this.wb1.TabIndex = 3; + this.wb1.TabStop = false; + this.wb1.Visible = false; + // + // btnHide + // + this.btnHide.Location = new System.Drawing.Point(258, 12); + this.btnHide.Name = "btnHide"; + this.btnHide.Size = new System.Drawing.Size(117, 33); + this.btnHide.TabIndex = 4; + this.btnHide.Text = "Hide"; + this.btnHide.UseVisualStyleBackColor = true; + this.btnHide.Click += new System.EventHandler(this.btnHide_Click); + // + // btnClose + // + this.btnClose.Location = new System.Drawing.Point(381, 12); + this.btnClose.Name = "btnClose"; + this.btnClose.Size = new System.Drawing.Size(117, 33); + this.btnClose.TabIndex = 5; + this.btnClose.Text = "Close"; + this.btnClose.UseVisualStyleBackColor = true; + this.btnClose.Click += new System.EventHandler(this.btnClose_Click); + // + // lblPath + // + this.lblPath.Location = new System.Drawing.Point(12, 47); + this.lblPath.Name = "lblPath"; + this.lblPath.Size = new System.Drawing.Size(117, 33); + this.lblPath.TabIndex = 6; + this.lblPath.Text = "Destination Path:"; + this.lblPath.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // tbPath + // + this.tbPath.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.tbPath.Location = new System.Drawing.Point(132, 54); + this.tbPath.Name = "tbPath"; + this.tbPath.Size = new System.Drawing.Size(344, 20); + this.tbPath.TabIndex = 7; + this.tbPath.Text = "C:\\_Autodelete\\"; + this.tbPath.TextChanged += new System.EventHandler(this.tbPath_TextChanged); + // + // btbPath + // + this.btbPath.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.btbPath.Location = new System.Drawing.Point(478, 53); + this.btbPath.Name = "btbPath"; + this.btbPath.Size = new System.Drawing.Size(20, 20); + this.btbPath.TabIndex = 8; + this.btbPath.Text = "."; + this.btbPath.UseVisualStyleBackColor = true; + this.btbPath.Click += new System.EventHandler(this.btbPath_Click); + // + // Form1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(504, 106); + this.Controls.Add(this.btbPath); + this.Controls.Add(this.tbPath); + this.Controls.Add(this.lblPath); + this.Controls.Add(this.btnClose); + this.Controls.Add(this.btnHide); + this.Controls.Add(this.btnDownloadAll); + this.Controls.Add(this.btnDownloadLink); + this.Controls.Add(this.lblST); + this.Controls.Add(this.wb1); + this.Name = "Form1"; + this.Text = "A69 Downloader"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label lblST; + private System.Windows.Forms.Button btnDownloadLink; + private System.Windows.Forms.Button btnDownloadAll; + private System.Windows.Forms.WebBrowser wb1; + private System.Windows.Forms.Button btnHide; + private System.Windows.Forms.Button btnClose; + private System.Windows.Forms.Label lblPath; + private System.Windows.Forms.TextBox tbPath; + private System.Windows.Forms.Button btbPath; + } +} + diff --git a/Src/A69WD/Form1.cs b/Src/A69WD/Form1.cs new file mode 100644 index 0000000..612c960 --- /dev/null +++ b/Src/A69WD/Form1.cs @@ -0,0 +1,259 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Windows.Forms; +using System.IO; + + + +namespace A69WD { + public partial class Form1 : Form { + + + List AllLinks = null; + List toDownload = null; + List Downloaded = null; + List RacLinks = null; + + DateTime dtStartTime; + + string[] Tipologie = { "altro", "bdsm", "gay", "incesto", "lesbo", "orge", "prime", "scambio", "tradimenti", "trans", "trio" }; + + const string BASE_URL = "https://www.annunci69.it/racconti-erotici/{Tip}.html"; + const string BASE_LINK_IDX = "https://www.annunci69.it/racconti-erotici/racconti_lista.php"; + const string BASE_LINK_RAC = "https://www.annunci69.it/racconti-erotici/"; + + const int MAXLINK = 1000; + int cnt = 0; + + bool aborting = false; + bool DownRac = false; + + + public string DstIdx { + get { + if (string.IsNullOrEmpty(dstIdx)) { + // creo path e verifico l'esistenza + dstIdx = Path.Combine(System.IO.Path.Combine(tbPath.Text, DateTime.Now.ToString("yyyy-MM-dd")), "Indici"); + if (!Directory.Exists(dstIdx)) Directory.CreateDirectory(dstIdx); + } + return dstIdx; + } + } + private string dstIdx = ""; + + + public string DstRac { + get { + if (string.IsNullOrEmpty(dstRac)) { + // creo path e verifico l'esistenza + dstRac = Path.Combine(System.IO.Path.Combine(tbPath.Text, DateTime.Now.ToString("yyyy-MM-dd")), "Indici"); + if (!Directory.Exists(dstRac)) Directory.CreateDirectory(dstRac); + } + return dstRac; + } + } + private string dstRac = ""; + + + + + // Mettere che alla chiusura del form, salvo i valori degli elenchi tramite serializzzazione + + + + public Form1() { + InitializeComponent(); + // Inizializzo gli archivi (dai file in memoria) + AllLinks = new List(); + toDownload = new List(); + Downloaded = new List(); + RacLinks = new List(); + + wb1.DocumentCompleted += Wb_DocumentCompleted; + // Per ora non serializzo gli archivi e quindi carico le pagine iniziali delle 11 tipologie: + foreach (string tipologia in Tipologie) { + toDownload.Add(BASE_URL.Replace("{Tip}", tipologia)); + AllLinks.Add(BASE_URL.Replace("{Tip}", tipologia)); + } + + } + + + + + + private void btnDownloadLink_Click(object sender, EventArgs e) { + dtStartTime = DateTime.Now; + + DownRac = false; + + lblST.Text = "Inizio lo scrap dei link dei racconti"; + if ((toDownload.Count > 0) && (cnt < MAXLINK)) { + // proseguo con il download: + string lk = toDownload.First(); + toDownload.Remove(lk); + wb1.Navigate(lk); + } + + btnDownloadLink.Enabled = false; + } + + + private void btnDownloadAll_Click(object sender, EventArgs e) { + dtStartTime = DateTime.Now; + + DownRac = true; + + lblST.Text = "Inizio lo scrap dei link dei racconti"; + if ((toDownload.Count > 0) && (cnt < MAXLINK)) { + // proseguo con il download: + string lk = toDownload.First(); + toDownload.Remove(lk); + wb1.Navigate(lk); + } + + btnDownloadLink.Enabled = false; + } + + + private void btnHide_Click(object sender, EventArgs e) { MessageBox.Show("Metodo ancora da fare"); } + + + private void btnClose_Click(object sender, EventArgs e) { aborting = true; } + + + private void btbPath_Click(object sender, EventArgs e) { MessageBox.Show("Metodo ancora da fare"); } + + + private void tbPath_TextChanged(object sender, EventArgs e) { + dstIdx = dstRac = ""; + } + + + + + + + private void Wb_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e) { + object obj = new Object(); + lock (obj) { + cnt++; + StringBuilder sb; + + WebBrowser wb = sender as WebBrowser; + string link = wb.Url.ToString(); + + // aggiorno UI + lblST.Text = wb.Name + " - Donwloaded: " + link; + + // Se pagina è un racconto, lo salvo + if (IsRacLink(link)) { + sb = new StringBuilder(); + sb.Append(wb.DocumentText); + cTools.WriteTextFile(Path.Combine(dstRac, GetFileName(link)), sb); + } + + // Registro che ho eseguito il download del link + Downloaded.Add(link); + + // Ciclo su tutti i link estratti dalla pagina: + foreach (HtmlElement item in wb.Document.Links) { + link = item.GetAttribute("href"); + // Se link nuovo: + if (!AllLinks.Contains(link)) { + // Link nuovo, mi comporto di conseguenza alla tipologia: + if (IsRacLink(link)){ + // Link ad un racconto + AllLinks.Add(link); + if (DownRac) { toDownload.Add(link); } + RacLinks.Add(link); + } else { + if (IsIdxLink(link)){ + // Link ad un indice + AllLinks.Add(link); + toDownload.Add(link); + } else { + // Link non riconosciuto, lo scarto + ; + } + } + } + } // fine ciclo sui link estratti + + // Se ho raggiunto il massimo numero di link, o non vi sono link da downloadare, mi fermo: + if ((toDownload.Count > 0) && ((cnt < MAXLINK) || (DownRac)) && (!aborting)) { + // proseguo con il download: + string lk = toDownload.First(); + toDownload.Remove(lk); + wb.Navigate(lk); + } else { + // Finito download, salvo gli archivi: + SaveState(); + } + + }//lock + } + + + private void SaveState() { + StringBuilder sb; + + // Preparo il path di destinazione + string dstIdx = Path.Combine(System.IO.Path.Combine(tbPath.Text, DateTime.Now.ToString("yyyy-MM-dd")), "Indici"); + if (!Directory.Exists(dstIdx)) Directory.CreateDirectory(dstIdx); + string dstRac = Path.Combine(System.IO.Path.Combine(tbPath.Text, DateTime.Now.ToString("yyyy-MM-dd")), "Testi"); + if (!Directory.Exists(dstRac)) Directory.CreateDirectory(dstRac); + + // Finito download, salvo gli archivi: + string dt = DateTime.Now.ToString("yyyy-MM-dd_HH-mm-ss"); + + // Salvo archivio: AllLinks + sb = new StringBuilder(); + AllLinks.Sort(); + foreach (string lnk in AllLinks) { sb.AppendLine(lnk); } + cTools.WriteTextFile(Path.Combine(DstIdx, string.Format("_A69_AllLinks_{0}.tes", dt)), sb); + + // Salvo archivio: toDownload + sb = new StringBuilder(); + toDownload.Sort(); + foreach (string lnk in toDownload) { sb.AppendLine(lnk); } + cTools.WriteTextFile(Path.Combine(DstIdx, string.Format("_A69_toDownload_{0}.tes", dt)), sb); + + // Salvo archivio: Downloaded + sb = new StringBuilder(); + Downloaded.Sort(); + foreach (string lnk in Downloaded) { sb.AppendLine(lnk); } + cTools.WriteTextFile(Path.Combine(DstIdx, string.Format("_A69_Downloaded_{0}.tes", dt)), sb); + + // Salvo archivio: RacLinks + sb = new StringBuilder(); + RacLinks.Sort(); + foreach (string lnk in RacLinks) { sb.AppendLine(lnk); } + cTools.WriteTextFile(Path.Combine(DstIdx, string.Format("_A69_RacLinks_{0}.tes", dt)), sb); + + // avviso utente: + lblST.Text = string.Format("Finito il download in {0}", DateTime.Now - dtStartTime); + + // Riattivo UI: + btnDownloadLink.Enabled = true; + btnDownloadAll.Enabled = true; + + // Chiudo applicazione + this.Close(); + } + + + + private string GetFileName(string url) { return url.Replace("https://www.annunci69.it/racconti-erotici/", "A69_").Replace("/", "_").Replace(":", "_").Replace(@"\", "_"); } + private bool IsIdxLink(string link) { return link.StartsWith(BASE_LINK_IDX); } + private bool IsRacLink(string link) { foreach (string tip in Tipologie) { if (link.StartsWith(BASE_LINK_RAC + tip + "/")) return true; } return false; } + + + + } +} diff --git a/Src/A69WD/Form1.resx b/Src/A69WD/Form1.resx new file mode 100644 index 0000000..29dcb1b --- /dev/null +++ b/Src/A69WD/Form1.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/Src/A69WD/Program.cs b/Src/A69WD/Program.cs new file mode 100644 index 0000000..e073d4c --- /dev/null +++ b/Src/A69WD/Program.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Windows.Forms; + +namespace A69WD { + static class Program { + /// + /// Punto di ingresso principale dell'applicazione. + /// + [STAThread] + static void Main() { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new Form1()); + } + } +} diff --git a/Src/A69WD/Properties/AssemblyInfo.cs b/Src/A69WD/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..b3b97fa --- /dev/null +++ b/Src/A69WD/Properties/AssemblyInfo.cs @@ -0,0 +1,53 @@ +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("A69WD")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("A69WD")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2021")] +[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("cd279079-d5ac-4c8a-9828-9a02c735d39c")] + +// Le informazioni sulla versione di un assembly sono costituite dai seguenti quattro valori: +// +// Versione principale +// Versione secondaria +// Numero di build +// Revisione +// +// È 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("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] + + +/* + * + * Vrs 0.1.0.0 + * + * - Compilata da CSiCoAlm il 2021/10/26 + * - Prima versione che permette di scaricare i file da A69 bypassando il controllo del browser. + * - Manca: + * - Serializzazione degli archivi pe rpoter riprendere il download parziale dei racconti o la scansione parziale dei link + * - Gestione in thread paralleli dei download + * - Riduzione ad icona per non visualizzare il tutto (privacy) + * - Parametrizzazione del lavoro + * - Loggin degli eventi + * - Rendere l'applicativo consol, in modo che non vi sia interfaccia utente. + * + */ diff --git a/Src/A69WD/Properties/Resources.Designer.cs b/Src/A69WD/Properties/Resources.Designer.cs new file mode 100644 index 0000000..236bb83 --- /dev/null +++ b/Src/A69WD/Properties/Resources.Designer.cs @@ -0,0 +1,62 @@ +//------------------------------------------------------------------------------ +// +// Codice generato da uno strumento. +// Versione di 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 A69WD.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 nella cache utilizzata 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("A69WD.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/Src/A69WD/Properties/Resources.resx b/Src/A69WD/Properties/Resources.resx new file mode 100644 index 0000000..ffecec8 --- /dev/null +++ b/Src/A69WD/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/Src/A69WD/Properties/Settings.Designer.cs b/Src/A69WD/Properties/Settings.Designer.cs new file mode 100644 index 0000000..67f3fae --- /dev/null +++ b/Src/A69WD/Properties/Settings.Designer.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// 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 A69WD.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/Src/A69WD/Properties/Settings.settings b/Src/A69WD/Properties/Settings.settings new file mode 100644 index 0000000..abf36c5 --- /dev/null +++ b/Src/A69WD/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Src/A69WD/cTools.cs b/Src/A69WD/cTools.cs new file mode 100644 index 0000000..08c91a3 --- /dev/null +++ b/Src/A69WD/cTools.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace A69WD { + public class cTools { + + + /// + /// Scrive il testo in un file con append=false e Encoding UTF8 + /// + /// Nome completo del file da creare/sovrascrivere + /// StringBuilder con il testo da riportare nel file + public static void WriteTextFile(string FullFileName, StringBuilder Text) { + System.IO.StreamWriter sw = new System.IO.StreamWriter(FullFileName, false, Encoding.UTF8); + sw.Write(Text.ToString()); + sw.Flush(); + sw.Close(); + } + + + + } +}