From 4f39bcb9dbff6b90b1280eb2ca5265421762407b Mon Sep 17 00:00:00 2001 From: Mouzzi-C <63340073+Mouzzi-C@users.noreply.github.com> Date: Tue, 9 Feb 2021 16:16:15 +0100 Subject: [PATCH 1/4] Update rapport-de-bug.md --- .github/ISSUE_TEMPLATE/rapport-de-bug.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/rapport-de-bug.md b/.github/ISSUE_TEMPLATE/rapport-de-bug.md index 7804a4a..bd193cf 100644 --- a/.github/ISSUE_TEMPLATE/rapport-de-bug.md +++ b/.github/ISSUE_TEMPLATE/rapport-de-bug.md @@ -3,7 +3,7 @@ name: Rapport de bug about: Créer un rapport de bug pour aider l'amélioration du plugin Isogeo ArcGis Pro title: "[BUG]" labels: bug -assignees: VianneyDoleans +assignees: jgrosmaire --- From 78f999ef135cfe1b7170971d7bab673ebb645bb9 Mon Sep 17 00:00:00 2001 From: Mouzzi-C <63340073+Mouzzi-C@users.noreply.github.com> Date: Tue, 9 Feb 2021 16:17:04 +0100 Subject: [PATCH 2/4] Update nouvelle-fonctionnalit-.md --- .github/ISSUE_TEMPLATE/nouvelle-fonctionnalit-.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/nouvelle-fonctionnalit-.md b/.github/ISSUE_TEMPLATE/nouvelle-fonctionnalit-.md index d00aa9e..9be55b2 100644 --- a/.github/ISSUE_TEMPLATE/nouvelle-fonctionnalit-.md +++ b/.github/ISSUE_TEMPLATE/nouvelle-fonctionnalit-.md @@ -3,7 +3,7 @@ name: Nouvelle fonctionnalité about: Créer une issue pour suggérer les évolutions du plugin Isogeo ArcGis Pro title: "[Feature] " labels: enhancement -assignees: '' +assignees: 'jgrosmaire' --- From ba655b5e38a1744226c65b20bd20fe3d202ce455 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 8 Jun 2021 17:01:54 +0200 Subject: [PATCH 3/4] Update Contact --- AddIn/Views/Metadata/ContactItem.xaml | 2 -- AddIn/Views/Metadata/MetadataContacts.xaml | 4 +-- .../ViewsModels/Metadata/MetadataViewModel.cs | 30 ++++++++++++++----- Models/API/Contact.cs | 2 +- 4 files changed, 24 insertions(+), 14 deletions(-) diff --git a/AddIn/Views/Metadata/ContactItem.xaml b/AddIn/Views/Metadata/ContactItem.xaml index 9b9e606..0f2eeec 100644 --- a/AddIn/Views/Metadata/ContactItem.xaml +++ b/AddIn/Views/Metadata/ContactItem.xaml @@ -17,7 +17,5 @@ - - diff --git a/AddIn/Views/Metadata/MetadataContacts.xaml b/AddIn/Views/Metadata/MetadataContacts.xaml index 1d606f3..f41bbc2 100644 --- a/AddIn/Views/Metadata/MetadataContacts.xaml +++ b/AddIn/Views/Metadata/MetadataContacts.xaml @@ -14,14 +14,12 @@ + - - - diff --git a/AddIn/ViewsModels/Metadata/MetadataViewModel.cs b/AddIn/ViewsModels/Metadata/MetadataViewModel.cs index 98fd064..1dfcc45 100644 --- a/AddIn/ViewsModels/Metadata/MetadataViewModel.cs +++ b/AddIn/ViewsModels/Metadata/MetadataViewModel.cs @@ -7,6 +7,7 @@ using MVVMPattern; using MVVMPattern.MediatorPattern; using System.Text.RegularExpressions; +using System.Globalization; using System; namespace Isogeo.AddIn.ViewsModels.Metadata @@ -84,15 +85,15 @@ public Contact ContactOwner AddressLine2 = Isogeo.Language.Resources.NotReported, AddressLine3 = Isogeo.Language.Resources.NotReported, City = Isogeo.Language.Resources.NotReported, - Country = Isogeo.Language.Resources.NotReported, + CountryCode = Isogeo.Language.Resources.NotReported, Email = Isogeo.Language.Resources.NotReported, Name = Isogeo.Language.Resources.NotReported, Organization = Isogeo.Language.Resources.NotReported, Phone = Isogeo.Language.Resources.NotReported, ZipCode = Isogeo.Language.Resources.NotReported }; - return _currentResult._creator.contact; + return _currentResult?._creator?.contact; } } @@ -108,8 +109,8 @@ private static void FillContactWithEmpty(Contact contact) contact.AddressLine2 = ""; if (string.IsNullOrWhiteSpace(contact.AddressLine3)) contact.AddressLine3 = ""; - if (string.IsNullOrWhiteSpace(contact.Country)) - contact.Country = ""; + if (string.IsNullOrWhiteSpace(contact.CountryCode)) + contact.CountryCode = ""; if (string.IsNullOrWhiteSpace(contact.Email)) contact.Email = Isogeo.Language.Resources.NotReported; if (string.IsNullOrWhiteSpace(contact.Organization)) @@ -122,9 +123,20 @@ private static void FillContactWithEmpty(Contact contact) private static void FillCity(Contact contact) { - contact.City = contact.ZipCode + " " + contact.City + " " + contact.Country; - if (string.IsNullOrWhiteSpace(contact.City)) - contact.City = Isogeo.Language.Resources.NotReported; + try + { + contact.City = contact.ZipCode + " " + contact.City + ", " + (new RegionInfo(contact.CountryCode).DisplayName); + if (string.IsNullOrWhiteSpace(contact.City)) + contact.City = Isogeo.Language.Resources.NotReported; + } + catch (ArgumentException argEx) + { + // The code was not a valid country code + contact.City = contact.ZipCode + " " + contact.City; + if (string.IsNullOrWhiteSpace(contact.City)) + contact.City = Isogeo.Language.Resources.NotReported; + } + } public ObservableCollection ContactItemsList { get; set; } @@ -144,7 +156,9 @@ private void LoadContactsLists() FillContactWithEmpty(contact.contact); if (contact.contact.AddressLine2 != "") - contact.contact.AddressLine1 += " " + contact.contact.AddressLine2; + contact.contact.AddressLine1 += ", " + contact.contact.AddressLine2; + if (contact.contact.AddressLine3 != "") + contact.contact.AddressLine1 += ", " + contact.contact.AddressLine3; FillCity(contact.contact); diff --git a/Models/API/Contact.cs b/Models/API/Contact.cs index 4f0a40d..ef58bac 100644 --- a/Models/API/Contact.cs +++ b/Models/API/Contact.cs @@ -54,7 +54,7 @@ public string City get; set; } - public string Country + public string CountryCode { get; set; From 81fe0dc6739aa1fd38613d349618328cfa903a5c Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 8 Jun 2021 17:17:45 +0200 Subject: [PATCH 4/4] Update log4net dependency --- AddIn/Isogeo.AddIn.csproj | 6 +++--- AddIn/packages.config | 2 +- Map/Isogeo.Map.csproj | 6 ++++-- Map/packages.config | 2 +- Models/Isogeo.Models.csproj | 5 +++-- Models/packages.config | 2 +- Utils/Isogeo.Utils.csproj | 7 ++++--- Utils/packages.config | 2 +- 8 files changed, 18 insertions(+), 14 deletions(-) diff --git a/AddIn/Isogeo.AddIn.csproj b/AddIn/Isogeo.AddIn.csproj index b64daa8..05844f1 100644 --- a/AddIn/Isogeo.AddIn.csproj +++ b/AddIn/Isogeo.AddIn.csproj @@ -45,11 +45,11 @@ $(registry:HKEY_CURRENT_USER\SOFTWARE\ESRI\ArcGISPro@InstallDir) - - ..\packages\log4net.2.0.8\lib\net45-full\log4net.dll - True + + ..\packages\log4net.2.0.12\lib\net45\log4net.dll + diff --git a/AddIn/packages.config b/AddIn/packages.config index 65988a9..15e61b8 100644 --- a/AddIn/packages.config +++ b/AddIn/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/Map/Isogeo.Map.csproj b/Map/Isogeo.Map.csproj index 83b127e..e5f4d1f 100644 --- a/Map/Isogeo.Map.csproj +++ b/Map/Isogeo.Map.csproj @@ -48,11 +48,13 @@ C:\Program Files\ArcGIS\Pro\bin\Extensions\Mapping\ArcGIS.Desktop.Mapping.dll False - - ..\packages\log4net.2.0.8\lib\net45-full\log4net.dll + + ..\packages\log4net.2.0.12\lib\net45\log4net.dll + + diff --git a/Map/packages.config b/Map/packages.config index 65988a9..15e61b8 100644 --- a/Map/packages.config +++ b/Map/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/Models/Isogeo.Models.csproj b/Models/Isogeo.Models.csproj index cb3ffc1..c54c8ba 100644 --- a/Models/Isogeo.Models.csproj +++ b/Models/Isogeo.Models.csproj @@ -43,8 +43,8 @@ C:\Program Files\ArcGIS\Pro\bin\ArcGIS.Desktop.Framework.dll False - - ..\packages\log4net.2.0.8\lib\net45-full\log4net.dll + + ..\packages\log4net.2.0.12\lib\net45\log4net.dll ..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll @@ -53,6 +53,7 @@ ..\packages\RestSharp.106.11.4\lib\net452\RestSharp.dll + diff --git a/Models/packages.config b/Models/packages.config index fb8b70b..d03f9ca 100644 --- a/Models/packages.config +++ b/Models/packages.config @@ -1,6 +1,6 @@  - + \ No newline at end of file diff --git a/Utils/Isogeo.Utils.csproj b/Utils/Isogeo.Utils.csproj index 9611b65..acd7190 100644 --- a/Utils/Isogeo.Utils.csproj +++ b/Utils/Isogeo.Utils.csproj @@ -32,12 +32,14 @@ 4 - - ..\packages\log4net.2.0.8\lib\net45-full\log4net.dll + + ..\packages\log4net.2.0.12\lib\net45\log4net.dll + + @@ -50,6 +52,5 @@ - \ No newline at end of file diff --git a/Utils/packages.config b/Utils/packages.config index b43c0ef..15e61b8 100644 --- a/Utils/packages.config +++ b/Utils/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file