Improved updated handler & allow qb file selection when file locked.
This commit is contained in:
@@ -90,26 +90,28 @@ namespace BodyshopPartner.ViewModels
|
||||
private async Task updateCheck()
|
||||
{
|
||||
|
||||
#if (!DEBUG)
|
||||
//#if (!DEBUG)
|
||||
logger.Debug("Checking if updates are available.");
|
||||
UpdateAvailable = await Utils.UpdateHandler.AreUpdatesAvailable();
|
||||
if (UpdateAvailable)
|
||||
{
|
||||
string msg = "An update to ImEX Online Partner is Available. It will be automatically downloaded and applied.";
|
||||
Utils.Notifications.notifier.ShowInformation(msg);
|
||||
logger.Debug("Updates are available! Installing.");
|
||||
try
|
||||
{
|
||||
await Utils.UpdateHandler.ApplyUpdates((val) => UpdateProgress = val, (val) => UpdateProgress = val);
|
||||
await Utils.UpdateHandler.UpdateAppEasy((val) => UpdateProgress = val);
|
||||
|
||||
}
|
||||
catch (Exception Ex)
|
||||
{
|
||||
logger.Error("Error while updating." + Ex.ToString());
|
||||
//UpdateAvailable = await Utils.UpdateHandler.AreUpdatesAvailable();
|
||||
//if (UpdateAvailable)
|
||||
//{
|
||||
// string msg = "An update to ImEX Online Partner is Available. It will be automatically downloaded and applied.";
|
||||
// Utils.Notifications.notifier.ShowInformation(msg);
|
||||
// logger.Debug("Updates are available! Installing.");
|
||||
// try
|
||||
// {
|
||||
// await Utils.UpdateHandler.ApplyUpdates((val) => UpdateProgress = val, (val) => UpdateProgress = val);
|
||||
|
||||
}
|
||||
}
|
||||
#endif
|
||||
// }
|
||||
// catch (Exception Ex)
|
||||
// {
|
||||
// logger.Error("Error while updating." + Ex.ToString());
|
||||
|
||||
// }
|
||||
//}
|
||||
//#endif
|
||||
|
||||
}
|
||||
|
||||
@@ -201,6 +203,7 @@ namespace BodyshopPartner.ViewModels
|
||||
{
|
||||
|
||||
OpenFileDialog openFileDialog = new OpenFileDialog();
|
||||
openFileDialog.ValidateNames = false;
|
||||
openFileDialog.Multiselect = false;
|
||||
openFileDialog.Filter = "QuickBooks files (*.qbw)|*.qbw|All files (*.*)|*.*";
|
||||
openFileDialog.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
|
||||
|
||||
Reference in New Issue
Block a user