Restore taskbar
This commit is contained in:
@@ -95,7 +95,8 @@ namespace BodyshopPartner.Utils
|
||||
logger.Debug("Install Progress " + _.ToString());
|
||||
InstallProgress(_);
|
||||
});
|
||||
UpdateManager.RestartApp(System.Reflection.Assembly.GetEntryAssembly().Location);
|
||||
logger.Debug("Attempting to restart application. " + System.Reflection.Assembly.GetEntryAssembly().Location);
|
||||
UpdateManager.RestartApp();
|
||||
}
|
||||
catch (Exception Ex)
|
||||
{
|
||||
@@ -106,6 +107,22 @@ namespace BodyshopPartner.Utils
|
||||
|
||||
}
|
||||
|
||||
public static void test()
|
||||
{
|
||||
using (var updateManager = new UpdateManager(UpdatePath))
|
||||
{
|
||||
try
|
||||
{
|
||||
UpdateManager.RestartApp();
|
||||
}
|
||||
catch (Exception Ex)
|
||||
{
|
||||
logger.Error("Error updating Partner App. " + Ex.ToString());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public static void BackupSettings()
|
||||
{
|
||||
string settingsFile = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.PerUserRoamingAndLocal).FilePath;
|
||||
|
||||
@@ -88,13 +88,28 @@ namespace BodyshopPartner.ViewModels
|
||||
|
||||
private async Task updateCheck()
|
||||
{
|
||||
|
||||
#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";
|
||||
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);
|
||||
|
||||
}
|
||||
catch (Exception Ex)
|
||||
{
|
||||
logger.Error("Error while updating." + Ex.ToString());
|
||||
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
xmlns:properties="clr-namespace:BodyshopPartner.Properties"
|
||||
xmlns:util="clr-namespace:BodyshopPartner.Utils"
|
||||
xmlns:vm="clr-namespace:BodyshopPartner.ViewModels"
|
||||
xmlns:tb="http://www.hardcodet.net/taskbar"
|
||||
mc:Ignorable="d"
|
||||
Title="{x:Static p:Resources.Title_Main}"
|
||||
Height="600"
|
||||
@@ -53,7 +54,7 @@
|
||||
IsIndeterminate="{Binding IndeterminateLoading}"
|
||||
Height="8" />
|
||||
|
||||
<!--<tb:TaskbarIcon DockPanel.Dock="Top"
|
||||
<tb:TaskbarIcon DockPanel.Dock="Top"
|
||||
IconSource="../favicon.ico"
|
||||
DoubleClickCommand="{StaticResource OpenMainWindowCommand}"
|
||||
PopupActivation="LeftClick"
|
||||
@@ -105,7 +106,7 @@
|
||||
Command="{Binding QuitCommand}" />
|
||||
</ContextMenu>
|
||||
</tb:TaskbarIcon.ContextMenu>
|
||||
</tb:TaskbarIcon>-->
|
||||
</tb:TaskbarIcon>
|
||||
|
||||
<StackPanel DockPanel.Dock="Right">
|
||||
|
||||
|
||||
Reference in New Issue
Block a user