diff --git a/BodyshopUploader/App.config b/BodyshopUploader/App.config index 46c1bf9..290b8b4 100644 --- a/BodyshopUploader/App.config +++ b/BodyshopUploader/App.config @@ -24,7 +24,7 @@ - + @@ -36,7 +36,7 @@ - + diff --git a/BodyshopUploader/BodyshopPartner.csproj b/BodyshopUploader/BodyshopPartner.csproj index e5c7db1..f24782e 100644 --- a/BodyshopUploader/BodyshopPartner.csproj +++ b/BodyshopUploader/BodyshopPartner.csproj @@ -105,8 +105,8 @@ ..\packages\GraphQL.Client.Abstractions.Websocket.3.2.0\lib\netstandard2.0\GraphQL.Client.Abstractions.Websocket.dll - - ..\packages\GraphQL.Client.Serializer.Newtonsoft.3.1.6\lib\netstandard2.0\GraphQL.Client.Serializer.Newtonsoft.dll + + ..\packages\GraphQL.Client.Serializer.Newtonsoft.3.2.0\lib\netstandard2.0\GraphQL.Client.Serializer.Newtonsoft.dll ..\packages\GraphQL.Primitives.3.2.0\lib\netstandard2.0\GraphQL.Primitives.dll @@ -154,13 +154,13 @@ ..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll - ..\packages\NLog.4.7.4\lib\net45\NLog.dll + ..\packages\NLog.4.7.5\lib\net45\NLog.dll ..\packages\squirrel.windows.2.0.1\lib\Net45\NuGet.Squirrel.dll - - ..\packages\Ookii.Dialogs.Wpf.1.1.0\lib\net45\Ookii.Dialogs.Wpf.dll + + ..\packages\Ookii.Dialogs.Wpf.3.0.1\lib\net45\Ookii.Dialogs.Wpf.dll ..\packages\SharpCompress.0.17.1\lib\net45\SharpCompress.dll @@ -189,8 +189,8 @@ - - ..\packages\System.Diagnostics.DiagnosticSource.4.7.1\lib\net46\System.Diagnostics.DiagnosticSource.dll + + ..\packages\System.Diagnostics.DiagnosticSource.5.0.0\lib\net46\System.Diagnostics.DiagnosticSource.dll ..\packages\System.Diagnostics.Tracing.4.3.0\lib\net462\System.Diagnostics.Tracing.dll @@ -259,8 +259,8 @@ ..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll - - ..\packages\System.Reactive.4.4.1\lib\net46\System.Reactive.dll + + ..\packages\System.Reactive.5.0.0\lib\net472\System.Reactive.dll ..\packages\System.Reflection.4.3.0\lib\net462\System.Reflection.dll @@ -272,8 +272,8 @@ True True - - ..\packages\System.Runtime.CompilerServices.Unsafe.4.7.1\lib\net461\System.Runtime.CompilerServices.Unsafe.dll + + ..\packages\System.Runtime.CompilerServices.Unsafe.5.0.0\lib\net45\System.Runtime.CompilerServices.Unsafe.dll ..\packages\System.Runtime.Extensions.4.3.1\lib\net462\System.Runtime.Extensions.dll @@ -501,7 +501,6 @@ This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - @@ -513,6 +512,5 @@ - \ No newline at end of file diff --git a/BodyshopUploader/Properties/Resources.Designer.cs b/BodyshopUploader/Properties/Resources.Designer.cs index 10ad562..af5437c 100644 --- a/BodyshopUploader/Properties/Resources.Designer.cs +++ b/BodyshopUploader/Properties/Resources.Designer.cs @@ -150,6 +150,15 @@ namespace BodyshopPartner.Properties { } } + /// + /// Looks up a localized string similar to Browse for QB File. + /// + public static string Label_BrowseForQb { + get { + return ResourceManager.GetString("Label_BrowseForQb", resourceCulture); + } + } + /// /// Looks up a localized string similar to File Path. /// @@ -159,6 +168,15 @@ namespace BodyshopPartner.Properties { } } + /// + /// Looks up a localized string similar to Interaction Log. + /// + public static string Label_InteractionLog { + get { + return ResourceManager.GetString("Label_InteractionLog", resourceCulture); + } + } + /// /// Looks up a localized string similar to Monitor Status. /// @@ -168,6 +186,15 @@ namespace BodyshopPartner.Properties { } } + /// + /// Looks up a localized string similar to QuickBooks File Path. + /// + public static string Label_QbFilePath { + get { + return ResourceManager.GetString("Label_QbFilePath", resourceCulture); + } + } + /// /// Looks up a localized string similar to Re_move. /// @@ -331,7 +358,7 @@ namespace BodyshopPartner.Properties { } /// - /// Looks up a localized string similar to Login - Bodyshop Uploader. + /// Looks up a localized string similar to Login -ImEX Online Partner. /// public static string Title_Login { get { @@ -340,7 +367,7 @@ namespace BodyshopPartner.Properties { } /// - /// Looks up a localized string similar to Bodyshop Partner by ImEX Systems Inc.. + /// Looks up a localized string similar to ImEX Online Partner. /// public static string Title_Login_Header { get { @@ -349,7 +376,7 @@ namespace BodyshopPartner.Properties { } /// - /// Looks up a localized string similar to Bodyshop Partner | ImEX Systems Inc.. + /// Looks up a localized string similar to ImEX Online Partner | ImEX Systems Inc.. /// public static string Title_Main { get { diff --git a/BodyshopUploader/Properties/Resources.resx b/BodyshopUploader/Properties/Resources.resx index 8e51161..ef3d204 100644 --- a/BodyshopUploader/Properties/Resources.resx +++ b/BodyshopUploader/Properties/Resources.resx @@ -147,12 +147,21 @@ Auto-start Monitors + + Browse for QB File + File Path + + Interaction Log + Monitor Status + + QuickBooks File Path + Re_move @@ -208,13 +217,13 @@ Password - Login - Bodyshop Uploader + Login -ImEX Online Partner - Bodyshop Partner by ImEX Systems Inc. + ImEX Online Partner - Bodyshop Partner | ImEX Systems Inc. + ImEX Online Partner | ImEX Systems Inc. Username diff --git a/BodyshopUploader/Utils/Queries/VehicleQueries.cs b/BodyshopUploader/Utils/Queries/VehicleQueries.cs index 8ed840c..d29d03b 100644 --- a/BodyshopUploader/Utils/Queries/VehicleQueries.cs +++ b/BodyshopUploader/Utils/Queries/VehicleQueries.cs @@ -37,7 +37,7 @@ namespace BodyshopPartner.Utils.Queries } catch(ArgumentOutOfRangeException Ex) { - logger.Trace("No vehicles returned in GQL query."); + logger.Trace(Ex,"No vehicles returned in GQL query."); return ""; } catch (Exception Ex) diff --git a/BodyshopUploader/ViewModels/MainViewModel.commands.cs b/BodyshopUploader/ViewModels/MainViewModel.commands.cs index 5711a8c..bb01414 100644 --- a/BodyshopUploader/ViewModels/MainViewModel.commands.cs +++ b/BodyshopUploader/ViewModels/MainViewModel.commands.cs @@ -119,6 +119,22 @@ namespace BodyshopPartner.ViewModels } } + private ICommand _browseForQbFolderCommand; + public ICommand BrowseForQbFolderCommand + { + get + { + if (_browseForQbFolderCommand == null) + { + _browseForQbFolderCommand = new RelayCommand( + p => true, + p => BrowseForQbFolder() + ); + } + return _browseForQbFolderCommand; + } + } + private ICommand _quitCommand; public ICommand QuitCommand { diff --git a/BodyshopUploader/ViewModels/MainViewModel.cs b/BodyshopUploader/ViewModels/MainViewModel.cs index 52b22cc..045ad27 100644 --- a/BodyshopUploader/ViewModels/MainViewModel.cs +++ b/BodyshopUploader/ViewModels/MainViewModel.cs @@ -14,6 +14,7 @@ using System.Threading.Tasks; using System.Windows; using Firebase.Auth; using ToastNotifications.Messages; +using Microsoft.Win32; namespace BodyshopPartner.ViewModels { @@ -138,6 +139,22 @@ namespace BodyshopPartner.ViewModels IndeterminateLoading = false; } + public void BrowseForQbFolder() + { + + OpenFileDialog openFileDialog = new OpenFileDialog(); + openFileDialog.Multiselect = false; + openFileDialog.Filter = "QuickBooks files (*.qbw)|*.qbw|All files (*.*)|*.*"; + openFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments); + if (openFileDialog.ShowDialog() == true) + { + + Properties.Settings.Default.QuickBooksFilePath = openFileDialog.FileName; + Properties.Settings.Default.Save(); + } + + + } public void StopAllFolderMonitors() { IndeterminateLoading = true; @@ -229,7 +246,7 @@ namespace BodyshopPartner.ViewModels public async Task TestGql() { - Utils.Notifications.notifier.ShowInformation("The message"); + Utils.Notifications.notifier.ShowInformation("The message"); //Notification _n = new Notification() diff --git a/BodyshopUploader/Views/Main.xaml b/BodyshopUploader/Views/Main.xaml index 0b65311..1fa60c4 100644 --- a/BodyshopUploader/Views/Main.xaml +++ b/BodyshopUploader/Views/Main.xaml @@ -1,17 +1,18 @@  @@ -109,6 +108,7 @@ + - + +