This commit is contained in:
RMBGAME
2021-11-17 04:00:47 +08:00
parent 201756016f
commit 4f9114cb1c
17 changed files with 41 additions and 5 deletions
@@ -5,6 +5,7 @@
xmlns:vm="using:System.Application.UI.ViewModels"
xmlns:controls="using:System.Application.UI.Views.Controls"
xmlns:ms="using:System.Application.Settings"
xmlns:models="using:System.Application.Models"
xmlns:resx="using:System.Application.UI.Resx"
xmlns:service="using:System.Application.Services"
xmlns:gif="using:AvaloniaGif"
@@ -87,7 +88,9 @@
<Border Classes="Item">
<DockPanel>
<TextBlock Text="AutoCompleteBox"/>
<AutoCompleteBox Text=""/>
<AutoCompleteBox Items="{ReflectionBinding Path=Value,Source={x:Static models:ArchiSteamFarmCommand.Commands}}"
FilterMode="StartsWithOrdinal"
ValueMemberBinding="{ReflectionBinding CommandText}"/>
</DockPanel>
</Border>
@@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Text;
namespace System.Application.Models
{
public class ArchiSteamFarmCommand
{
public static readonly Lazy<IImmutableList<ArchiSteamFarmCommand>> Commands = new(ImmutableList.Create(new ArchiSteamFarmCommand[]
{
new("2fa [b]","为指定机器人生成临时的​两步验证​令牌。"),
new("2fano [b]","为指定机器人拒绝所有等待操作的​两步验证​交易确认。"),
new("2faok [b]","为指定机器人拒绝所有等待操作的​两步验证​交易确认。"),
new("level [b]","显示指定机器人的 Steam 帐户等级。"),
new("addlicense [Bots] <Licenses>","为指定机器人激活给定的 Licenses (许可)。"),
}));
public ArchiSteamFarmCommand(string command, string? description = null)
{
Command = command;
Description = description;
}
public string Command { get; }
public string CommandText => "!" + Command;
//public int Access { get; }
public string? Description { get; }
}
}
@@ -10,7 +10,7 @@ using System.Threading.Tasks;
namespace System.Application.Models
{
public class LocalDll : IComparable<LocalDll>
public class LocalDlssDll : IComparable<LocalDlssDll>
{
public string Filename { get; }
@@ -22,7 +22,7 @@ namespace System.Application.Models
public string MD5Hash { get; }
public LocalDll(string filename)
public LocalDlssDll(string filename)
{
Filename = filename;
@@ -57,7 +57,7 @@ namespace System.Application.Models
return Version;
}
public int CompareTo(LocalDll? other)
public int CompareTo(LocalDlssDll? other)
{
if (other == null)
{
@@ -327,7 +327,7 @@ namespace System.Application.Models
return true;
}
internal bool UpdateDll(LocalDll localDll)
internal bool UpdateDll(LocalDlssDll localDll)
{
if (localDll == null)
{