diff --git a/BodyshopUploader.sln b/BodyshopUploader.sln
index 5f52586..a70e77d 100644
--- a/BodyshopUploader.sln
+++ b/BodyshopUploader.sln
@@ -11,6 +11,8 @@ Global
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x86 = Release|x86
+ Test|Any CPU = Test|Any CPU
+ Test|x86 = Test|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{76B98E9B-A33A-464F-A07B-56E773376543}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
@@ -21,6 +23,10 @@ Global
{76B98E9B-A33A-464F-A07B-56E773376543}.Release|Any CPU.Build.0 = Release|Any CPU
{76B98E9B-A33A-464F-A07B-56E773376543}.Release|x86.ActiveCfg = Release|x86
{76B98E9B-A33A-464F-A07B-56E773376543}.Release|x86.Build.0 = Release|x86
+ {76B98E9B-A33A-464F-A07B-56E773376543}.Test|Any CPU.ActiveCfg = Test|Any CPU
+ {76B98E9B-A33A-464F-A07B-56E773376543}.Test|Any CPU.Build.0 = Test|Any CPU
+ {76B98E9B-A33A-464F-A07B-56E773376543}.Test|x86.ActiveCfg = Test|x86
+ {76B98E9B-A33A-464F-A07B-56E773376543}.Test|x86.Build.0 = Test|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/BodyshopUploader/App.xaml.cs b/BodyshopUploader/App.xaml.cs
index 4fdd4b2..ae7d5f1 100644
--- a/BodyshopUploader/App.xaml.cs
+++ b/BodyshopUploader/App.xaml.cs
@@ -36,6 +36,8 @@ namespace BodyshopPartner
return;
}
+ //Set all of the constants
+ Utils.AppMetaData.CreateEndpoints();
}
diff --git a/BodyshopUploader/ImEXOnlinePartner.csproj b/BodyshopUploader/ImEXOnlinePartner.csproj
index 4b35216..bdc7146 100644
--- a/BodyshopUploader/ImEXOnlinePartner.csproj
+++ b/BodyshopUploader/ImEXOnlinePartner.csproj
@@ -82,6 +82,27 @@
BodyshopPartner.App
+
+ bin\Test\
+ DEBUG;TRACE
+ true
+ pdbonly
+ AnyCPU
+ 7.3
+ prompt
+ true
+
+
+ bin\x86\Test\
+ TRACE
+ true
+ pdbonly
+ x64
+ 7.3
+ prompt
+ MinimumRecommendedRules.ruleset
+ true
+
False
diff --git a/BodyshopUploader/Properties/AssemblyInfo.cs b/BodyshopUploader/Properties/AssemblyInfo.cs
index 48c3ae4..5870c91 100644
--- a/BodyshopUploader/Properties/AssemblyInfo.cs
+++ b/BodyshopUploader/Properties/AssemblyInfo.cs
@@ -51,7 +51,7 @@ using System.Windows;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.17.0")]
+[assembly: AssemblyVersion("1.0.18.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
//Setting Squirrel Aware Version.
[assembly: AssemblyMetadata("SquirrelAwareVersion", "1")]
\ No newline at end of file
diff --git a/BodyshopUploader/Releases/RELEASES b/BodyshopUploader/Releases/RELEASES
index 9e3f0cc..28a4b7b 100644
--- a/BodyshopUploader/Releases/RELEASES
+++ b/BodyshopUploader/Releases/RELEASES
@@ -28,4 +28,6 @@ AFC97D32A72155DDCDC9FA0C42E0E0309FD80E1A ImEXOnlinePartner-1.0.14-delta.nupkg 52
8A9B92246C6518FE21644AADF548FDDD18548812 ImEXOnlinePartner-1.0.15-delta.nupkg 45479
08370231115AB8CBAF7F96F73096C76250BCB6DB ImEXOnlinePartner-1.0.15-full.nupkg 5148126
8470C73928BF9AC9390CD45DA08B2BDD7A5568E5 ImEXOnlinePartner-1.0.16-delta.nupkg 50005
-05F6DD20D20E33AE9589E42397C63BBCACD428B0 ImEXOnlinePartner-1.0.16-full.nupkg 5149052
\ No newline at end of file
+05F6DD20D20E33AE9589E42397C63BBCACD428B0 ImEXOnlinePartner-1.0.16-full.nupkg 5149052
+6E1FF9DBDACF7FCD499CA8CCA8B6252208878A9B ImEXOnlinePartner-1.0.17-delta.nupkg 50415
+A9081BA70BD2247EB20FC11BC55506C92873323B ImEXOnlinePartner-1.0.17-full.nupkg 5152981
\ No newline at end of file
diff --git a/BodyshopUploader/Utils/AppMetaData.cs b/BodyshopUploader/Utils/AppMetaData.cs
index 19f5a44..b560558 100644
--- a/BodyshopUploader/Utils/AppMetaData.cs
+++ b/BodyshopUploader/Utils/AppMetaData.cs
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using System.Windows;
namespace BodyshopPartner.Utils
{
@@ -12,14 +13,52 @@ namespace BodyshopPartner.Utils
public static string ActiveShopId = Properties.Settings.Default.LastSelectedShop;
public static string ShopRegion = "";
public static dynamic CiecaOpCodes;
+ private static NLog.Logger logger = NLog.LogManager.GetCurrentClassLogger();
+ public static string graphQlEndpoint;
+ public static string FirebaseAPIKey;
+ public static Boolean IsTest = false;
+ public static void CreateEndpoints()
+ {
+ logger.Debug("Creating endpoints for graphql.");
+ string[] args = Environment.GetCommandLineArgs();
+ if (args.Length == 1)
+ {
+#if DEBUG
+ graphQlEndpoint = "https://bodyshop-dev-db.herokuapp.com/v1/graphql";
+ FirebaseAPIKey = "AIzaSyDPLT8GiDHDR1R4nI66Qi0BY1aYviDPioc";
-#if DEBUG
- public static string graphQlEndpoint = "https://bodyshop-dev-db.herokuapp.com/v1/graphql";
- public static string FirebaseAPIKey = "AIzaSyDPLT8GiDHDR1R4nI66Qi0BY1aYviDPioc";
+#elif TEST
+ graphQlEndpoint = "https://db.test.bodyshop.app/v1/graphql";
+ FirebaseAPIKey = "AIzaSyBw7_GTy7GtQyfkIRPVrWHEGKfcqeyXw0c";
#else
- public static string graphQlEndpoint = "https://db.imex.online/v1/graphql";
- public static string FirebaseAPIKey = "AIzaSyDSezy-jGJreo7ulgpLdlpOwAOrgcaEkhU";
+ graphQlEndpoint = "https://db.imex.online/v1/graphql";
+ FirebaseAPIKey = "AIzaSyDSezy-jGJreo7ulgpLdlpOwAOrgcaEkhU";
#endif
+ }
+ else
+ {
+ if (args[1] == "test")
+ {
+ IsTest = true;
+
+ graphQlEndpoint = "https://db.test.bodyshop.app/v1/graphql";
+ FirebaseAPIKey = "AIzaSyBw7_GTy7GtQyfkIRPVrWHEGKfcqeyXw0c";
+ }
+ else
+ {
+#if DEBUG
+ graphQlEndpoint = "https://bodyshop-dev-db.herokuapp.com/v1/graphql";
+ FirebaseAPIKey = "AIzaSyDPLT8GiDHDR1R4nI66Qi0BY1aYviDPioc";
+#else
+ graphQlEndpoint = "https://db.imex.online/v1/graphql";
+ FirebaseAPIKey = "AIzaSyDSezy-jGJreo7ulgpLdlpOwAOrgcaEkhU";
+#endif
+ }
+
+ }
+
+
+ }
}
}
diff --git a/BodyshopUploader/ViewModels/LoginViewModel.props.cs b/BodyshopUploader/ViewModels/LoginViewModel.props.cs
index b7a270f..3bcc5fa 100644
--- a/BodyshopUploader/ViewModels/LoginViewModel.props.cs
+++ b/BodyshopUploader/ViewModels/LoginViewModel.props.cs
@@ -31,6 +31,8 @@ namespace BodyshopPartner.ViewModels
set { SetProperty(ref _error, value); }
}
+
+
private string _errorMsg;
public string ErrorMsg
{
diff --git a/BodyshopUploader/ViewModels/MainViewModel.props.cs b/BodyshopUploader/ViewModels/MainViewModel.props.cs
index 413c677..7c6f475 100644
--- a/BodyshopUploader/ViewModels/MainViewModel.props.cs
+++ b/BodyshopUploader/ViewModels/MainViewModel.props.cs
@@ -15,6 +15,13 @@ namespace BodyshopPartner.ViewModels
public GrowlNotification Growler;
private System.Timers.Timer _updateCheckTimer = new System.Timers.Timer(60 * 1000 * 60);
+ private bool _testMode = Utils.AppMetaData.IsTest; // Set upon app init.
+ public bool TestMode
+ {
+ get { return _testMode; }
+ set { SetProperty(ref _testMode, value); }
+ }
+
private ObservableCollection _monitoringPaths = new ObservableCollection();
public ObservableCollection MonitoringPaths
{
diff --git a/BodyshopUploader/Views/Main.xaml b/BodyshopUploader/Views/Main.xaml
index 7d55ff7..323e19a 100644
--- a/BodyshopUploader/Views/Main.xaml
+++ b/BodyshopUploader/Views/Main.xaml
@@ -172,6 +172,11 @@
+