IO-1154 IO-996 resolve bindings to main window.

This commit is contained in:
Patrick Fic
2021-05-26 09:56:22 -07:00
parent f9d8b18481
commit 0ab4cc38d0
5 changed files with 9 additions and 8 deletions

View File

@@ -305,7 +305,7 @@
<Version>1.1.0</Version> <Version>1.1.0</Version>
</PackageReference> </PackageReference>
<PackageReference Include="MaterialDesignThemes"> <PackageReference Include="MaterialDesignThemes">
<Version>4.0.0</Version> <Version>4.1.0</Version>
</PackageReference> </PackageReference>
<PackageReference Include="Microsoft.CSharp"> <PackageReference Include="Microsoft.CSharp">
<Version>4.7.0</Version> <Version>4.7.0</Version>

View File

@@ -51,7 +51,7 @@ using System.Windows;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.12.0")] [assembly: AssemblyVersion("1.0.18.0")]
[assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")]
//Setting Squirrel Aware Version. //Setting Squirrel Aware Version.
[assembly: AssemblyMetadata("SquirrelAwareVersion", "1")] [assembly: AssemblyMetadata("SquirrelAwareVersion", "1")]

View File

@@ -35,7 +35,8 @@ namespace BodyshopPartner.ViewModels
p => true, p => true,
p => p =>
{ {
((Window)p).Show(); App.Current.MainWindow.Show();
// ((Window)p).Show();
} }

View File

@@ -90,7 +90,7 @@ namespace BodyshopPartner.ViewModels
private async Task updateCheck() private async Task updateCheck()
{ {
//#if (!DEBUG) #if (!DEBUG)
logger.Debug("Checking if updates are available."); logger.Debug("Checking if updates are available.");
await Utils.UpdateHandler.UpdateAppEasy((val) => UpdateProgress = val); await Utils.UpdateHandler.UpdateAppEasy((val) => UpdateProgress = val);
@@ -111,7 +111,7 @@ namespace BodyshopPartner.ViewModels
// } // }
//} //}
//#endif #endif
} }

View File

@@ -58,7 +58,7 @@
<tb:TaskbarIcon DockPanel.Dock="Top" <tb:TaskbarIcon DockPanel.Dock="Top"
IconSource="../favicon.ico" IconSource="../favicon.ico"
DoubleClickCommand="{Binding OpenMainWindowCommand}" DoubleClickCommand="{Binding OpenMainWindowCommand}"
DoubleClickCommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Window}}}" DoubleClickCommandParameter="{Binding ElementName=MainWindow}"
PopupActivation="LeftClick" PopupActivation="LeftClick"
MenuActivation="RightClick"> MenuActivation="RightClick">
<!--<tb:TaskbarIcon.TrayPopup> <!--<tb:TaskbarIcon.TrayPopup>
@@ -101,7 +101,7 @@
<ContextMenu> <ContextMenu>
<MenuItem Header="{x:Static p:Resources.Label_Show}" <MenuItem Header="{x:Static p:Resources.Label_Show}"
Command="{Binding OpenMainWindowCommand}" Command="{Binding OpenMainWindowCommand}"
CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Window}}}" /> CommandParameter="{Binding ElementName=MainWindow}" />
<MenuItem Header="{x:Static p:Resources.Label_Restart}" <MenuItem Header="{x:Static p:Resources.Label_Restart}"
Command="{Binding StartFolderMonitorsCommand}" /> Command="{Binding StartFolderMonitorsCommand}" />
<MenuItem Header="{x:Static p:Resources.Label_StopAllMonitors}" <MenuItem Header="{x:Static p:Resources.Label_StopAllMonitors}"
@@ -211,7 +211,7 @@
Margin="4" Margin="4"
Content="{x:Static p:Resources.Label_Remove}" /> Content="{x:Static p:Resources.Label_Remove}" />
<Button Command="{Binding DataContext.RestartMonitoringPathCommand, <Button Command="{Binding DataContext.RestartMonitoringPathCommand,
RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}" ElementName=MainWindow }"
CommandParameter="{Binding .}" CommandParameter="{Binding .}"
Style="{StaticResource MaterialDesignOutlinedButton}" Style="{StaticResource MaterialDesignOutlinedButton}"
Margin="4" Margin="4"