mirror of
https://github.com/BeyondDimension/SteamTools.git
synced 2026-10-25 03:09:54 +08:00
尝试修复托盘菜单有时候无法打开的问题
This commit is contained in:
+8
-8
@@ -31,20 +31,20 @@
|
||||
VerticalAlignment="Center"></ToggleSwitch>
|
||||
|
||||
<controls:ProgressRing IsIndeterminate="True" ToolTip.Tip="{ReflectionBinding Path=Res.Script_ImportLoading,Mode=OneWay,Source={x:Static resx:R.Current}}" HorizontalAlignment="Stretch" Height="30" Width="30" IsVisible="{Binding Source={x:Static service:ProxyService.Current},Path=IsLoading,Mode=OneWay}" />
|
||||
<Button IsVisible="{Binding Source={x:Static service:ProxyService.Current},Path=!IsLoading,Mode=OneWay}"
|
||||
Background="Transparent"
|
||||
Cursor="Hand"
|
||||
<Button IsVisible="{Binding Source={x:Static service:ProxyService.Current},Path=!IsLoading,Mode=OneWay}"
|
||||
Background="Transparent"
|
||||
Cursor="Hand"
|
||||
Command="{Binding AddNewScriptButton_Click}"
|
||||
ToolTip.Tip="{ReflectionBinding Path=Res.Import,Mode=OneWay,Source={x:Static resx:R.Current}}">
|
||||
<PathIcon Width="16" Data="{StaticResource AddDrawing}" />
|
||||
</Button>
|
||||
<Button Background="Transparent"
|
||||
<Button Background="Transparent"
|
||||
Cursor="Hand"
|
||||
Command="{ReflectionBinding RefreshScriptButton}"
|
||||
ToolTip.Tip="{ReflectionBinding Path=Res.Refresh,Mode=OneWay,Source={x:Static resx:R.Current}}">
|
||||
<PathIcon Width="16" Data="{StaticResource RefreshDrawing}" />
|
||||
</Button>
|
||||
<Button Background="Transparent"
|
||||
<Button Background="Transparent"
|
||||
Cursor="Hand"
|
||||
Command="{Binding ScriptStoreCommand}"
|
||||
ToolTip.Tip="{ReflectionBinding Path=Res.ScriptStore,Mode=OneWay,Source={x:Static resx:R.Current}}">
|
||||
@@ -139,12 +139,12 @@
|
||||
|
||||
<DockPanel VerticalAlignment="Bottom">
|
||||
<StackPanel Orientation="Horizontal" Spacing="10">
|
||||
<ToggleSwitch Classes="onlyToggleSwitch"
|
||||
<ToggleSwitch Classes="onlyToggleSwitch"
|
||||
Margin="0 -5 0 0"
|
||||
IsChecked="{Binding Enable,Mode=TwoWay}"
|
||||
VerticalAlignment="Center">
|
||||
</ToggleSwitch>
|
||||
|
||||
|
||||
<Button Background="Transparent"
|
||||
Cursor="Hand"
|
||||
VerticalAlignment="Center"
|
||||
@@ -170,7 +170,7 @@
|
||||
<PathIcon Width="16" Data="{StaticResource HomeDrawing}" />
|
||||
</Button>
|
||||
|
||||
<Button Background="Transparent" IsVisible="{Binding !IsBasics}" Cursor="Hand"
|
||||
<Button Background="Transparent" IsVisible="{Binding !IsBasics}" Cursor="Hand"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Right"
|
||||
Command="{ReflectionBinding #u.DataContext.DeleteScriptItemButton}"
|
||||
|
||||
@@ -44,8 +44,7 @@ namespace System.Application.UI.Views.Windows
|
||||
|
||||
if (OperatingSystem2.IsWindows10AtLeast)
|
||||
{
|
||||
var thm = AvaloniaLocator.Current.GetService<FluentAvaloniaTheme>();
|
||||
thm.ForceNativeTitleBarToTheme(this);
|
||||
AvaloniaLocator.Current.GetService<FluentAvaloniaTheme>().ForceNativeTitleBarToTheme(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -43,13 +43,16 @@ namespace System.Application.Services.Implementation
|
||||
mainWindow = new MainWindowViewModel();
|
||||
MainWindow = mainWindow;
|
||||
}
|
||||
taskbarWindow = new TaskBarWindowViewModel();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Log.Error("WindowService", ex, "Init WindowViewModel");
|
||||
throw;
|
||||
}
|
||||
finally
|
||||
{
|
||||
taskbarWindow = new TaskBarWindowViewModel();
|
||||
}
|
||||
}
|
||||
|
||||
int? appidUnlockAchievement;
|
||||
@@ -82,14 +85,14 @@ namespace System.Application.Services.Implementation
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!taskbarWindow.IsVisible)
|
||||
{
|
||||
taskbarWindow.Show(x, y);
|
||||
}
|
||||
else
|
||||
{
|
||||
taskbarWindow.SetPosition(x, y);
|
||||
}
|
||||
//if (!taskbarWindow.IsVisible)
|
||||
//{
|
||||
taskbarWindow.Show(x, y);
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// taskbarWindow.SetPosition(x, y);
|
||||
//}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user