mirror of
https://github.com/BeyondDimension/SteamTools.git
synced 2026-10-27 12:46:53 +08:00
save
This commit is contained in:
+3
-2
@@ -27,12 +27,13 @@
|
||||
Margin="0 0 145 0" Height="30"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Top">
|
||||
<!--<MenuItem Width="50" Command="{ReflectionBinding RefreshStats_Click}"
|
||||
ToolTip.Tip="{ReflectionBinding Path=Res.Achievement_RefreshTip,Mode=OneWay,Source={x:Static resx:R.Current}}">
|
||||
<MenuItem Width="50" Command="{ReflectionBinding Refresh_Click}"
|
||||
ToolTip.Tip="{ReflectionBinding Path=Res.RefreshList,Mode=OneWay,Source={x:Static resx:R.Current}}">
|
||||
<MenuItem.Header>
|
||||
<PathIcon Data="{StaticResource RefreshDrawing}" Width="14"></PathIcon>
|
||||
</MenuItem.Header>
|
||||
</MenuItem>
|
||||
<!--
|
||||
<MenuItem Width="50" Command="{ReflectionBinding ResetAllStats_Click}"
|
||||
ToolTip.Tip="{ReflectionBinding Path=Res.Achievement_ResetTip,Mode=OneWay,Source={x:Static resx:R.Current}}">
|
||||
<MenuItem.Header>
|
||||
|
||||
+42
-6
@@ -11,18 +11,54 @@
|
||||
xmlns:ms="clr-namespace:System.Application.Models.Settings;assembly=System.Application.SteamTools.Client.Desktop"
|
||||
FontFamily="{Binding Source={x:Static ms:UISettings.FontName},Path=Value, Mode=OneWay,Converter={StaticResource NameToFontFamilyConverter}}"
|
||||
Background="Transparent"
|
||||
xmlns:i="using:Avalonia.Xaml.Interactivity"
|
||||
xmlns:ia="using:Avalonia.Xaml.Interactions.Core"
|
||||
ExtendClientAreaToDecorationsHint="True"
|
||||
ExtendClientAreaChromeHints="NoChrome"
|
||||
ExtendClientAreaTitleBarHeightHint="30"
|
||||
Title="{Binding Title}"
|
||||
x:DataType="vm:EditAppInfoWindowViewModel"
|
||||
x:DataType="vm:IdleAppWindowViewModel"
|
||||
x:CompileBindings="True">
|
||||
<Panel>
|
||||
<controls:TitleBar></controls:TitleBar>
|
||||
<StackPanel Margin="{StaticResource TitleBarAfterMargin}">
|
||||
<Border Classes="paper" Background="{DynamicResource ThemeBrushKey}">
|
||||
<TextBox></TextBox>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
|
||||
<ScrollViewer HorizontalScrollBarVisibility="Disabled"
|
||||
VerticalScrollBarVisibility="Auto"
|
||||
Padding="{StaticResource TitleBarAfterMargin}">
|
||||
<StackPanel>
|
||||
<!--<TextBox Watermark="{ReflectionBinding Path=Res.Search,Source={x:Static resx:R.Current},Mode=OneWay}" Margin="20 10"></TextBox>-->
|
||||
<!--<Button Content="保存列表"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Right"
|
||||
Foreground="{DynamicResource HighlightForegroundBrushKey}"></Button>-->
|
||||
<Border DockPanel.Dock="Bottom" Grid.Column="1" Grid.Row="1" Classes="paper" Margin="10" Padding="20 0" Background="{DynamicResource ThemeBrushKey}">
|
||||
<!--<DockPanel Margin="0 10">
|
||||
-->
|
||||
<!--<CheckBox MinWidth="20"
|
||||
Content="{ReflectionBinding Path=Res.GameList_HideApp_AllCheck,Mode=OneWay,Source={x:Static resx:R.Current}}">
|
||||
</CheckBox>-->
|
||||
<!--
|
||||
<TextBlock Text="隐藏游戏列表" VerticalAlignment="Center"
|
||||
HorizontalAlignment="Right"></TextBlock>
|
||||
</DockPanel>-->
|
||||
<ItemsControl Items="{Binding IdleGameList}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel>
|
||||
<DockPanel Margin="0 10">
|
||||
<TextBlock Text="{Binding Value}"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"></TextBlock>
|
||||
<TextBlock Text="{Binding Key}" HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"></TextBlock>
|
||||
</DockPanel>
|
||||
<Separator Classes="Separator" />
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</Panel>
|
||||
</Window>
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
using MPIgnore = MessagePack.IgnoreMemberAttribute;
|
||||
using MPKey = MessagePack.KeyAttribute;
|
||||
using MPObj = MessagePack.MessagePackObjectAttribute;
|
||||
using N_JsonIgnore = Newtonsoft.Json.JsonIgnoreAttribute;
|
||||
using N_JsonProperty = Newtonsoft.Json.JsonPropertyAttribute;
|
||||
using S_JsonIgnore = System.Text.Json.Serialization.JsonIgnoreAttribute;
|
||||
using S_JsonProperty = System.Text.Json.Serialization.JsonPropertyNameAttribute;
|
||||
namespace System.Application.Models
|
||||
{
|
||||
[MPObj]
|
||||
public class SteamAFKApps
|
||||
{
|
||||
[MPKey(1)]
|
||||
[N_JsonProperty("1")]
|
||||
[S_JsonProperty("1")]
|
||||
public uint AppId { get; set; }
|
||||
[MPKey(2)]
|
||||
[N_JsonProperty("2")]
|
||||
[S_JsonProperty("2")]
|
||||
public string? Name { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
|
||||
using ReactiveUI;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using MPIgnore = MessagePack.IgnoreMemberAttribute;
|
||||
using MPKey = MessagePack.KeyAttribute;
|
||||
using MPObj = MessagePack.MessagePackObjectAttribute;
|
||||
using N_JsonIgnore = Newtonsoft.Json.JsonIgnoreAttribute;
|
||||
using N_JsonProperty = Newtonsoft.Json.JsonPropertyAttribute;
|
||||
using S_JsonIgnore = System.Text.Json.Serialization.JsonIgnoreAttribute;
|
||||
using S_JsonProperty = System.Text.Json.Serialization.JsonPropertyNameAttribute;
|
||||
namespace System.Application.Models
|
||||
{
|
||||
[MPObj]
|
||||
public class SteamHideApps : ReactiveObject
|
||||
{
|
||||
[MPKey(1)]
|
||||
[N_JsonProperty("1")]
|
||||
[S_JsonProperty("1")]
|
||||
public uint AppId { get; set; }
|
||||
[MPKey(2)]
|
||||
[N_JsonProperty("2")]
|
||||
[S_JsonProperty("2")]
|
||||
public string? Name { get; set; }
|
||||
[MPIgnore]
|
||||
[N_JsonIgnore]
|
||||
[S_JsonIgnore]
|
||||
public bool Enable { get; set; } = false;
|
||||
}
|
||||
}
|
||||
@@ -2070,6 +2070,15 @@ namespace System.Application.UI.Resx {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 刷新列表 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string RefreshList {
|
||||
get {
|
||||
return ResourceManager.GetString("RefreshList", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 刷新成功 的本地化字符串。
|
||||
/// </summary>
|
||||
|
||||
@@ -792,6 +792,9 @@
|
||||
<data name="Refresh" xml:space="preserve">
|
||||
<value>刷新</value>
|
||||
</data>
|
||||
<data name="RefreshList" xml:space="preserve">
|
||||
<value>刷新列表</value>
|
||||
</data>
|
||||
<data name="RefreshOK" xml:space="preserve">
|
||||
<value>刷新成功</value>
|
||||
</data>
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using ReactiveUI;
|
||||
using System.Application.Models;
|
||||
using System.Application.Models.Settings;
|
||||
using System.Application.UI.Resx;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Properties;
|
||||
|
||||
namespace System.Application.UI.ViewModels
|
||||
@@ -10,10 +14,20 @@ namespace System.Application.UI.ViewModels
|
||||
public IdleAppWindowViewModel() : base()
|
||||
{
|
||||
Title = ThisAssembly.AssemblyTrademark + " | " + AppResources.GameList_EditAppInfo;
|
||||
|
||||
Refresh_Click();
|
||||
}
|
||||
public ObservableCollection<KeyValuePair<uint, string>> _IdleGameList = new();
|
||||
public ObservableCollection<KeyValuePair<uint, string>> IdleGameList
|
||||
{
|
||||
get => _IdleGameList;
|
||||
set => this.RaiseAndSetIfChanged(ref _IdleGameList, value);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void Refresh_Click()
|
||||
{
|
||||
IdleGameList = new ObservableCollection<KeyValuePair<uint, string>>(GameLibrarySettings.AFKAppList.Value!);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user