Package updates & added quickbooks path selection.

This commit is contained in:
Patrick Fic
2020-11-24 15:21:07 -08:00
parent 7967032fae
commit d75f6d414c
9 changed files with 131 additions and 54 deletions

View File

@@ -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
{

View File

@@ -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()