From 5fe2c875fbb4ce7e4018b90b6e8c917eb5af84c4 Mon Sep 17 00:00:00 2001 From: Clouz Date: Mon, 15 May 2017 14:03:11 +0200 Subject: [PATCH 01/13] Inizio Test NumeraFogli --- ClassiDiScambio/ClassiDiScambio.csproj | 54 ++++++++++ ClassiDiScambio/NumeraFogli/Sheet.cs | 17 +++ ClassiDiScambio/Properties/AssemblyInfo.cs | 36 +++++++ ExcelGenericUDF.sln | 16 ++- ExcelGenericUDF/ExcelGenericUDF.csproj | 11 +- ExcelGui/ExcelGui.csproj | 97 +++++++++++++++++ ExcelGui/NumeraFogli.xaml | 34 ++++++ ExcelGui/NumeraFogli.xaml.cs | 37 +++++++ ExcelGui/Properties/AssemblyInfo.cs | 55 ++++++++++ ExcelGui/Properties/Resources.Designer.cs | 62 +++++++++++ ExcelGui/Properties/Resources.resx | 117 +++++++++++++++++++++ ExcelGui/Properties/Settings.Designer.cs | 30 ++++++ ExcelGui/Properties/Settings.settings | 7 ++ 13 files changed, 570 insertions(+), 3 deletions(-) create mode 100644 ClassiDiScambio/ClassiDiScambio.csproj create mode 100644 ClassiDiScambio/NumeraFogli/Sheet.cs create mode 100644 ClassiDiScambio/Properties/AssemblyInfo.cs create mode 100644 ExcelGui/ExcelGui.csproj create mode 100644 ExcelGui/NumeraFogli.xaml create mode 100644 ExcelGui/NumeraFogli.xaml.cs create mode 100644 ExcelGui/Properties/AssemblyInfo.cs create mode 100644 ExcelGui/Properties/Resources.Designer.cs create mode 100644 ExcelGui/Properties/Resources.resx create mode 100644 ExcelGui/Properties/Settings.Designer.cs create mode 100644 ExcelGui/Properties/Settings.settings diff --git a/ClassiDiScambio/ClassiDiScambio.csproj b/ClassiDiScambio/ClassiDiScambio.csproj new file mode 100644 index 0000000..6deb3df --- /dev/null +++ b/ClassiDiScambio/ClassiDiScambio.csproj @@ -0,0 +1,54 @@ + + + + + Debug + AnyCPU + {430E6707-F233-4091-8B93-2C2A95BDF03E} + Library + Properties + ClassiDiScambio + ClassiDiScambio + v4.5.2 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ClassiDiScambio/NumeraFogli/Sheet.cs b/ClassiDiScambio/NumeraFogli/Sheet.cs new file mode 100644 index 0000000..58bdb5d --- /dev/null +++ b/ClassiDiScambio/NumeraFogli/Sheet.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ClassiDiScambio.NumeraFogli +{ + public class Sheet + { + public string Cell { get; set; } + public int FromSheet { get; set; } + public int ToSheet { get; set; } + public int TotalSheet { get; set; } + public int StartingNumber { get; set; } + } +} diff --git a/ClassiDiScambio/Properties/AssemblyInfo.cs b/ClassiDiScambio/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..a57ea3f --- /dev/null +++ b/ClassiDiScambio/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +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("ClassiDiScambio")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("ClassiDiScambio")] +[assembly: AssemblyCopyright("Copyright © 2017")] +[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("430e6707-f233-4091-8b93-2c2a95bdf03e")] + +// 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")] diff --git a/ExcelGenericUDF.sln b/ExcelGenericUDF.sln index d2ee2cb..b54b9b3 100644 --- a/ExcelGenericUDF.sln +++ b/ExcelGenericUDF.sln @@ -1,10 +1,14 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26403.7 +# Visual Studio 14 +VisualStudioVersion = 14.0.25420.1 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExcelGenericUDF", "ExcelGenericUDF\ExcelGenericUDF.csproj", "{3B9277D4-E48C-42FF-9B44-FDF8817FD0E1}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ClassiDiScambio", "ClassiDiScambio\ClassiDiScambio.csproj", "{430E6707-F233-4091-8B93-2C2A95BDF03E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExcelGui", "ExcelGui\ExcelGui.csproj", "{389192F4-B61B-4201-A9F9-C7A4EE725ED2}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -15,6 +19,14 @@ Global {3B9277D4-E48C-42FF-9B44-FDF8817FD0E1}.Debug|Any CPU.Build.0 = Debug|Any CPU {3B9277D4-E48C-42FF-9B44-FDF8817FD0E1}.Release|Any CPU.ActiveCfg = Release|Any CPU {3B9277D4-E48C-42FF-9B44-FDF8817FD0E1}.Release|Any CPU.Build.0 = Release|Any CPU + {430E6707-F233-4091-8B93-2C2A95BDF03E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {430E6707-F233-4091-8B93-2C2A95BDF03E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {430E6707-F233-4091-8B93-2C2A95BDF03E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {430E6707-F233-4091-8B93-2C2A95BDF03E}.Release|Any CPU.Build.0 = Release|Any CPU + {389192F4-B61B-4201-A9F9-C7A4EE725ED2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {389192F4-B61B-4201-A9F9-C7A4EE725ED2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {389192F4-B61B-4201-A9F9-C7A4EE725ED2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {389192F4-B61B-4201-A9F9-C7A4EE725ED2}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/ExcelGenericUDF/ExcelGenericUDF.csproj b/ExcelGenericUDF/ExcelGenericUDF.csproj index 93cb625..1139007 100644 --- a/ExcelGenericUDF/ExcelGenericUDF.csproj +++ b/ExcelGenericUDF/ExcelGenericUDF.csproj @@ -75,7 +75,16 @@ - + + + {430e6707-f233-4091-8b93-2c2a95bdf03e} + ClassiDiScambio + + + {389192f4-b61b-4201-a9f9-c7a4ee725ed2} + ExcelGui + + xcopy "$(SolutionDir)\packages\ExcelDna.AddIn.0.33.9\tools\ExcelDna.xll" "$(TargetDir)ExcelGenericUDF-AddIn.xll*" /C /Y diff --git a/ExcelGui/ExcelGui.csproj b/ExcelGui/ExcelGui.csproj new file mode 100644 index 0000000..7f00bea --- /dev/null +++ b/ExcelGui/ExcelGui.csproj @@ -0,0 +1,97 @@ + + + + + Debug + AnyCPU + {389192F4-B61B-4201-A9F9-C7A4EE725ED2} + library + Properties + ExcelGui + ExcelGui + v4.5.2 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + 4.0 + + + + + + + + NumeraFogli.xaml + + + Code + + + True + True + Resources.resx + + + True + Settings.settings + True + + + ResXFileCodeGenerator + Resources.Designer.cs + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + + + + Designer + MSBuild:Compile + + + + + {430e6707-f233-4091-8b93-2c2a95bdf03e} + ClassiDiScambio + + + + + \ No newline at end of file diff --git a/ExcelGui/NumeraFogli.xaml b/ExcelGui/NumeraFogli.xaml new file mode 100644 index 0000000..898316b --- /dev/null +++ b/ExcelGui/NumeraFogli.xaml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ExcelGui/NumeraFogli.xaml.cs b/ExcelGui/NumeraFogli.xaml.cs new file mode 100644 index 0000000..abeb88f --- /dev/null +++ b/ExcelGui/NumeraFogli.xaml.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Shapes; + +using ClassiDiScambio.NumeraFogli; + + +namespace ExcelGui +{ + /// + /// Logica di interazione per NumeraFogli.xaml + /// + public partial class NumeraFogli : Window + { + public NumeraFogli(Sheet data) + { + + InitializeComponent(); + + } + + private void TextBlock_GotFocus(object sender, RoutedEventArgs e) + { + + } + } +} diff --git a/ExcelGui/Properties/AssemblyInfo.cs b/ExcelGui/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..4ebc433 --- /dev/null +++ b/ExcelGui/Properties/AssemblyInfo.cs @@ -0,0 +1,55 @@ +using System.Reflection; +using System.Resources; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Windows; + +// 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("ExcelGui")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("ExcelGui")] +[assembly: AssemblyCopyright("Copyright © 2017")] +[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)] + +//Per iniziare la compilazione delle applicazioni localizzabili, impostare +//CultureYouAreCodingWith nel file .csproj +//all'interno di un . Ad esempio, se si utilizza l'inglese (Stati Uniti) +//nei file di origine, impostare su en-US. Rimuovere quindi il commento dall'attributo +//NeutralResourceLanguage riportato di seguito. Aggiornare "en-US" nella +//riga sottostante in modo che corrisponda all'impostazione UICulture nel file di progetto. + +//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] + + +[assembly:ThemeInfo( + ResourceDictionaryLocation.None, //dove si trovano i dizionari delle risorse specifiche del tema + //(in uso se non è possibile trovare una risorsa nella pagina + // oppure nei dizionari delle risorse dell'applicazione) + ResourceDictionaryLocation.SourceAssembly //dove si trova il dizionario delle risorse generiche + //(in uso se non è possibile trovare una risorsa nella pagina, + // nell'applicazione o nei dizionari delle risorse specifiche del tema) +)] + + +// 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")] diff --git a/ExcelGui/Properties/Resources.Designer.cs b/ExcelGui/Properties/Resources.Designer.cs new file mode 100644 index 0000000..b8b654c --- /dev/null +++ b/ExcelGui/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 ExcelGui.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("ExcelGui.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/ExcelGui/Properties/Resources.resx b/ExcelGui/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/ExcelGui/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/ExcelGui/Properties/Settings.Designer.cs b/ExcelGui/Properties/Settings.Designer.cs new file mode 100644 index 0000000..ec2a61f --- /dev/null +++ b/ExcelGui/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 ExcelGui.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/ExcelGui/Properties/Settings.settings b/ExcelGui/Properties/Settings.settings new file mode 100644 index 0000000..033d7a5 --- /dev/null +++ b/ExcelGui/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file From 644fba93d8e0f44934b5045d583b404f1a14049d Mon Sep 17 00:00:00 2001 From: Clouz Date: Tue, 16 May 2017 00:13:39 +0200 Subject: [PATCH 02/13] aggiunta finestra funzionante --- ExcelGenericUDF/ExcelGenericUDF-AddIn.dna | 14 +++++++++ ExcelGenericUDF/ExcelGenericUDF.csproj | 4 +++ ExcelGenericUDF/Ribbon.cs | 35 +++++++++++++++++++++++ ExcelGenericUDF/Udf.cs | 6 ++++ ExcelGui/NumeraFogli.xaml | 10 +++---- ExcelGui/NumeraFogli.xaml.cs | 2 +- 6 files changed, 65 insertions(+), 6 deletions(-) create mode 100644 ExcelGenericUDF/Ribbon.cs diff --git a/ExcelGenericUDF/ExcelGenericUDF-AddIn.dna b/ExcelGenericUDF/ExcelGenericUDF-AddIn.dna index f0434dc..104f9cc 100644 --- a/ExcelGenericUDF/ExcelGenericUDF-AddIn.dna +++ b/ExcelGenericUDF/ExcelGenericUDF-AddIn.dna @@ -20,4 +20,18 @@ See the main Excel-DNA site at http://excel-dna.net for downloads of the full distribution. --> + + + + + + +