mirror of
https://github.com/BeyondDimension/SteamTools.git
synced 2026-10-28 23:19:53 +08:00
save
This commit is contained in:
+13
-1
@@ -95,13 +95,25 @@
|
||||
Cursor="Hand"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Center"
|
||||
|
||||
IsVisible="{Binding Process,Converter={StaticResource IsNullConverter}}"
|
||||
ToolTip.Tip="{ReflectionBinding Path=Res.UserChange_DeleteUser,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Command="{ReflectionBinding #u.DataContext.DeleteUserButton_Click}"
|
||||
CommandParameter="{Binding}">
|
||||
<PathIcon Width="48" Height="48" Data="{DynamicResource PauseCircleDrawing}">
|
||||
</PathIcon>
|
||||
</Button>
|
||||
<Button Classes="flatbutton plain" x:Name="runstop_btn"
|
||||
Background="Transparent"
|
||||
Cursor="Hand"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Center"
|
||||
IsVisible="{Binding !Process,Converter={StaticResource IsNullConverter}}"
|
||||
ToolTip.Tip="{ReflectionBinding Path=Res.UserChange_DeleteUser,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Command="{ReflectionBinding #u.DataContext.DeleteUserButton_Click}"
|
||||
CommandParameter="{Binding}">
|
||||
<PathIcon Width="48" Height="48" Data="{DynamicResource PlayCircleDrawing}">
|
||||
</PathIcon>
|
||||
</Button>
|
||||
<Button Classes="flatbutton" x:Name="delete_btn"
|
||||
Background="Transparent"
|
||||
Cursor="Hand" HorizontalAlignment="Right"
|
||||
|
||||
@@ -38,6 +38,9 @@ namespace System.Application.UI.ViewModels
|
||||
SteamConnectService.Current.RuningSteamApps.FirstOrDefault(x => x.AppId == item.AppId);
|
||||
|
||||
|
||||
}
|
||||
public void onExited(object? sender, EventArgs e) {
|
||||
|
||||
}
|
||||
public void Refresh_Click()
|
||||
{
|
||||
@@ -46,8 +49,15 @@ namespace System.Application.UI.ViewModels
|
||||
foreach (var item in GameLibrarySettings.AFKAppList.Value)
|
||||
{
|
||||
var appInfo =SteamConnectService.Current.SteamApps.Items.FirstOrDefault(x => x.AppId == item.Key);
|
||||
if (appInfo != null)
|
||||
if (appInfo != null) {
|
||||
var runState = SteamConnectService.Current.RuningSteamApps.FirstOrDefault(x => x.AppId == item.Key);
|
||||
if (runState != null && runState.Process != null) {
|
||||
|
||||
appInfo.Process = runState.Process;
|
||||
appInfo.Process.Exited += new EventHandler(onExited);
|
||||
}
|
||||
list.Add(appInfo);
|
||||
}
|
||||
}
|
||||
IdleGameList = new ObservableCollection<SteamApp>(list);
|
||||
//if (SteamApps.Items.Any_Nullable() && GameLibrarySettings.AFKAppList.Value?.Count > 0)
|
||||
|
||||
Reference in New Issue
Block a user